* Re: SRCREV spec not working for kernel git recipes
2012-06-23 7:29 ` Khem Raj
@ 2012-06-23 7:57 ` Elvis Dowson
2012-06-23 8:14 ` Elvis Dowson
2012-06-23 15:17 ` Khem Raj
0 siblings, 2 replies; 8+ messages in thread
From: Elvis Dowson @ 2012-06-23 7:57 UTC (permalink / raw)
To: Khem Raj; +Cc: Yocto Discussion Mailing List
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
Hi Khem,
On Jun 23, 2012, at 11:29 AM, Khem Raj wrote:
>> I found out that if I specify SRCREV_pn-${PN}, it works and picks up the correct commit id, as follows:
>>
>> SRCREV_pn-${PN} = "a5556fb251253ccb674bd22d9703c37f6f8807a8"
>>
>> However, if you simply specifying SRCREV = "a5556fb251253ccb674bd22d9703c37f6f8807a8", it has no effect and it always picks up the latest commit from the git repository.
>>
>> It would be great if someone could please explain why this is so, because I search through the Yocto documentation and it isn't mentioned anywhere. The OE classic way of doing things, it used to pick up the correct commit by just specifying SRCREV. Now I find that you have to specify SRCREV_pn-${PN} to get it to work.
>>
>> Is this documented somewhere?
>
> ?
> can you port bitbake -e virtual/kernel output with and without change
> somewhere ?
The output files are rather large.
BTW, I do not have a PROVIDES += "virtual/kernel" entry in the linux-xilinx kernel recipes. Is that necessary to get SRCREV to work?
Best regards,
Elvis Dowson
[-- Attachment #2: SRCREV_pn-.txt --]
[-- Type: text/plain, Size: 379433 bytes --]
Loading cache...done.
Loaded 1529 entries from dependency cache.
Parsing recipes...done.
Parsing of 1193 .bb files complete (1192 cached, 1 parsed). 1529 targets, 40 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
# STAGING_INCDIR_NATIVE=${STAGING_DIR_NATIVE}${includedir_native}
STAGING_INCDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include"
# KERNEL_IMAGEDEST=boot
KERNEL_IMAGEDEST="boot"
# prefix=/usr
export prefix="/usr"
# FREESMARTPHONE_GIT=git://git.freesmartphone.org
FREESMARTPHONE_GIT="git://git.freesmartphone.org"
# INHERIT_INSANE=insane
INHERIT_INSANE="insane"
# CVSDIR=${CO_DIR}/cvs
CVSDIR="/tool/yocto/poky/build/downloads/cvs"
# SVNDIR=${CO_DIR}/svn
SVNDIR="/tool/yocto/poky/build/downloads/svn"
# PREFERRED_VERSION_gcc-cross-intermediate=${GCCVERSION}
PREFERRED_VERSION_gcc-cross-intermediate="4.7%"
# bindir_cross=/bin
bindir_cross="/bin"
# BASEDEPENDS=${@base_dep_prepend(d)}
# PREFERRED_PROVIDER_libgcc-nativesdk=libgcc-nativesdk
PREFERRED_PROVIDER_libgcc-nativesdk="libgcc-nativesdk"
# BB_CONSOLELOG=${TMPDIR}/cooker.log.${DATETIME}
BB_CONSOLELOG="/tool/yocto/poky/build/tmp/cooker.log.20120623074645"
# STRIP=${HOST_PREFIX}strip
export STRIP="powerpc-poky-linux-strip"
# STAGING_DATADIR=${STAGING_DIR_HOST}${datadir}
STAGING_DATADIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/share"
# target_datadir=/usr/share
target_datadir="/usr/share"
# PKG_kernel-base=kernel-${@legitimize_package_name('${KERNEL_VERSION}')}
PKG_kernel-base="kernel-3.3.0-14.2-build1"
# FETCHCOMMAND_cvs=/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}
FETCHCOMMAND_cvs="/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
# base_bindir_native=/bin
base_bindir_native="/bin"
# localstatedir=${base_prefix}/var
export localstatedir="/var"
# SECTION_${PN}-dbg=None
# DATETIME=${DATE}${TIME}
DATETIME="20120623074645"
# BUILDCFG_VARS=BB_VERSION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU
BUILDCFG_VARS="BB_VERSION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU"
# BUILD_CC=${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}
export BUILD_CC="gcc"
# IMAGE_FEATURES= ${EXTRA_IMAGE_FEATURES}
IMAGE_FEATURES="debug-tweaks"
# DESCRIPTION_linux-xilinx-staticdev=${DESCRIPTION} This package contains static libraries for software development.
DESCRIPTION_linux-xilinx-staticdev="Linux kernel for Xilinx platforms This package contains static libraries for software development."
# SEPPUKU_AUTOBUILD=None
# INITRAMFS_FSTYPES=cpio.gz
INITRAMFS_FSTYPES="cpio.gz"
# PREFERRED_VERSION_cross-localedef-native=${EGLIBCVERSION}
PREFERRED_VERSION_cross-localedef-native="2.15"
# INHIBIT_DEFAULT_DEPS=1
INHIBIT_DEFAULT_DEPS="1"
# INITRAMFS_TASK=
# SOLIBSDEV_darwin8=.dylib
SOLIBSDEV_darwin8=".dylib"
# SOLIBSDEV_darwin9=.dylib
SOLIBSDEV_darwin9=".dylib"
# USER=elvis
export USER="elvis"
# OES_BITBAKE_CONF=1
OES_BITBAKE_CONF="1"
# QADEPENDS_virtclass-nativesdk=
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc=None
# SUMMARY_linux-xilinx-doc=${SUMMARY} - Documentation files
SUMMARY_linux-xilinx-doc="linux-xilinx version 3.3.0-r0 - Documentation files"
# UPDATECOMMAND=ERROR, this must be a BitBake bug
UPDATECOMMAND="ERROR, this must be a BitBake bug"
# EXTENDPE=${@['','${PE\x7d_'][d.getVar('PE',1) > 0]}
# ALLOW_EMPTY_linux-xilinx-dbg=1
ALLOW_EMPTY_linux-xilinx-dbg="1"
# PREFERRED_VERSION_gcc-cross-initial=${GCCVERSION}
PREFERRED_VERSION_gcc-cross-initial="4.7%"
# KERNEL_PRIORITY=${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}
KERNEL_PRIORITY="30300"
# BBINCLUDED=/tool/yocto/poky/meta/classes/kernel-arch.bbclass /tool/yocto/poky/meta/classes/utility-tasks.bbclass /tool/yocto/meta-xilinx/conf/distro/include/xilinx-default-revisions.inc /tool/yocto/poky/meta/conf/distro/include/world-broken.inc /tool/yocto/poky/meta/recipes-kernel/linux/linux-dtb.inc /tool/yocto/poky/meta/classes/patch.bbclass /tool/yocto/poky/meta/conf/distro/include/as-needed.inc /tool/yocto/meta-xilinx/conf/machine/include/tune-ppc440.inc /tool/yocto/poky/meta/conf/layer.conf /tool/yocto/poky/meta-yocto/conf/distro/poky.conf /tool/yocto/poky/meta/conf/documentation.conf /tool/yocto/poky/meta/classes/mirrors.bbclass /tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx.inc /tool/yocto/meta-openembedded/meta-oe/conf/layer.conf /tool/yocto/poky/meta/classes/utils.bbclass /tool/yocto/poky/meta/classes/insane.bbclass /tool/yocto/poky/meta/classes/devshell.bbclass /tool/yocto/poky/meta/classes/image-mklibs.bbclass /tool/yocto/poky/meta/classes/debian.bbclass /tool/yocto/poky/meta/conf/abi_version.conf /tool/yocto/poky/meta/conf/distro/include/default-versions.inc /tool/yocto/poky/meta/classes/staging.bbclass /tool/yocto/poky/meta/classes/logging.bbclass /tool/yocto/poky/meta/classes/module_strip.bbclass /tool/yocto/poky/meta/conf/bitbake.conf /tool/yocto/poky/meta/conf/sanity.conf /tool/yocto/poky/meta/classes/buildstats.bbclass /tool/yocto/poky/meta/classes/package.bbclass /tool/yocto/poky/meta/classes/terminal.bbclass /tool/yocto/poky/build/conf/local.conf /tool/yocto/poky/meta/classes/package_rpm.bbclass /tool/yocto/poky/build/conf/bblayers.conf /tool/yocto/poky/meta/conf/distro/include/tclibc-eglibc.inc /tool/yocto/poky/meta/classes/license.bbclass /tool/yocto/poky/meta/classes/sstate.bbclass /tool/yocto/meta-xilinx/classes/xilinx-utils.bbclass /tool/yocto/poky/meta-yocto/conf/layer.conf /tool/yocto/poky/meta/classes/linux-kernel-base.bbclass /tool/yocto/poky/meta/classes/kernel.bbclass /tool/yocto/poky/meta/classes/prserv.bbclass /tool/yocto/poky/meta/classes/image-prelink.bbclass /tool/yocto/meta-xilinx/classes/xilinx-kernel.bbclass /tool/yocto/meta-xilinx/conf/layer.conf /tool/yocto/poky/meta/conf/distro/include/tcmode-default.inc /tool/yocto/poky/meta/classes/cml1.bbclass /tool/yocto/poky/meta/classes/base.bbclass /tool/yocto/poky/meta/conf/distro/include/default-distrovars.inc /tool/yocto/poky/meta/conf/machine/include/powerpc/arch-powerpc.inc /tool/yocto/poky/meta/classes/packagedata.bbclass /tool/yocto/poky/meta/classes/deploy.bbclass /tool/yocto/poky/meta/conf/distro/include/default-providers.inc /tool/yocto/poky/meta/conf/distro/defaultsetup.conf /tool/yocto/poky/meta/classes/sanity.bbclass /tool/yocto/meta-xilinx/conf/machine/virtex5.conf /tool/yocto/poky/meta/classes/metadata_scm.bbclass
BBINCLUDED="/tool/yocto/poky/meta/classes/kernel-arch.bbclass /tool/yocto/poky/meta/classes/utility-tasks.bbclass /tool/yocto/meta-xilinx/conf/distro/include/xilinx-default-revisions.inc /tool/yocto/poky/meta/conf/distro/include/world-broken.inc /tool/yocto/poky/meta/recipes-kernel/linux/linux-dtb.inc /tool/yocto/poky/meta/classes/patch.bbclass /tool/yocto/poky/meta/conf/distro/include/as-needed.inc /tool/yocto/meta-xilinx/conf/machine/include/tune-ppc440.inc /tool/yocto/poky/meta/conf/layer.conf /tool/yocto/poky/meta-yocto/conf/distro/poky.conf /tool/yocto/poky/meta/conf/documentation.conf /tool/yocto/poky/meta/classes/mirrors.bbclass /tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx.inc /tool/yocto/meta-openembedded/meta-oe/conf/layer.conf /tool/yocto/poky/meta/classes/utils.bbclass /tool/yocto/poky/meta/classes/insane.bbclass /tool/yocto/poky/meta/classes/devshell.bbclass /tool/yocto/poky/meta/classes/image-mklibs.bbclass /tool/yocto/poky/meta/classes/debian.bbclass /tool/yocto/poky/meta/conf/abi_version.conf /tool/yocto/poky/meta/conf/distro/include/default-versions.inc /tool/yocto/poky/meta/classes/staging.bbclass /tool/yocto/poky/meta/classes/logging.bbclass /tool/yocto/poky/meta/classes/module_strip.bbclass /tool/yocto/poky/meta/conf/bitbake.conf /tool/yocto/poky/meta/conf/sanity.conf /tool/yocto/poky/meta/classes/buildstats.bbclass /tool/yocto/poky/meta/classes/package.bbclass /tool/yocto/poky/meta/classes/terminal.bbclass /tool/yocto/poky/build/conf/local.conf /tool/yocto/poky/meta/classes/package_rpm.bbclass /tool/yocto/poky/build/conf/bblayers.conf /tool/yocto/poky/meta/conf/distro/include/tclibc-eglibc.inc /tool/yocto/poky/meta/classes/license.bbclass /tool/yocto/poky/meta/classes/sstate.bbclass /tool/yocto/meta-xilinx/classes/xilinx-utils.bbclass /tool/yocto/poky/meta-yocto/conf/layer.conf /tool/yocto/poky/meta/classes/linux-kernel-base.bbclass /tool/yocto/poky/meta/classes/kernel.bbclass /tool/yocto/poky/meta/classes/prserv.bbclass /tool/yocto/poky/meta/classes/image-prelink.bbclass /tool/yocto/meta-xilinx/classes/xilinx-kernel.bbclass /tool/yocto/meta-xilinx/conf/layer.conf /tool/yocto/poky/meta/conf/distro/include/tcmode-default.inc /tool/yocto/poky/meta/classes/cml1.bbclass /tool/yocto/poky/meta/classes/base.bbclass /tool/yocto/poky/meta/conf/distro/include/default-distrovars.inc /tool/yocto/poky/meta/conf/machine/include/powerpc/arch-powerpc.inc /tool/yocto/poky/meta/classes/packagedata.bbclass /tool/yocto/poky/meta/classes/deploy.bbclass /tool/yocto/poky/meta/conf/distro/include/default-providers.inc /tool/yocto/poky/meta/conf/distro/defaultsetup.conf /tool/yocto/poky/meta/classes/sanity.bbclass /tool/yocto/meta-xilinx/conf/machine/virtex5.conf /tool/yocto/poky/meta/classes/metadata_scm.bbclass"
# SDK_NAME=${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}
SDK_NAME="poky-eglibc-x86_64-powerpc"
# BB_HASHCONFIG_WHITELIST=${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD
BB_HASHCONFIG_WHITELIST="TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD"
# TMPDIR=/tool/yocto/poky/build/tmp
TMPDIR="/tool/yocto/poky/build/tmp"
# HOST_CC_ARCH=${TARGET_CC_ARCH}
HOST_CC_ARCH="-m32 -msoft-float -mcpu=440"
# ALLOW_EMPTY_linux-xilinx-dev=1
ALLOW_EMPTY_linux-xilinx-dev="1"
# CMDLINE_CONSOLE=console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}
export CMDLINE_CONSOLE="console=ttyS0"
# HOST_LD_KERNEL_ARCH=${TARGET_LD_KERNEL_ARCH}
# QEMU_OPTIONS_iwmmxt=-cpu pxa270-c5
QEMU_OPTIONS_iwmmxt="-cpu pxa270-c5"
# TUNE_PKGARCH_tune-powerpc=powerpc
TUNE_PKGARCH_tune-powerpc="powerpc"
# libexecdir=${exec_prefix}/libexec
export libexecdir="/usr/libexec"
# UBOOT_MACHINE=ml507_config
UBOOT_MACHINE="ml507_config"
# BB_BASEHASH_task-do_cleansstate=f63482664cc1b8cf3e9c7d4c5f4259d6
BB_BASEHASH_task-do_cleansstate="f63482664cc1b8cf3e9c7d4c5f4259d6"
# IMAGE_ROOTFS_SIZE=65536
IMAGE_ROOTFS_SIZE="65536"
# BB_MIN_VERSION=1.15.1
BB_MIN_VERSION="1.15.1"
# datadir_native=${prefix_native}/share
datadir_native="/usr/share"
# SDK_OS=${BUILD_OS}
SDK_OS="linux"
# GIT_CONFIG=${GIT_CONFIG_PATH}/gitconfig
GIT_CONFIG="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc/gitconfig"
# OE_TERMINAL_EXPORTS=XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES
OE_TERMINAL_EXPORTS="XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES"
# datadir=${prefix}/share
export datadir="/usr/share"
# KERNEL_CONSOLE=ttyS0
KERNEL_CONSOLE="ttyS0"
# STAGING_ETCDIR_NATIVE=${STAGING_DIR_NATIVE}${sysconfdir_native}
STAGING_ETCDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc"
# KERNEL_LD=${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}
KERNEL_LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# HOST_EXEEXT=
# PREFERRED_VERSION_eglibc-nativesdk=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-nativesdk="2.15"
# FILES_kernel-vmlinux=/boot/vmlinux*
FILES_kernel-vmlinux="/boot/vmlinux*"
# SUMMARY=${PN} version ${PV}-${PR}
SUMMARY="linux-xilinx version 3.3.0-r0"
# BB_BASEHASH_task-do_buildall=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_buildall="fdc376fd264c2fc126ec182f0a53ca8a"
# GPEPHONE_MIRROR=http://gpephone.linuxtogo.org/download/gpephone
GPEPHONE_MIRROR="http://gpephone.linuxtogo.org/download/gpephone"
# GPEPHONE_SVN=svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=${PN}
GPEPHONE_SVN="svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=linux-xilinx"
# BB_BASEHASH_task-do_cleanall=3ff415d56d194d5bcce15077948400a7
BB_BASEHASH_task-do_cleanall="3ff415d56d194d5bcce15077948400a7"
# ASSUME_PROVIDED=bzip2-native grep-native diffstat-native patch-native perl-native-runtime python-native-runtime subversion-native tar-native virtual/libintl-native
ASSUME_PROVIDED="bzip2-native grep-native diffstat-native patch-native perl-native-runtime python-native-runtime subversion-native tar-native virtual/libintl-native"
# LICSSTATEDIR=${WORKDIR}/license-destdir/
LICSSTATEDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/license-destdir/"
# ALL_MULTILIB_PACKAGE_ARCHS=${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}
ALL_MULTILIB_PACKAGE_ARCHS="all any noarch powerpc-nf ppc440 virtex5"
# BUILD_CXX=${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}
export BUILD_CXX="g++"
# CPU_FEATURES=
# UPDATECOMMAND_cvs=/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}
UPDATECOMMAND_cvs="/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
# IMAGE_ROOTFS=${WORKDIR}/rootfs
IMAGE_ROOTFS="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs"
# MKTEMPCMD=mktemp -q ${TMPBASE}
MKTEMPCMD="mktemp -q ${TMPBASE}"
# DATE=20120623
DATE="20120623"
# APACHE_MIRROR=http://www.apache.org/dist
APACHE_MIRROR="http://www.apache.org/dist"
# do_rootfs=None
# LD=${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}
export LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# HOST_VENDOR=${TARGET_VENDOR}
HOST_VENDOR="-poky"
# SRCREV_pn-${PN}=None
# ARCH=${@map_kernel_arch(d.getVar('TARGET_ARCH', True), d)}
export ARCH="powerpc"
# PREFERRED_PROVIDER_gdk-pixbuf=gdk-pixbuf
PREFERRED_PROVIDER_gdk-pixbuf="gdk-pixbuf"
# SSTATE_MANFILEBASE=${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-
SSTATE_MANFILEBASE="/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-"
# MACHINE_TASK_PROVIDER=${DEFAULT_TASK_PROVIDER}
MACHINE_TASK_PROVIDER="task-base"
# EXTRA_OEMAKE=
# HOSTLDFLAGS=${BUILD_LDFLAGS}
HOSTLDFLAGS="-L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
# LDFLAGS=${TARGET_LDFLAGS}
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
# HOST_NONSYSV=None
# bindir=${exec_prefix}/bin
export bindir="/usr/bin"
# SUMMARY_${PN}-dbg=None
# BUILDSTATS_BASE=${TMPDIR}/buildstats/
BUILDSTATS_BASE="/tool/yocto/poky/build/tmp/buildstats/"
# SYSVINIT_ENABLED_GETTYS=None
# TARGET_CXXFLAGS=${TARGET_CFLAGS} -fpermissive
export TARGET_CXXFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -fpermissive"
# BUILD_ARCH=${@os.uname()[4]}
BUILD_ARCH="x86_64"
# module_autoload_ipsec=ipsec
module_autoload_ipsec="ipsec"
# MAKE=make
export MAKE="make"
# KERNEL_CCSUFFIX=
# includedir=${exec_prefix}/include
export includedir="/usr/include"
# PREFERRED_VERSION_gcc=${GCCVERSION}
PREFERRED_VERSION_gcc="4.7%"
# BBFILE_PRIORITY_openembedded-layer=6
BBFILE_PRIORITY_openembedded-layer="6"
# RDEPENDS_kernel=kernel-base
RDEPENDS_kernel="kernel-base"
# FILES_${PN}-doc=None
# PRIORITY=optional
PRIORITY="optional"
# PARALLEL_MAKEINST=${PARALLEL_MAKE}
PARALLEL_MAKEINST="-j 6"
# SEPPUKU_QUERY=None
# BB_SETSCENE_VERIFY_FUNCTION=sysroot_checkhashes
BB_SETSCENE_VERIFY_FUNCTION="sysroot_checkhashes"
# SECTION=kernel
SECTION="kernel"
# SDK_CC_ARCH=${BUILD_CC_ARCH}
# MAINTAINER=Poky <poky@yoctoproject.org>
MAINTAINER="Poky <poky@yoctoproject.org>"
# do_package_write_ipk=None
# LIBCOVERRIDE=:libc-glibc
LIBCOVERRIDE=":libc-glibc"
# BUILD_LDFLAGS=-L${STAGING_LIBDIR_NATIVE} -L${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-O1
export BUILD_LDFLAGS="-L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
# STAGING_LIBDIR=${STAGING_DIR_HOST}${libdir}
STAGING_LIBDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib"
# TARGET_ARCH=${TUNE_ARCH}
unset TARGET_ARCH
# BBINCLUDELOGS_LINES=None
# BUILD_F77=${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}
export BUILD_F77="g77"
# module_conf_rfcomm=alias bt-proto-3 rfcomm
module_conf_rfcomm="alias bt-proto-3 rfcomm"
# LIBCEXTENSION=${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}
# ALLOW_EMPTY_${PN}-dbg=None
# QUILTRCFILE=${STAGING_ETCDIR_NATIVE}/quiltrc
QUILTRCFILE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc/quiltrc"
# BBLAYERS= /tool/yocto/poky/meta /tool/yocto/poky/meta-yocto /tool/yocto/meta-openembedded/meta-oe /tool/yocto/meta-xilinx
BBLAYERS="/tool/yocto/poky/meta /tool/yocto/poky/meta-yocto /tool/yocto/meta-openembedded/meta-oe /tool/yocto/meta-xilinx"
# BOOTSTRAP_EXTRA_RDEPENDS=
# PREFERRED_VERSION_linux-libc-headers-nativesdk=${LINUXLIBCVERSION}
PREFERRED_VERSION_linux-libc-headers-nativesdk="3.4"
# BUILD_LD=${BUILD_PREFIX}ld ${BUILD_LD_ARCH}
export BUILD_LD="ld"
# BUILD_SYS=${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}
BUILD_SYS="x86_64-linux"
# PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk=None
# module_conf_hci_uart=alias tty-ldisc-15 hci_uart
module_conf_hci_uart="alias tty-ldisc-15 hci_uart"
# QADEPENDS_virtclass-native=
# PREFERRED_PROVIDER_opkg-native=opkg-native
PREFERRED_PROVIDER_opkg-native="opkg-native"
# BB_BASEHASH_task-do_unpack=8c60b94fc30a2c885b22cc462347523a
BB_BASEHASH_task-do_unpack="8c60b94fc30a2c885b22cc462347523a"
# MACHINE_ESSENTIAL_EXTRA_RDEPENDS=
# PATCHDEPENDENCY=${PATCHTOOL}-native:do_populate_sysroot
PATCHDEPENDENCY="quilt-native:do_populate_sysroot"
# EXTRAOPKGCONFIG=poky-feed-config-opkg
EXTRAOPKGCONFIG="poky-feed-config-opkg"
# KERNEL_IMAGE_BASE_NAME=${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}
KERNEL_IMAGE_BASE_NAME="uImage-3.3.0-r0-virtex5-20120623074645"
# OEINCLUDELOGS=yes
OEINCLUDELOGS="yes"
# TUNEABI=None
# module_autoload_ircomm-tty=ircomm-tty
module_autoload_ircomm-tty="ircomm-tty"
# PREFERRED_PROVIDER_virtual/gettext=gettext
PREFERRED_PROVIDER_virtual/gettext="gettext"
# GPE_EXTRA_SVN=svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=${PN}
GPE_EXTRA_SVN="svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=linux-xilinx"
# oldincludedir=${exec_prefix}/include
export oldincludedir="/usr/include"
# TUNEVALID=None
# TUNECONFLICTS=None
# SERIAL_CONSOLE=115200 ttyUL0
SERIAL_CONSOLE="115200 ttyUL0"
# TIME=074645
TIME="074645"
# localstatedir_nativesdk=/var
localstatedir_nativesdk="/var"
# UPDATECOMMAND_svn=/usr/bin/env svn update ${SVNCOOPTS}
UPDATECOMMAND_svn="/usr/bin/env svn update ${SVNCOOPTS}"
# RRECOMMENDS_${PN}-dbg=None
# SEPPUKU_USER=None
# FEED_DEPLOYDIR_BASE_URI=None
# module_autoload_ipv6=ipv6
module_autoload_ipv6="ipv6"
# LIMIT_BUILT_LOCALES=POSIX en_US en_GB
LIMIT_BUILT_LOCALES="POSIX en_US en_GB"
# DESCRIPTION_${PN}-dbg=None
# EXTENDPRAUTO=${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}
# LANG=en_US.UTF-8
LANG="en_US.UTF-8"
# TUNE_FEATURES_tune-powerpc-nf=m32 fpu-soft
TUNE_FEATURES_tune-powerpc-nf="m32 fpu-soft"
# BUILD_CCLD=${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}
export BUILD_CCLD="gcc"
# SUMMARY_linux-xilinx-dev=${SUMMARY} - Development files
SUMMARY_linux-xilinx-dev="linux-xilinx version 3.3.0-r0 - Development files"
# DEBUG_FLAGS=-g -feliminate-unused-debug-types
DEBUG_FLAGS="-g -feliminate-unused-debug-types"
# B=${S}
B="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git"
# GROUP_fetcher=None
# SDK_NAME_PREFIX=oecore
SDK_NAME_PREFIX="oecore"
# BBPATH=/tool/yocto/poky/meta-yocto::/tool/yocto/poky/meta:/tool/yocto/meta-openembedded/meta-oe:/tool/yocto/meta-xilinx
BBPATH="/tool/yocto/poky/meta-yocto::/tool/yocto/poky/meta:/tool/yocto/meta-openembedded/meta-oe:/tool/yocto/meta-xilinx"
# RDEPENDS_${PN}-staticdev=None
# RPMCONF_HOST_BASE=${DEPLOY_DIR_RPM}/solvedb-sdk
RPMCONF_HOST_BASE="/tool/yocto/poky/build/tmp/deploy/rpm/solvedb-sdk"
# HOST_LD_ARCH=${TARGET_LD_ARCH}
# GROUP_dependencies=None
# BB_BASEHASH_task-do_populate_lic=d7189a1ecb6f83fc3182dcc0cdc435ed
BB_BASEHASH_task-do_populate_lic="d7189a1ecb6f83fc3182dcc0cdc435ed"
# BB_STRICT_CHECKSUM=1
BB_STRICT_CHECKSUM="1"
# PREMIRRORS=bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n
PREMIRRORS="bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
# BASE_LIB_tune-powerpc-nf=lib
BASE_LIB_tune-powerpc-nf="lib"
# RDEPENDS=
# PACKAGES=kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc kernel-devicetree
PACKAGES="kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc kernel-devicetree"
# EXCLUDE_FROM_WORLD_pn-clutter-box2d=1
EXCLUDE_FROM_WORLD_pn-clutter-box2d="1"
# TUNE_PKGARCH_tune-ppc440=ppc440
TUNE_PKGARCH_tune-ppc440="ppc440"
# BUILD_CPP=${BUILD_PREFIX}cpp ${BUILD_CC_ARCH}
export BUILD_CPP="cpp"
# HOMEPAGE=unknown
HOMEPAGE="unknown"
# SANITY_VERSION=1
SANITY_VERSION="1"
# DEPLOY_DIR_TOOLS=${DEPLOY_DIR}/tools
DEPLOY_DIR_TOOLS="/tool/yocto/poky/build/tmp/deploy/tools"
# LIC_FILES_CHKSUM=file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7
LIC_FILES_CHKSUM="file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
# LINKER_HASH_STYLE_mips=sysv
LINKER_HASH_STYLE_mips="sysv"
# ASNEEDED_pn-rpm=
# PKGWRITEDIRRPM=${WORKDIR}/deploy-rpms
PKGWRITEDIRRPM="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-rpms"
# STAGING_DATADIR_NATIVE=${STAGING_DIR_NATIVE}${datadir_native}
STAGING_DATADIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share"
# CPU_FEATURES_arm=vfp
CPU_FEATURES_arm="vfp"
# RESUMECOMMAND_wget=/usr/bin/env wget -c -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'
RESUMECOMMAND_wget="/usr/bin/env wget -c -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /tool/yocto/poky/build/downloads '${URI}'"
# TRANSLATED_TARGET_ARCH=${@d.getVar('TARGET_ARCH', True).replace("_", "-")}
TRANSLATED_TARGET_ARCH="powerpc"
# GPE_MIRROR=http://gpe.linuxtogo.org/download/source
GPE_MIRROR="http://gpe.linuxtogo.org/download/source"
# SRCREV_pn-linux-xilinx=None
# prefix_nativesdk=/usr
prefix_nativesdk="/usr"
# SSTATE_SCAN_CMD=find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f
SSTATE_SCAN_CMD="find ${SSTATE_BUILDDIR} \( -name \"*.la\" -o -name \"*-config\" -o -name \"*_config\" \) -type f"
# HANDHELDS_CVS=cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs
HANDHELDS_CVS="cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs"
# STAGING_BASE_LIBDIR_NATIVE=${STAGING_DIR_NATIVE}${base_libdir_native}
STAGING_BASE_LIBDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib"
# HOST_CC_KERNEL_ARCH=${TARGET_CC_KERNEL_ARCH}
# SSTATE_MANFILEPREFIX=${SSTATE_MANFILEBASE}${PN}
SSTATE_MANFILEPREFIX="/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-linux-xilinx"
# BOOTSTRAP_EXTRA_RRECOMMENDS=
# PREFERRED_VERSION_binutils-cross-canadian-powerpc=${BINUVERSION}
PREFERRED_VERSION_binutils-cross-canadian-powerpc="2.22"
# PREFERRED_VERSION_gzip-native=1.4
PREFERRED_VERSION_gzip-native="1.4"
# BB_BASEHASH_task-do_sizecheck=f6062040b95ca2a9c00e9fb8a7348a26
BB_BASEHASH_task-do_sizecheck="f6062040b95ca2a9c00e9fb8a7348a26"
# TOPDIR=/tool/yocto/poky/build
TOPDIR="/tool/yocto/poky/build"
# valid_archs=alpha cris ia64 i386 x86 m68knommu m68k ppc powerpc powerpc64 ppc64 sparc sparc64 arm arm26 m32r mips sh sh64 um h8300 parisc s390 v850 avr32 blackfin microblaze
valid_archs="alpha cris ia64 i386 x86 m68knommu m68k ppc powerpc powerpc64 ppc64 sparc sparc64 arm arm26 m32r mips sh sh64 um h8300 parisc s390 v850 avr32 blackfin microblaze"
# STAGING_BINDIR=${STAGING_DIR_HOST}${bindir}
STAGING_BINDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin"
# ALLOWED_FLAGS=-O -mcpu -march -pipe
ALLOWED_FLAGS="-O -mcpu -march -pipe"
# PREFERRED_PROVIDER_dbus-glib-native=dbus-glib-native
PREFERRED_PROVIDER_dbus-glib-native="dbus-glib-native"
# module_autoload_sa1100-rtc=sa1100-rtc
module_autoload_sa1100-rtc="sa1100-rtc"
# SUMMARY_${PN}-dev=None
# DEPLOYDIR=${WORKDIR}/deploy-${PN}
DEPLOYDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx"
# TUNEABI_OVERRIDE=None
# FILE_DIRNAME=${@os.path.dirname(d.getVar('FILE'))}
FILE_DIRNAME="/tool/yocto/meta-xilinx/recipes-kernel/linux"
# SOURCEFORGE_MIRROR=http://downloads.sourceforge.net
SOURCEFORGE_MIRROR="http://downloads.sourceforge.net"
# DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jDSKXc3TDe,guid=cb2f323eeab607aa04a9cd2f00000066
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-jDSKXc3TDe,guid=cb2f323eeab607aa04a9cd2f00000066"
# DEFAULTTUNE=ppc440
DEFAULTTUNE="ppc440"
# GLIBC_EXTRA_OECONF= ${@bb.utils.contains("TUNE_FEATURES", "ppc440", "-with-cpu=440", "", d)}
GLIBC_EXTRA_OECONF="-with-cpu=440"
# STAGING_EXECPREFIXDIR=${STAGING_DIR_HOST}${exec_prefix}
STAGING_EXECPREFIXDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial=None
# BUILD_CFLAGS=${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}
export BUILD_CFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-for-gcc=${TCLIBC}
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-for-gcc="eglibc"
# PSEUDO_LOCALSTATEDIR=${WORKDIR}/pseudo/
PSEUDO_LOCALSTATEDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pseudo/"
# EGLIBCVERSION=2.15
EGLIBCVERSION="2.15"
# OLDEST_KERNEL=2.6.16
OLDEST_KERNEL="2.6.16"
# PREFERRED_VERSION_python-native=2.7.3
PREFERRED_VERSION_python-native="2.7.3"
# SECTION_${PN}-doc=None
# XAUTHORITY=/home/elvis/.Xauthority
XAUTHORITY="/home/elvis/.Xauthority"
# AUTHOR=None
# BUILDSDK_LDFLAGS=-L${STAGING_LIBDIR} -Wl,-rpath-link,${STAGING_LIBDIR} -Wl,-rpath,${libdir} -Wl,-O1 -L${STAGING_DIR_HOST}${base_libdir} -Wl,-rpath-link,${STAGING_DIR_HOST}${base_libdir} -Wl,-rpath,${base_libdir} -Wl,-O1
BUILDSDK_LDFLAGS="-L/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib -Wl,-rpath,/usr/lib -Wl,-O1 -L/tool/yocto/poky/build/tmp/sysroots/virtex5/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/virtex5/lib -Wl,-rpath,/lib -Wl,-O1"
# FETCHCMD_wget=/usr/bin/env wget -t 2 -T 30 -nv --no-check-certificate
FETCHCMD_wget="/usr/bin/env wget -t 2 -T 30 -nv --no-check-certificate"
# GPG_AGENT_INFO=/tmp/keyring-MhCyXy/gpg:0:1
GPG_AGENT_INFO="/tmp/keyring-MhCyXy/gpg:0:1"
# POKY_DEFAULT_EXTRA_RDEPENDS=task-core-boot
POKY_DEFAULT_EXTRA_RDEPENDS="task-core-boot"
# CLASSOVERRIDE=class-target
CLASSOVERRIDE="class-target"
# SOLIBSDEV=.so
SOLIBSDEV=".so"
# FILES_${PN}-dev=None
# SEPPUKU_PRODUCT=None
# SHELL=/bin/bash
export SHELL="/bin/bash"
# USER_CLASSES=buildstats image-mklibs image-prelink
USER_CLASSES="buildstats image-mklibs image-prelink"
# MKTEMPDIRCMD=mktemp -d -q ${TMPBASE}
MKTEMPDIRCMD="mktemp -d -q ${TMPBASE}"
# BB_HASHCHECK_FUNCTION=sstate_checkhashes
BB_HASHCHECK_FUNCTION="sstate_checkhashes"
# SEPPUKU_LOGIN=None
# EXCLUDE_FROM_WORLD_pn-eds-tools=1
EXCLUDE_FROM_WORLD_pn-eds-tools="1"
# BB_BASEHASH_task-do_package_write_rpm=ae82ad7cff637a08e19a3617a11982f1
BB_BASEHASH_task-do_package_write_rpm="ae82ad7cff637a08e19a3617a11982f1"
# SOLIBS=.so.*
SOLIBS=".so.*"
# PROVIDES=${P} ${PF} ${PN} virtual/kernel
PROVIDES="linux-xilinx-3.3.0 linux-xilinx-3.3.0-r0 linux-xilinx virtual/kernel"
# PYTHON_BASEVERSION=2.7
PYTHON_BASEVERSION="2.7"
# PACKAGE_PREPROCESS_FUNCS= kernel_package_preprocess
PACKAGE_PREPROCESS_FUNCS="kernel_package_preprocess"
# do_package_write_tar=None
# docdir=${datadir}/doc
export docdir="/usr/share/doc"
# DISTRO_FEATURES=alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ${DISTRO_FEATURES_LIBC} largefile opengl${@oe.utils.distro_features_backfill(d)}
DISTRO_FEATURES="alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io largefile opengl pulseaudio"
# BB_BASEHASH_task-do_uboot_mkimage=aebf065abf71177df3e3627ec8e09d31
BB_BASEHASH_task-do_uboot_mkimage="aebf065abf71177df3e3627ec8e09d31"
# RESUMECOMMAND=ERROR, this must be a BitBake bug
RESUMECOMMAND="ERROR, this must be a BitBake bug"
# TARGET_CPU=440
TARGET_CPU="440"
# infodir=${datadir}/info
export infodir="/usr/share/info"
# BUILDCFG_HEADER=Build Configuration:
BUILDCFG_HEADER="Build Configuration:"
# DISTROOVERRIDES=${@d.getVar('DISTRO', True) or ''}
DISTROOVERRIDES="poky"
# COMMERCIAL_QT=
# base_prefix=
# KERNEL_RELEASE=${KERNEL_VERSION}
KERNEL_RELEASE="3.3.0-14.2-build1"
# CC=${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export CC="powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# THISDIR=${@os.path.dirname(d.getVar('FILE', True))}
THISDIR="/tool/yocto/meta-xilinx/recipes-kernel/linux"
# HGDIR=${CO_DIR}/hg
HGDIR="/tool/yocto/poky/build/downloads/hg"
# KERNEL_DEVICETREE_microblazeel=${@device_tree(bb.data.getVar('TARGET_CPU', d, 1), d)}
KERNEL_DEVICETREE_microblazeel="arch/440/boot/dts/system.dts"
# PREFERRED_VERSION_gcc-cross=${GCCVERSION}
PREFERRED_VERSION_gcc-cross="4.7%"
# BUILD_OS=${@os.uname()[0].lower()}
BUILD_OS="linux"
# IMAGE_FSTYPES=tar.gz
IMAGE_FSTYPES="tar.gz"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-binutils=binutils-cross
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-binutils="binutils-cross"
# FAKEROOTENV=PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0
FAKEROOTENV="PSEUDO_PREFIX=/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr PSEUDO_LOCALSTATEDIR=/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pseudo/ PSEUDO_PASSWD=/tool/yocto/poky/build/tmp/sysroots/virtex5 PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
# STAGING_LOADER_DIR=${STAGING_DIR_HOST}/loader
STAGING_LOADER_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/loader"
# SSTATE_PKG=${SSTATE_DIR}/${SSTATE_PKGNAME}
SSTATE_PKG="/tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}"
# DISTRO_EXTRA_RDEPENDS= ${POKY_DEFAULT_EXTRA_RDEPENDS}
DISTRO_EXTRA_RDEPENDS="task-core-boot"
# ASNEEDED_pn-dialer=
# BBFILE_PATTERN_xilinx=^/tool/yocto/meta-xilinx/
BBFILE_PATTERN_xilinx="^/tool/yocto/meta-xilinx/"
# ASNEEDED_pn-console-tools=
# ASNEEDED_pn-pulseaudio=
# ASNEEDED_pn-distcc=
# HOST_OS=${TARGET_OS}
HOST_OS="linux"
# D=${WORKDIR}/image
D="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image"
# TERM=xterm
export TERM="xterm"
# LAYER_CONF_VERSION=4
LAYER_CONF_VERSION="4"
# MULTIMACH_HOST_SYS=${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}
MULTIMACH_HOST_SYS="virtex5-poky-linux"
# TARGET_FPU=${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}
TARGET_FPU="soft"
# STAGING_DIR_NATIVE=${STAGING_DIR}/${BUILD_SYS}
STAGING_DIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux"
# GNU_MIRROR=ftp://ftp.gnu.org/gnu
GNU_MIRROR="ftp://ftp.gnu.org/gnu"
# DEPLOY_DIR=${TMPDIR}/deploy
DEPLOY_DIR="/tool/yocto/poky/build/tmp/deploy"
# DESCRIPTION_${PN}-staticdev=None
# ROOTFS_POSTINSTALL_COMMAND= license_create_manifest;
ROOTFS_POSTINSTALL_COMMAND="license_create_manifest;"
# MACHINE_EXTRA_RDEPENDS=
# MULTI_PROVIDER_WHITELIST=virtual/libintl virtual/libintl-native virtual/libintl-nativesdk virtual/xserver virtual/update-alternatives-native virtual/update-alternatives
MULTI_PROVIDER_WHITELIST="virtual/libintl virtual/libintl-native virtual/libintl-nativesdk virtual/xserver virtual/update-alternatives-native virtual/update-alternatives"
# KERNEL_OUTPUT=arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
KERNEL_OUTPUT="arch/powerpc/boot/uImage"
# SECTION_${PN}-staticdev=None
# ASNEEDED_pn-puzzles=
# SIGGEN_EXCLUDERECIPES_ABISAFE= sysvinit-inittab shadow-securetty opkg-config-base netbase formfactor xserver-xf86-config pointercal base-files keymaps pointercal-xinput systemd-serialgetty mplayer-common task-x11-server fbset-modes
SIGGEN_EXCLUDERECIPES_ABISAFE="sysvinit-inittab shadow-securetty opkg-config-base netbase formfactor xserver-xf86-config pointercal base-files keymaps pointercal-xinput systemd-serialgetty mplayer-common task-x11-server fbset-modes"
# STAMP=${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}
STAMP="/tool/yocto/poky/build/tmp/stamps/virtex5-poky-linux/linux-xilinx-3.3.0-r0"
# BBINCLUDELOGS=yes
BBINCLUDELOGS="yes"
# PREFERRED_PROVIDER_virtual/libintl=eglibc
PREFERRED_PROVIDER_virtual/libintl="eglibc"
# QA_LOGFILE=${TMPDIR}/qa.log
QA_LOGFILE="/tool/yocto/poky/build/tmp/qa.log"
# BUILDCFG_NEEDEDVARS=TARGET_ARCH TARGET_OS
BUILDCFG_NEEDEDVARS="TARGET_ARCH TARGET_OS"
# GCCVERSION=4.7%
GCCVERSION="4.7%"
# BASELIB_powerpc64=lib64
BASELIB_powerpc64="lib64"
# ERROR_QA=dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags
ERROR_QA="dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags"
# PREFERRED_PROVIDER_virtual/libgl=mesa-dri
PREFERRED_PROVIDER_virtual/libgl="mesa-dri"
# FILES_${PN}-staticdev=None
# CPPFLAGS=${TARGET_CPPFLAGS}
# QEMUIMAGETESTS=/tool/yocto/poky/scripts/qemuimage-tests
QEMUIMAGETESTS="/tool/yocto/poky/scripts/qemuimage-tests"
# VIRTUAL-RUNTIME_update-alternatives=update-alternatives-cworth
VIRTUAL-RUNTIME_update-alternatives="update-alternatives-cworth"
# SSTATE_MANMACH=virtex5
SSTATE_MANMACH="virtex5"
# PKGDATA_DIR=${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}
PKGDATA_DIR="/tool/yocto/poky/build/tmp/pkgdata/virtex5-poky-linux"
# sysconfdir_native=/etc
sysconfdir_native="/etc"
# XLIBS_MIRROR=http://xlibs.freedesktop.org/release
XLIBS_MIRROR="http://xlibs.freedesktop.org/release"
# SDK_ARCH=${BUILD_ARCH}
SDK_ARCH="x86_64"
# PREFERRED_PROVIDER_virtual/update-alternatives-native=opkg-native
PREFERRED_PROVIDER_virtual/update-alternatives-native="opkg-native"
# COREBASE=/tool/yocto/poky
COREBASE="/tool/yocto/poky"
# KERNEL_DEVICETREE=${@device_tree(bb.data.getVar('TARGET_ARCH', d, 1), d)}
KERNEL_DEVICETREE="arch/powerpc/boot/dts/virtex440-ml507.dts"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-intermediate=gcc-cross-intermediate
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-intermediate="gcc-cross-intermediate"
# DEPCHAIN_POST=-dev -dbg
DEPCHAIN_POST="-dev -dbg"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc=gcc-cross
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc="gcc-cross"
# KERNEL_VERSION=${@get_kernelversion('${B}')}
KERNEL_VERSION="3.3.0-14.2-build1"
# SSTATE_DIR=${TOPDIR}/sstate-cache
SSTATE_DIR="/tool/yocto/poky/build/sstate-cache"
# MACHINE_FEATURES=kernel26 apm ext2 vfat ethernet screen
MACHINE_FEATURES="kernel26 apm ext2 vfat ethernet screen"
# FILES_linux-xilinx-locale=${datadir}/locale
FILES_linux-xilinx-locale="/usr/share/locale"
# TCMODE=default
TCMODE="default"
# COMMON_LICENSE_DIR=${COREBASE}/meta/files/common-licenses
COMMON_LICENSE_DIR="/tool/yocto/poky/meta/files/common-licenses"
# RANLIB=${HOST_PREFIX}ranlib
export RANLIB="powerpc-poky-linux-ranlib"
# LOCALE_SECTION=
# RPMBUILD=rpmbuild
RPMBUILD="rpmbuild"
# LIBC_LOCALE_DEPENDENCIES= eglibc-localedata-i18n eglibc-gconv-ibm850 eglibc-gconv-cp1252 eglibc-gconv-iso8859-1 eglibc-gconv-iso8859-15
LIBC_LOCALE_DEPENDENCIES="eglibc-localedata-i18n eglibc-gconv-ibm850 eglibc-gconv-cp1252 eglibc-gconv-iso8859-1 eglibc-gconv-iso8859-15"
# LICENSE_DIRECTORY=${DEPLOY_DIR}/licenses
LICENSE_DIRECTORY="/tool/yocto/poky/build/tmp/deploy/licenses"
# RDEPENDS_kernel-base=kernel-image
RDEPENDS_kernel-base="kernel-image"
# STAGING_DIR_HOST=${STAGING_DIR}/${MACHINE}
STAGING_DIR_HOST="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# BB_BASEHASH_task-do_patch=f179638d5458dcbd8bf9440ce36a0da3
BB_BASEHASH_task-do_patch="f179638d5458dcbd8bf9440ce36a0da3"
# base_sbindir=${base_prefix}/sbin
export base_sbindir="/sbin"
# CXX=${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export CXX="powerpc-poky-linux-g++ -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# RPM=rpm
RPM="rpm"
# ASNEEDED_pn-icu=
# PREFERRED_PROVIDER_matchbox-panel=matchbox-panel-2
PREFERRED_PROVIDER_matchbox-panel="matchbox-panel-2"
# systemd_unitdir=${base_libdir}/systemd
export systemd_unitdir="/lib/systemd"
# OS=${TARGET_OS}
export OS="linux"
# MACHINE_ARCH=${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}
MACHINE_ARCH="virtex5"
# IMAGE_OVERHEAD_FACTOR=1.3
IMAGE_OVERHEAD_FACTOR="1.3"
# BINUVERSION=2.22
BINUVERSION="2.22"
# KBRANCH=master
KBRANCH="master"
# SDK_VENDOR=-pokysdk
SDK_VENDOR="-pokysdk"
# SDKPATHNATIVE=${SDKPATH}/sysroots/${SDK_SYS}
SDKPATHNATIVE="/opt/poky/1.2+snapshot/sysroots/x86_64-pokysdk-linux"
# PREFERRED_VERSION_eglibc-initial-nativesdk=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-initial-nativesdk="2.15"
# PREFERRED_PROVIDER_virtual/libiconv=eglibc
PREFERRED_PROVIDER_virtual/libiconv="eglibc"
# BB_BASEHASH_task-do_install=b6e539e9ffcf5d209e6994dd9eea199b
BB_BASEHASH_task-do_install="b6e539e9ffcf5d209e6994dd9eea199b"
# PREFERRED_VERSION_binutils-crosssdk=${BINUVERSION}
PREFERRED_VERSION_binutils-crosssdk="2.22"
# UBOOT_LOADADDRESS=0x00000000
UBOOT_LOADADDRESS="0x00000000"
# SDK_VERSION=1.2+snapshot
SDK_VERSION="1.2+snapshot"
# BUILD_VENDOR=
# KERNELORG_MIRROR=http://kernel.org/pub
KERNELORG_MIRROR="http://kernel.org/pub"
# WARN_QA=unsafe-references-in-binaries unsafe-references-in-scripts
WARN_QA="unsafe-references-in-binaries unsafe-references-in-scripts"
# PREFERRED_VERSION_gcc-runtime-nativesdk=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-runtime-nativesdk="4.7%"
# CONF_VERSION=1
CONF_VERSION="1"
# ALLOW_EMPTY_kernel=1
ALLOW_EMPTY_kernel="1"
# ASNEEDED=-Wl,--as-needed
ASNEEDED="-Wl,--as-needed"
# PKG_CONFIG_PATH=${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig
export PKG_CONFIG_PATH="/tool/yocto/poky/build/tmp/sysroots/virtex5//usr/lib/pkgconfig:/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/share/pkgconfig"
# PREFERRED_PROVIDER_gdb=gdb
PREFERRED_PROVIDER_gdb="gdb"
# BUILD_AS_ARCH=
# FILES=
# TCLIBC=eglibc
TCLIBC="eglibc"
# COLORTERM=gnome-terminal
COLORTERM="gnome-terminal"
# HOST_AS_ARCH=${TARGET_AS_ARCH}
# RRECOMMENDS_linux-xilinx-dbg=${PN} (= ${EXTENDPKGV})
RRECOMMENDS_linux-xilinx-dbg="linux-xilinx (= 3.3.0-r0)"
# RPMCONF_TARGET_BASE=${DEPLOY_DIR_RPM}/solvedb
RPMCONF_TARGET_BASE="/tool/yocto/poky/build/tmp/deploy/rpm/solvedb"
# BUILD_NM=${BUILD_PREFIX}nm
export BUILD_NM="nm"
# TARGET_VENDOR=-poky
TARGET_VENDOR="-poky"
# SANITY_TESTED_DISTROS= Yocto (Built by Poky 7.0) 1.2 \n Ubuntu 10.04.4 LTS \n Ubuntu 11.10 \n Ubuntu 12.04 LTS \n Fedora release 15 (Lovelock) \n Fedora release 16 (Verne) \n Fedora release 17 (Beefy Miracle) \n CentOS release 5.6 (Final) \n CentOS release 5.7 (Final) \n CentOS release 6.2 (Final) \n Debian GNU/Linux 6.0.4 (squeeze) \n openSUSE 11.4 \n openSUSE 12.1 \n
SANITY_TESTED_DISTROS="Yocto (Built by Poky 7.0) 1.2 \n Ubuntu 10.04.4 LTS \n Ubuntu 11.10 \n Ubuntu 12.04 LTS \n Fedora release 15 (Lovelock) \n Fedora release 16 (Verne) \n Fedora release 17 (Beefy Miracle) \n CentOS release 5.6 (Final) \n CentOS release 5.7 (Final) \n CentOS release 6.2 (Final) \n Debian GNU/Linux 6.0.4 (squeeze) \n openSUSE 11.4 \n openSUSE 12.1 \n"
# STAGING_BASELIBDIR=${STAGING_DIR_HOST}${base_libdir}
STAGING_BASELIBDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/lib"
# SUMMARY_linux-xilinx-staticdev=${SUMMARY} - Development files (Static Libraries)
SUMMARY_linux-xilinx-staticdev="linux-xilinx version 3.3.0-r0 - Development files (Static Libraries)"
# TUNE_FEATURES=${TUNE_FEATURES_tune-${DEFAULTTUNE}}
TUNE_FEATURES="m32 fpu-soft ppc440"
# POKYQEMUDEPS=${@base_contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "qemu-config",d)}
POKYQEMUDEPS="qemu-config"
# POKY_DEFAULT_EXTRA_RRECOMMENDS=kernel-module-af-packet
POKY_DEFAULT_EXTRA_RRECOMMENDS="kernel-module-af-packet"
# PREFERRED_VERSION_gcc-crosssdk=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-crosssdk="4.7%"
# SOLIBSDEV_darwin=.dylib
SOLIBSDEV_darwin=".dylib"
# TUNE_PKGARCH=${TUNE_PKGARCH_tune-${DEFAULTTUNE}}
TUNE_PKGARCH="ppc440"
# FETCHCOMMAND_wget=/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'
FETCHCOMMAND_wget="/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /tool/yocto/poky/build/downloads '${URI}'"
# PRINC=0
PRINC="0"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs=None
# TUNE_CCARGS= ${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)} ${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "", d)} ${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)} ${@bb.utils.contains("TUNE_FEATURES", "ppc440", "-mcpu=440", "", d)}
TUNE_CCARGS="-m32 -msoft-float -mcpu=440"
# module_conf_sco=alias bt-proto-2 sco
module_conf_sco="alias bt-proto-2 sco"
# IMAGE_LINK_NAME=${IMAGE_BASENAME}-${MACHINE}
IMAGE_LINK_NAME="linux-xilinx-virtex5"
# FETCHCMD_bzr=/usr/bin/env bzr
FETCHCMD_bzr="/usr/bin/env bzr"
# FILES_kernel-devicetree=/boot/devicetree*
FILES_kernel-devicetree="/boot/devicetree*"
# PREFERRED_PROVIDER_virtual/xserver-xf86=xserver-xorg
PREFERRED_PROVIDER_virtual/xserver-xf86="xserver-xorg"
# PKG_kernel-image=kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}
PKG_kernel-image="kernel-image-3.3.0-14.2-build1"
# BB_BASEHASH_task-do_deploy_setscene=129c9b0c76d09a14fa11cde93d07fd71
BB_BASEHASH_task-do_deploy_setscene="129c9b0c76d09a14fa11cde93d07fd71"
# QEMU_OPTIONS_armv7a=-cpu cortex-a8
QEMU_OPTIONS_armv7a="-cpu cortex-a8"
# SUMMARY_linux-xilinx-dbg=${SUMMARY} - Debugging files
SUMMARY_linux-xilinx-dbg="linux-xilinx version 3.3.0-r0 - Debugging files"
# MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS=
# PREFERRED_VERSION_eglibc=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc="2.15"
# PREFERRED_VERSION_gcc-cross-canadian-powerpc=${GCCVERSION}
PREFERRED_VERSION_gcc-cross-canadian-powerpc="4.7%"
# BB_BASEHASH_task-do_package=cc2d853fc6ecd45df98e0aa5abb80dbf
BB_BASEHASH_task-do_package="cc2d853fc6ecd45df98e0aa5abb80dbf"
# LOCALE_UTF8_ONLY=0
LOCALE_UTF8_ONLY="0"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-g++=gcc-cross
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-g++="gcc-cross"
# PREFERRED_PROVIDER_linux-libc-headers-nativesdk=linux-libc-headers-nativesdk
PREFERRED_PROVIDER_linux-libc-headers-nativesdk="linux-libc-headers-nativesdk"
# BB_BASEHASH_task-do_deploy=5937eb449d06c1447568dc43e5fa00c8
BB_BASEHASH_task-do_deploy="5937eb449d06c1447568dc43e5fa00c8"
# GNOME_MIRROR=http://ftp.gnome.org/pub/GNOME/sources
GNOME_MIRROR="http://ftp.gnome.org/pub/GNOME/sources"
# PREFERRED_VERSION_libgcc=${GCCVERSION}
PREFERRED_VERSION_libgcc="4.7%"
# SSTATE_PKGSPEC=sstate-${PN}-${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-
SSTATE_PKGSPEC="sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-"
# BB_BASEHASH_task-do_compile_kernelmodules=46adb5d9981936a7d500594b838e019c
BB_BASEHASH_task-do_compile_kernelmodules="46adb5d9981936a7d500594b838e019c"
# COMPATIBLE_HOST=None
# DEPLOY_DIR_IPK=${DEPLOY_DIR}/ipk
DEPLOY_DIR_IPK="/tool/yocto/poky/build/tmp/deploy/ipk"
# SSTATE_MANIFESTS=${TMPDIR}/sstate-control
SSTATE_MANIFESTS="/tool/yocto/poky/build/tmp/sstate-control"
# TUNE_PKGARCH_tune-powerpc-nf=powerpc-nf
TUNE_PKGARCH_tune-powerpc-nf="powerpc-nf"
# STAGING_FIRMWARE_DIR=${STAGING_DIR_HOST}/firmware
STAGING_FIRMWARE_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/firmware"
# BBFILES=/tool/yocto/poky/meta/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bbappend /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bb /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bbappend /tool/yocto/meta-xilinx/recipes-*/*/*.bb /tool/yocto/meta-xilinx/recipes-*/*/*.bbappend
BBFILES="/tool/yocto/poky/meta/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bbappend /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bb /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bbappend /tool/yocto/meta-xilinx/recipes-*/*/*.bb /tool/yocto/meta-xilinx/recipes-*/*/*.bbappend"
# AS=${HOST_PREFIX}as ${HOST_AS_ARCH}
export AS="powerpc-poky-linux-as"
# AR=${HOST_PREFIX}ar
export AR="powerpc-poky-linux-ar"
# PACKAGE_EXTRA_ARCHS_tune-powerpc=powerpc
PACKAGE_EXTRA_ARCHS_tune-powerpc="powerpc"
# PREFERRED_VERSION_linux-yocto=3.4%
PREFERRED_VERSION_linux-yocto="3.4%"
# BNFILE=${BUILDSTATS_BASE}/.buildname
BNFILE="/tool/yocto/poky/build/tmp/buildstats//.buildname"
# FILES_${PN}-locale=None
# bindir_nativesdk=${prefix_nativesdk}/bin
bindir_nativesdk="/usr/bin"
# PACKAGE_DEPENDS= rpm-native file-native pax-utils-native ${QADEPENDS}
PACKAGE_DEPENDS="rpm-native file-native pax-utils-native prelink-native"
# BUILD_CPPFLAGS=-isystem${STAGING_INCDIR_NATIVE}
export BUILD_CPPFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include"
# KERNEL_LOCALVERSION=
# PERSISTENT_DIR=${TMPDIR}/cache
PERSISTENT_DIR="/tool/yocto/poky/build/tmp/cache"
# QEMU_OPTIONS=
# do_package_write_deb=None
# ROOT_FLASH_SIZE=256
ROOT_FLASH_SIZE="256"
# RDEPENDS_linux-xilinx-staticdev=${PN}-dev (= ${EXTENDPKGV})
RDEPENDS_linux-xilinx-staticdev="linux-xilinx-dev (= 3.3.0-r0)"
# SDK_PACKAGE_ARCHS=all any noarch ${SDK_ARCH}-nativesdk
SDK_PACKAGE_ARCHS="all any noarch x86_64-nativesdk"
# CPP=${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}
export CPP="powerpc-poky-linux-gcc -E --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5 -m32 -msoft-float -mcpu=440"
# BBFILE_COLLECTIONS= normal yocto openembedded-layer xilinx
BBFILE_COLLECTIONS="normal yocto openembedded-layer xilinx"
# mandir=${datadir}/man
export mandir="/usr/share/man"
# SECTION_linux-xilinx-doc=doc
SECTION_linux-xilinx-doc="doc"
# PREFERRED_PROVIDER_opkg-nativesdk=opkg-nativesdk
PREFERRED_PROVIDER_opkg-nativesdk="opkg-nativesdk"
# FAKEROOTDIRS=${PSEUDO_LOCALSTATEDIR}
FAKEROOTDIRS="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pseudo/"
# FILES_linux-xilinx-bin=${bindir}/* ${sbindir}/*
FILES_linux-xilinx-bin="/usr/bin/* /usr/sbin/*"
# USE_PR_SERV=${@[1,0][((not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True))) and (not d.getVar('PRSERV_LOCKDOWN', True))]}
USE_PR_SERV="0"
# CCACHE=
# BB_BASEHASH_task-do_package_write_rpm_setscene=a83a2743f2c19c469c2cb36ad96cebf5
BB_BASEHASH_task-do_package_write_rpm_setscene="a83a2743f2c19c469c2cb36ad96cebf5"
# sbindir_native=${prefix_native}/sbin
sbindir_native="/usr/sbin"
# P=${PN}-${PV}
P="linux-xilinx-3.3.0"
# PKG_CONFIG_SYSROOT_DIR=${STAGING_DIR_HOST}
export PKG_CONFIG_SYSROOT_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# XILINX_BOARD=ml507
XILINX_BOARD="ml507"
# FILESPATH=${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}
FILESPATH="/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/"
# TUNE_ARCH=${@bb.utils.contains("TUNE_FEATURES", "m32", "powerpc", "", d)}
TUNE_ARCH="powerpc"
# QADEPENDS=prelink-native
QADEPENDS="prelink-native"
# WHITELIST_GPLv3=less
WHITELIST_GPLv3="less"
# E_SVN=svn://svn.enlightenment.org/svn/e
E_SVN="svn://svn.enlightenment.org/svn/e"
# BUILD_CXXFLAGS=${BUILD_CFLAGS} -fpermissive
export BUILD_CXXFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -fpermissive"
# OBJCOPY=${HOST_PREFIX}objcopy
export OBJCOPY="powerpc-poky-linux-objcopy"
# BB_BASEHASH_task-do_menuconfig=df9a8ccdf29b0f24998ae21d20c4b1b6
BB_BASEHASH_task-do_menuconfig="df9a8ccdf29b0f24998ae21d20c4b1b6"
# PREFERRED_VERSION_linux-yocto_qemux86-64=3.4%
PREFERRED_VERSION_linux-yocto_qemux86-64="3.4%"
# LCONF_VERSION=4
LCONF_VERSION="4"
# SRC_URI=git://git.xilinx.com/linux-xlnx.git;protocol=git;branch=${KBRANCH} file://defconfig
SRC_URI="git://git.xilinx.com/linux-xlnx.git;protocol=git;branch=master file://defconfig"
# SSTATEPOSTINSTFUNCS=
# includedir_native=${prefix_native}/include
includedir_native="/usr/include"
# SESSION_MANAGER=local/eos:@/tmp/.ICE-unix/4305,unix/eos:/tmp/.ICE-unix/4305
SESSION_MANAGER="local/eos:@/tmp/.ICE-unix/4305,unix/eos:/tmp/.ICE-unix/4305"
# BB_BASEHASH_task-do_savedefconfig=966cb95e43b6f4fff66d7854044a55b3
BB_BASEHASH_task-do_savedefconfig="966cb95e43b6f4fff66d7854044a55b3"
# SUMMARY_${PN}-doc=None
# PACKAGE_EXTRA_ARCHS_tune-powerpc-nf=powerpc-nf
PACKAGE_EXTRA_ARCHS_tune-powerpc-nf="powerpc-nf"
# FETCHCMD_hg=/usr/bin/env hg
FETCHCMD_hg="/usr/bin/env hg"
# TUNE_FEATURES_tune-powerpc=m32 fpu-hard
TUNE_FEATURES_tune-powerpc="m32 fpu-hard"
# ASNEEDED_pn-minimo=
# FILESDIR=${@bb.which(d.getVar('FILESPATH', True), '.')}
FILESDIR="/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/virtex5/."
# XILINX_BSP_PATH=/project/xilinx-ml507-workspace
XILINX_BSP_PATH="/project/xilinx-ml507-workspace"
# TUNE_FEATURES_tune-ppc440=m32 fpu-soft ppc440
TUNE_FEATURES_tune-ppc440="m32 fpu-soft ppc440"
# OELAYOUT_ABI=8
OELAYOUT_ABI="8"
# BBFILE_PRIORITY_xilinx=6
BBFILE_PRIORITY_xilinx="6"
# DISTRO_FEATURES_LIBC_DEFAULT=ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io
DISTRO_FEATURES_LIBC_DEFAULT="ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io"
# base_libdir_native=/lib
base_libdir_native="/lib"
# FETCHCOMMAND=ERROR, this must be a BitBake bug
FETCHCOMMAND="ERROR, this must be a BitBake bug"
# PKGR=${PR}${EXTENDPRAUTO}
PKGR="r0"
# XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
XDG_DATA_DIRS="/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/"
# includedir_nativesdk=${prefix_nativesdk}/include
includedir_nativesdk="/usr/include"
# LINKER_HASH_STYLE_mipsel=sysv
LINKER_HASH_STYLE_mipsel="sysv"
# IMAGE_PKGTYPE=rpm
IMAGE_PKGTYPE="rpm"
# FILES_${PN}-dbg=None
# servicedir=${base_prefix}/srv
export servicedir="/srv"
# INITRAMFS_IMAGE=
# bindir_native=${prefix_native}/bin
bindir_native="/usr/bin"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-compilerlibs=gcc-runtime
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-compilerlibs="gcc-runtime"
# BUILD_PREFIX=
# HOME=/home/elvis
export HOME="/home/elvis"
# SECTION_linux-xilinx-staticdev=devel
SECTION_linux-xilinx-staticdev="devel"
# SYSROOT_LOCK=${STAGING_DIR}/staging.lock
SYSROOT_LOCK="/tool/yocto/poky/build/tmp/sysroots/staging.lock"
# COMBINED_FEATURES=${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "ext2", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "vfat", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "irda", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pcmcia", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pci", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "wifi", d)}
COMBINED_FEATURES="ext2"
# PKGDESTWORK=${WORKDIR}/pkgdata
PKGDESTWORK="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pkgdata"
# BASE_LIB_tune-powerpc=lib
BASE_LIB_tune-powerpc="lib"
# SRCDATE=${DATE}
SRCDATE="20120623"
# SEPPUKU_PASS=None
# DEFAULT_PREFERENCE=1
DEFAULT_PREFERENCE="1"
# TARGET_CC_ARCH=${TUNE_CCARGS}
TARGET_CC_ARCH="-m32 -msoft-float -mcpu=440"
# QEMU_OPTIONS_armv6=-cpu arm1136
QEMU_OPTIONS_armv6="-cpu arm1136"
# HOST_ARCH=${TARGET_ARCH}
HOST_ARCH="powerpc"
# ENABLE_BINARY_LOCALE_GENERATION=1
ENABLE_BINARY_LOCALE_GENERATION="1"
# TARGET_OS=linux${LIBCEXTENSION}${ABIEXTENSION}
TARGET_OS="linux"
# SOURCE_MIRROR_URL=None
# SOLIBS_darwin8=.*.dylib
SOLIBS_darwin8=".*.dylib"
# SOLIBS_darwin9=.*.dylib
SOLIBS_darwin9=".*.dylib"
# PREFERRED_VERSION_u-boot=u-boot-xilinx
PREFERRED_VERSION_u-boot="u-boot-xilinx"
# CONNECTIVITY_CHECK_URIS=git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD https://eula-downloads.yoctoproject.org/index.php http://bugzilla.yoctoproject.org/report.cgi
CONNECTIVITY_CHECK_URIS="git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD https://eula-downloads.yoctoproject.org/index.php http://bugzilla.yoctoproject.org/report.cgi"
# ABIEXTENSION=
# TUNEABI_WHITELIST=None
# FULL_OPTIMIZATION=-O2 -pipe ${DEBUG_FLAGS}
FULL_OPTIMIZATION="-O2 -pipe -g -feliminate-unused-debug-types"
# TARGET_AS_ARCH=${TUNE_ASARGS}
# PREFERRED_VERSION_python=2.7.3
PREFERRED_VERSION_python="2.7.3"
# FILES_${PN}=None
# PREFERRED_VERSION_libgcc-nativesdk=${SDKGCCVERSION}
PREFERRED_VERSION_libgcc-nativesdk="4.7%"
# PATCHRESOLVE=noop
PATCHRESOLVE="noop"
# SSTATE_SCAN_FILES=*.la *-config *_config
SSTATE_SCAN_FILES="*.la *-config *_config"
# LGPLv2_WHITELIST_GPLv3=libassuan gnutls libtasn1 libidn libgcc gcc-runtime
LGPLv2_WHITELIST_GPLv3="libassuan gnutls libtasn1 libidn libgcc gcc-runtime"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial=None
# DISTRO_FEATURES_LIBC_virtclass-nativesdk=${DISTRO_FEATURES_LIBC_DEFAULT}
DISTRO_FEATURES_LIBC_virtclass-nativesdk="ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io"
# DISTRO_NAME=Yocto (Built by Poky 7.0)
DISTRO_NAME="Yocto (Built by Poky 7.0)"
# FREEBSD_MIRROR=ftp://ftp.freebsd.org/pub/FreeBSD/
FREEBSD_MIRROR="ftp://ftp.freebsd.org/pub/FreeBSD/"
# PREFERRED_VERSION_binutils-cross=${BINUVERSION}
PREFERRED_VERSION_binutils-cross="2.22"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils=None
# HOST_PREFIX=${TARGET_PREFIX}
HOST_PREFIX="powerpc-poky-linux-"
# module_autoload_hidp=hidp
module_autoload_hidp="hidp"
# LC_ALL=C
export LC_ALL="C"
# PKGD=${WORKDIR}/package
PKGD="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/package"
# PKGE=${@['','${PE\x7d'][d.getVar('PE',1) > 0]}
# HOST_SYS=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}
HOST_SYS="powerpc-poky-linux"
# SSTATETASKNAMES=deploy deploy-rpm populate-lic package populate-sysroot
SSTATETASKNAMES="deploy deploy-rpm populate-lic package populate-sysroot"
# PKGV=${PV}
PKGV="3.3.0"
# TARGET_CPPFLAGS=
# BBFILE_PATTERN_yocto=^/tool/yocto/poky/meta-yocto/
BBFILE_PATTERN_yocto="^/tool/yocto/poky/meta-yocto/"
# PCMCIA_MANAGER=pcmciautils
PCMCIA_MANAGER="pcmciautils"
# PREFERRED_PROVIDER_opkg=opkg
PREFERRED_PROVIDER_opkg="opkg"
# TUNE_ASARGS=
# FILE=/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx_3.3.0.bb
FILE="/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx_3.3.0.bb"
# EXTENDPKGEVER=${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}
# KERNEL_CC=${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}
KERNEL_CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# PREFERRED_PROVIDER_dbus-glib=dbus-glib
PREFERRED_PROVIDER_dbus-glib="dbus-glib"
# exec_prefix=/usr
export exec_prefix="/usr"
# bindir_crossscripts=${bindir}/crossscripts
bindir_crossscripts="/usr/bin/crossscripts"
# KERNEL_LDSUFFIX=
# IMAGE_DEVICE_TABLES=files/device_table-minimal.txt files/device_table_add-xsa.txt
IMAGE_DEVICE_TABLES="files/device_table-minimal.txt files/device_table_add-xsa.txt"
# PREFERRED_VERSION_binutils=${BINUVERSION}
PREFERRED_VERSION_binutils="2.22"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-initial=${TCLIBC}-initial
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-initial="eglibc-initial"
# SDKPATH=/opt/${DISTRO}/${SDK_VERSION}
SDKPATH="/opt/poky/1.2+snapshot"
# GROUP_locale=None
# module_autoload_rfcomm=rfcomm
module_autoload_rfcomm="rfcomm"
# SSTATE_PKGNAME=${SSTATE_PKGSPEC}${BB_TASKHASH}
SSTATE_PKGNAME="sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}"
# STAGING_INCDIR=${STAGING_DIR_HOST}${includedir}
STAGING_INCDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/include"
# BUILD_RANLIB=${BUILD_PREFIX}ranlib
export BUILD_RANLIB="ranlib"
# FETCHCMD_cvs=/usr/bin/env cvs
FETCHCMD_cvs="/usr/bin/env cvs"
# DESKTOP_SESSION=ubuntu
DESKTOP_SESSION="ubuntu"
# PKGWRITEDIRSRPM=${DEPLOY_DIR}/sources/deploy-srpm
PKGWRITEDIRSRPM="/tool/yocto/poky/build/tmp/deploy/sources/deploy-srpm"
# COMPATIBLE_MACHINE=(virtex4|virtex5|virtex5mb|spartan6-sp605|spartan6-lx9mb)
COMPATIBLE_MACHINE="(virtex4|virtex5|virtex5mb|spartan6-sp605|spartan6-lx9mb)"
# PREFERRED_PROVIDER_libgcc=libgcc
PREFERRED_PROVIDER_libgcc="libgcc"
# GENTOO_MIRROR=http://distfiles.gentoo.org/distfiles
GENTOO_MIRROR="http://distfiles.gentoo.org/distfiles"
# CO_DIR=${DL_DIR}
CO_DIR="/tool/yocto/poky/build/downloads"
# MULTIMACH_TARGET_SYS=${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
MULTIMACH_TARGET_SYS="virtex5-poky-linux"
# BB_BASEHASH_task-do_populate_lic_setscene=3bdcbad02cc5fbfdbf0709766880eac2
BB_BASEHASH_task-do_populate_lic_setscene="3bdcbad02cc5fbfdbf0709766880eac2"
# DESCRIPTION_linux-xilinx-dev=${DESCRIPTION} This package contains symbolic links, header files, and related items necessary for software development.
DESCRIPTION_linux-xilinx-dev="Linux kernel for Xilinx platforms This package contains symbolic links, header files, and related items necessary for software development."
# ALLOW_EMPTY_kernel-image=1
ALLOW_EMPTY_kernel-image="1"
# HOSTTOOLS_WHITELIST_GPLv3=
# TUNE_LDARGS=
# baselib=${BASELIB}
baselib="lib"
# SSTATE_VERSION=2
SSTATE_VERSION="2"
# PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}=None
# BB_ENV_EXTRAWHITE=PSEUDO_BUILD PSEUDO_DISABLED MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER SCREENDIR
BB_ENV_EXTRAWHITE="PSEUDO_BUILD PSEUDO_DISABLED MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER SCREENDIR"
# KERNEL_IMAGETYPE_FOR_MAKE=${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}
KERNEL_IMAGETYPE_FOR_MAKE="uImage"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++=None
# PREFERRED_VERSION_gcc-crosssdk-intermediate=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-crosssdk-intermediate="4.7%"
# PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}=None
# BUILDSDK_CPPFLAGS=-isystem${STAGING_INCDIR}
BUILDSDK_CPPFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/include"
# AVAILTUNES= powerpc powerpc-nf ppc440
AVAILTUNES="powerpc powerpc-nf ppc440"
# BB_SIGNATURE_EXCLUDE_FLAGS=doc defaultval _append _prepend deps depends lockfiles type vardepsexclude vardeps vardepvalue file-checksums python func task export unexport noexec nostamp dirs cleandirs sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask recrdeptask nodeprrecs stamp-base stamp-extra-info
BB_SIGNATURE_EXCLUDE_FLAGS="doc defaultval _append _prepend deps depends lockfiles type vardepsexclude vardeps vardepvalue file-checksums python func task export unexport noexec nostamp dirs cleandirs sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask recrdeptask nodeprrecs stamp-base stamp-extra-info"
# BB_HASHBASE_WHITELIST=TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE
BB_HASHBASE_WHITELIST="TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE"
# module_conf_bluez=alias net-pf-31 bluez
module_conf_bluez="alias net-pf-31 bluez"
# DESCRIPTION_linux-xilinx-dbg=${DESCRIPTION} This package contains ELF symbols and related sources for debugging purposes.
DESCRIPTION_linux-xilinx-dbg="Linux kernel for Xilinx platforms This package contains ELF symbols and related sources for debugging purposes."
# E_MIRROR=http://download.enlightenment.org/releases
E_MIRROR="http://download.enlightenment.org/releases"
# KERNEL_DEVICETREE_FLAGS=-R 8 -p 0x3000
KERNEL_DEVICETREE_FLAGS="-R 8 -p 0x3000"
# FETCHCMD_svn=/usr/bin/env svn
FETCHCMD_svn="/usr/bin/env svn"
# PREFERRED_PROVIDER_virtual/kernel=linux-xilinx
PREFERRED_PROVIDER_virtual/kernel="linux-xilinx"
# BB_BASEHASH_task-do_listtasks=1ad35dec4c57727e67231fbe9f8e453b
BB_BASEHASH_task-do_listtasks="1ad35dec4c57727e67231fbe9f8e453b"
# BB_BASEHASH_task-do_package_write=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_package_write="fdc376fd264c2fc126ec182f0a53ca8a"
# sysconfdir=${base_prefix}/etc
export sysconfdir="/etc"
# FILES_kernel-image=/boot/${KERNEL_IMAGETYPE}*
FILES_kernel-image="/boot/uImage*"
# CCLD=${CC}
export CCLD="powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# CHECKCOMMAND_wget=/usr/bin/env wget --spider -t 2 -T 30 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'
CHECKCOMMAND_wget="/usr/bin/env wget --spider -t 2 -T 30 --passive-ftp --no-check-certificate -P /tool/yocto/poky/build/downloads '${URI}'"
# QAPATHTEST=None
# SELECTED_OPTIMIZATION=${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD', True) == '1'], True)}
SELECTED_OPTIMIZATION="-O2 -pipe -g -feliminate-unused-debug-types"
# GIT_CONFIG_PATH=${STAGING_DIR_NATIVE}/etc
GIT_CONFIG_PATH="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc"
# ASNEEDED_pn-openobex=
# SDKGCCVERSION=${GCCVERSION}
SDKGCCVERSION="4.7%"
# DEBIAN_NAMES=1
DEBIAN_NAMES="1"
# DISTRO_EXTRA_RRECOMMENDS= ${POKY_DEFAULT_EXTRA_RRECOMMENDS}
DISTRO_EXTRA_RRECOMMENDS="kernel-module-af-packet"
# PACKAGEINDEXDEPS= rpm-native:do_populate_sysroot createrepo-native:do_populate_sysroot
PACKAGEINDEXDEPS="rpm-native:do_populate_sysroot createrepo-native:do_populate_sysroot"
# PREFERRED_VERSION_linux-yocto_qemuarm=3.4%
PREFERRED_VERSION_linux-yocto_qemuarm="3.4%"
# PREFERRED_VERSION_linux-yocto_qemuppc=3.4%
PREFERRED_VERSION_linux-yocto_qemuppc="3.4%"
# KERNEL_ALT_IMAGETYPE=
# QA_LOG=None
# PACKAGELOCK=${STAGING_DIR}/package-output.lock
PACKAGELOCK="/tool/yocto/poky/build/tmp/sysroots/package-output.lock"
# IMAGE_NAME=${IMAGE_BASENAME}-${MACHINE}-${DATETIME}
IMAGE_NAME="linux-xilinx-virtex5-20120623074645"
# STAGING_DIR_TCBOOTSTRAP=${STAGING_DIR_TARGET}-tcbootstrap
STAGING_DIR_TCBOOTSTRAP="/tool/yocto/poky/build/tmp/sysroots/virtex5-tcbootstrap"
# STAGING_LIBDIR_NATIVE=${STAGING_DIR_NATIVE}${libdir_native}
STAGING_LIBDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib"
# QEMU_TARGETS=arm i386 mips mipsel ppc x86_64
QEMU_TARGETS="arm i386 mips mipsel ppc x86_64"
# GROUP_packaging=None
# DESCRIPTION=Linux kernel for Xilinx platforms
DESCRIPTION="Linux kernel for Xilinx platforms"
# OVERRIDES=${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable${LIBCOVERRIDE}
OVERRIDES="linux:powerpc:build-linux:pn-linux-xilinx:virtex5:poky:class-target:forcevariable:libc-glibc"
# INHERIT= ${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_INSANE} ${INHERIT_DISTRO} sanity
INHERIT="package_rpm buildstats image-mklibs image-prelink insane debian devshell sstate license sanity"
# BB_BASEHASH_task-do_devshell=aa48d219cbda3f32c9b16c048e5ff62e
BB_BASEHASH_task-do_devshell="aa48d219cbda3f32c9b16c048e5ff62e"
# TARGET_LD_ARCH=${TUNE_LDARGS}
# SDK_SYS=${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}
SDK_SYS="x86_64-pokysdk-linux"
# base_dep=def base_dep_prepend(d):
# #
# # Ideally this will check a flag so we will operate properly in
# # the case where host == build == target, for now we don't work in
# # that case though.
# #
#
# deps = ""
# # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# # we need that built is the responsibility of the patch function / class, not
# # the application.
# if not d.getVar('INHIBIT_DEFAULT_DEPS'):
# if (d.getVar('HOST_SYS', True) !=
# d.getVar('BUILD_SYS', True)):
# deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
# return deps
#
base_dep="def base_dep_prepend(d): \
# \
# Ideally this will check a flag so we will operate properly in \
# the case where host == build == target, for now we don't work in \
# that case though. \
# \
\
deps = \"\" \
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not \
# we need that built is the responsibility of the patch function / class, not \
# the application. \
if not d.getVar('INHIBIT_DEFAULT_DEPS'): \
if (d.getVar('HOST_SYS', True) != \
d.getVar('BUILD_SYS', True)): \
deps += \" virtual/powerpc-poky-linux-gcc virtual/powerpc-poky-linux-compilerlibs virtual/libc \" \
return deps"
# module_autoload_rtc-sa1100=rtc-sa1100
module_autoload_rtc-sa1100="rtc-sa1100"
# ASSUME_SHLIBS=None
# base_libdir=${base_prefix}/${baselib}
export base_libdir="/lib"
# BASELIB=lib
BASELIB="lib"
# BUILD_OPTIMIZATION=-O2 -pipe
BUILD_OPTIMIZATION="-O2 -pipe"
# UBOOT_ENTRYPOINT=0x00000000
UBOOT_ENTRYPOINT="0x00000000"
# PACKAGEINDEXES= package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};
PACKAGEINDEXES="package_update_index_rpm; createrepo /tool/yocto/poky/build/tmp/deploy/rpm;"
# BPN=${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}
BPN="linux-xilinx"
# LOGNAME=elvis
export LOGNAME="elvis"
# PATH=${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:/tool/yocto/poky/scripts:/tool/yocto/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
export PATH="/tool/yocto/poky/scripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/ppc440-poky-linux:/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux//bin:/tool/yocto/poky/scripts:/tool/yocto/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
# ASNEEDED_pn-pciutils=
# TARGET_CFLAGS=${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}
export TARGET_CFLAGS="-O2 -pipe -g -feliminate-unused-debug-types"
# base_bindir=${base_prefix}/bin
export base_bindir="/bin"
# BUILDCFG_FUNCS=buildcfg_vars get_layers_branch_rev buildcfg_neededvars
BUILDCFG_FUNCS="buildcfg_vars get_layers_branch_rev buildcfg_neededvars"
# PKG_CONFIG_LIBDIR=${PKG_CONFIG_DIR}
export PKG_CONFIG_LIBDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5//usr/lib/pkgconfig"
# SANITY_REQUIRED_UTILITIES=patch diffstat texi2html makeinfo svn bzip2 tar gzip gawk chrpath wget cpio
SANITY_REQUIRED_UTILITIES="patch diffstat texi2html makeinfo svn bzip2 tar gzip gawk chrpath wget cpio"
# SEPPUKU_COMPONENT=None
# BBFILE_PRIORITY_normal=5
BBFILE_PRIORITY_normal="5"
# MACHINE=virtex5
unset MACHINE
# TARGET_LD_KERNEL_ARCH=
# GITDIR=${CO_DIR}/git2
GITDIR="/tool/yocto/poky/build/downloads/git2"
# EXCLUDE_FROM_WORLD_pn-gobject-introspection=1
EXCLUDE_FROM_WORLD_pn-gobject-introspection="1"
# MACHINEOVERRIDES=${MACHINE}
MACHINEOVERRIDES="virtex5"
# prefix_native=/usr
prefix_native="/usr"
# BBFILE_PRIORITY_yocto=5
BBFILE_PRIORITY_yocto="5"
# SECTION_${PN}-dev=None
# base_sbindir_native=/sbin
base_sbindir_native="/sbin"
# ALLOW_EMPTY_kernel-base=1
ALLOW_EMPTY_kernel-base="1"
# sbindir=${exec_prefix}/sbin
export sbindir="/usr/sbin"
# CFLAGS=${TARGET_CFLAGS}
export CFLAGS="-O2 -pipe -g -feliminate-unused-debug-types"
# BB_BASEHASH_task-do_populate_sysroot=b7753f1df384ebc522204f2bca9baabb
BB_BASEHASH_task-do_populate_sysroot="b7753f1df384ebc522204f2bca9baabb"
# BUILD_AR=${BUILD_PREFIX}ar
export BUILD_AR="ar"
# BUILD_AS=${BUILD_PREFIX}as ${BUILD_AS_ARCH}
export BUILD_AS="as"
# SHLIBSDIR=${STAGING_DIR_HOST}/shlibs
SHLIBSDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/shlibs"
# sharedstatedir=${base_prefix}/com
export sharedstatedir="/com"
# FILES_linux-xilinx=${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers
FILES_linux-xilinx="/usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* /etc /com /var /bin/* /sbin/* /lib/*.so.* /usr/share/linux-xilinx /usr/lib/linux-xilinx/* /usr/share/pixmaps /usr/share/applications /usr/share/idl /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers"
# COMMERCIAL_AUDIO_PLUGINS=
# DEBIAN_MIRROR=ftp://ftp.debian.org/debian/pool
DEBIAN_MIRROR="ftp://ftp.debian.org/debian/pool"
# PREFERRED_PROVIDER_virtual/libc=eglibc
PREFERRED_PROVIDER_virtual/libc="eglibc"
# DEVFILE=${BUILDSTATS_BASE}/.device
DEVFILE="/tool/yocto/poky/build/tmp/buildstats//.device"
# DEFAULT_TASK_PROVIDER=task-base
DEFAULT_TASK_PROVIDER="task-base"
# PREFERRED_VERSION_uclibc-initial=${UCLIBCVERSION}
PREFERRED_VERSION_uclibc-initial="0.9.33"
# BBFILE_PATTERN_openembedded-layer=^/tool/yocto/meta-openembedded/meta-oe/
BBFILE_PATTERN_openembedded-layer="^/tool/yocto/meta-openembedded/meta-oe/"
# BB_BASEHASH_task-do_configure=9347e52b8b7eef509e108752d35aa92e
BB_BASEHASH_task-do_configure="9347e52b8b7eef509e108752d35aa92e"
# VIRTUAL-RUNTIME_apm=apm
VIRTUAL-RUNTIME_apm="apm"
# IMAGE_LINGUAS=en-us en-gb
IMAGE_LINGUAS="en-us en-gb"
# KERNEL_IMAGE_SYMLINK_NAME=${KERNEL_IMAGETYPE}-${MACHINE}
KERNEL_IMAGE_SYMLINK_NAME="uImage-virtex5"
# PREFERRED_PROVIDER_virtual/libc-nativesdk=eglibc-nativesdk
PREFERRED_PROVIDER_virtual/libc-nativesdk="eglibc-nativesdk"
# PARALLEL_MAKE=-j 6
PARALLEL_MAKE="-j 6"
# PACKAGE_EXTRA_ARCHS=${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}
PACKAGE_EXTRA_ARCHS="powerpc-nf ppc440"
# PREFERRED_PROVIDER_virtual/libiconv-nativesdk=eglibc-nativesdk
PREFERRED_PROVIDER_virtual/libiconv-nativesdk="eglibc-nativesdk"
# PREFERRED_VERSION_linux-libc-headers=${LINUXLIBCVERSION}
PREFERRED_VERSION_linux-libc-headers="3.4"
# KERNEL_TARGET=440-ml507
KERNEL_TARGET="440-ml507"
# PREFERRED_VERSION_liberation-fonts=1.04
PREFERRED_VERSION_liberation-fonts="1.04"
# OBJDUMP=${HOST_PREFIX}objdump
export OBJDUMP="powerpc-poky-linux-objdump"
# INHERIT_DISTRO=debian devshell sstate license
INHERIT_DISTRO="debian devshell sstate license"
# IMAGE_BASENAME=${PN}
IMAGE_BASENAME="linux-xilinx"
# PATCHTOOL=quilt
PATCHTOOL="quilt"
# XORG_MIRROR=http://xorg.freedesktop.org/releases
XORG_MIRROR="http://xorg.freedesktop.org/releases"
# SYSROOT_DESTDIR=${WORKDIR}/sysroot-destdir/
SYSROOT_DESTDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir/"
# FILES_kernel-dev=/boot/System.map* /boot/Module.symvers* /boot/config*
FILES_kernel-dev="/boot/System.map* /boot/Module.symvers* /boot/config*"
# BB_BASEHASH_task-do_checkuri=4de07276512afa6485487cc4e3c3489a
BB_BASEHASH_task-do_checkuri="4de07276512afa6485487cc4e3c3489a"
# UCLIBCVERSION=0.9.33
UCLIBCVERSION="0.9.33"
# CROSS_COMPILE=${TARGET_PREFIX}
export CROSS_COMPILE="powerpc-poky-linux-"
# SPECIAL_PKGSUFFIX=-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian
SPECIAL_PKGSUFFIX="-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian"
# DESCRIPTION_${PN}-doc=None
# BUILD_EXEEXT=
# PREFERRED_VERSION_elfutils=0.148
PREFERRED_VERSION_elfutils="0.148"
# DL_DIR=${TOPDIR}/downloads
DL_DIR="/tool/yocto/poky/build/downloads"
# BB_BASEHASH_task-do_checkuriall=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_checkuriall="fdc376fd264c2fc126ec182f0a53ca8a"
# IMAGE_ROOTFS_EXTRA_SPACE=0
IMAGE_ROOTFS_EXTRA_SPACE="0"
# BB_BASEHASH_task-do_compile=3cac88de5a688f2684eb1f92fd7386e1
BB_BASEHASH_task-do_compile="3cac88de5a688f2684eb1f92fd7386e1"
# PR=r0
PR="r0"
# PV=${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}
PV="3.3.0"
# HOST_EXTRACFLAGS=${BUILD_CFLAGS} ${BUILD_LDFLAGS}
HOST_EXTRACFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
# SDK_PREFIX=${SDK_SYS}-
SDK_PREFIX="x86_64-pokysdk-linux-"
# module_conf_bnep=alias bt-proto-4 bnep
module_conf_bnep="alias bt-proto-4 bnep"
# PKGDEST=${WORKDIR}/packages-split
PKGDEST="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/packages-split"
# BB_BASEHASH_task-do_fetch=d2142b2ebff99a629535445acf830fe7
BB_BASEHASH_task-do_fetch="d2142b2ebff99a629535445acf830fe7"
# PF=${PN}-${EXTENDPE}${PV}-${PR}
PF="linux-xilinx-3.3.0-r0"
# STAGING_BINDIR_NATIVE=${STAGING_DIR_NATIVE}${bindir_native}
STAGING_BINDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin"
# MACHINE_EXTRA_RECOMMENDS=kernel-modules
MACHINE_EXTRA_RECOMMENDS="kernel-modules"
# RDEPENDS_linux-xilinx-dev=${PN} (= ${EXTENDPKGV})
RDEPENDS_linux-xilinx-dev="linux-xilinx (= 3.3.0-r0)"
# FAKEROOTNOENV=PSEUDO_UNLOAD=1
FAKEROOTNOENV="PSEUDO_UNLOAD=1"
# DISTRO=poky
unset DISTRO
# PACKAGEVARS=FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME
PACKAGEVARS="FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME"
# DISTRO_VERSION=1.2+snapshot-${DATE}
DISTRO_VERSION="1.2+snapshot-20120623"
# S=${WORKDIR}/git
S="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git"
# KERNEL_IMAGETYPE=uImage
KERNEL_IMAGETYPE="uImage"
# FILES_kernel-misc=/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media
FILES_kernel-misc="/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
# STAGING_KERNEL_DIR=${STAGING_DIR_HOST}/kernel
STAGING_KERNEL_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/kernel"
# PREFERRED_PROVIDER_linux-libc-headers=linux-libc-headers
PREFERRED_PROVIDER_linux-libc-headers="linux-libc-headers"
# BB_BASEHASH_task-do_clean=0ef69b495b4727a19258e1bbd5534551
BB_BASEHASH_task-do_clean="0ef69b495b4727a19258e1bbd5534551"
# MLPREFIX=
# ADOBE_MIRROR=http://fpdownload.macromedia.com/get/flashplayer/current/
ADOBE_MIRROR="http://fpdownload.macromedia.com/get/flashplayer/current/"
# IPK_FEED_URIS=None
# PKG_CONFIG_DIR=${STAGING_DIR_HOST}/${libdir}/pkgconfig
export PKG_CONFIG_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5//usr/lib/pkgconfig"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc=None
# TARGET_LDFLAGS=-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}
export TARGET_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
# IMAGE_PREPROCESS_COMMAND= mklibs_optimize_image; prelink_image;
IMAGE_PREPROCESS_COMMAND="mklibs_optimize_image; prelink_image;"
# SRCREV=ed63a4d76efadcb68f5776e4244766ffea226cc4
SRCREV="ed63a4d76efadcb68f5776e4244766ffea226cc4"
# DEBIANRDEP=do_package
DEBIANRDEP="do_package"
# TARGET_SYS=${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', True), ''][d.getVar('TARGET_OS', True) == ('' or 'custom')]}
TARGET_SYS="powerpc-poky-linux"
# PREFERRED_PROVIDER_virtual/libc-locale=eglibc-locale
PREFERRED_PROVIDER_virtual/libc-locale="eglibc-locale"
# DEPLOY_DIR_TAR=${DEPLOY_DIR}/tar
DEPLOY_DIR_TAR="/tool/yocto/poky/build/tmp/deploy/tar"
# FILES_linux-xilinx-staticdev=${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a
FILES_linux-xilinx-staticdev="/usr/lib/*.a /lib/*.a /usr/lib/linux-xilinx/*.a"
# PKG_CONFIG_DISABLE_UNINSTALLED=yes
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
# DESCRIPTION_${PN}-dev=None
# PACKAGERDEPTASK=do_package_write
PACKAGERDEPTASK="do_package_write"
# LINKER_HASH_STYLE_mips64el=sysv
LINKER_HASH_STYLE_mips64el="sysv"
# DESCRIPTION_linux-xilinx-doc=${DESCRIPTION} This package contains documentation.
DESCRIPTION_linux-xilinx-doc="Linux kernel for Xilinx platforms This package contains documentation."
# libdir=${exec_prefix}/${baselib}
export libdir="/usr/lib"
# SEPPUKU_NEWREPORT=None
# FILES_linux-xilinx-doc=${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc ${datadir}/gnome/help
FILES_linux-xilinx-doc="/usr/share/doc /usr/share/man /usr/share/info /usr/share/gtk-doc /usr/share/gnome/help"
# ALLOW_EMPTY_${PN}-dev=None
# ASNEEDED_pn-xserver-kdrive-xomap=
# PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-initial-nativesdk=${TCLIBC}-initial-nativesdk
PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-initial-nativesdk="eglibc-initial-nativesdk"
# METADATA_BRANCH=${@base_detect_branch(d)}
METADATA_BRANCH="master"
# PREFERRED_VERSION_gcc-crosssdk-initial=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-crosssdk-initial="4.7%"
# SYSROOT_PREPROCESS_FUNCS=
# PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk=None
# SEPPUKU_ATTACHMENT=None
# DEPLOY_DIR_IMAGE=${DEPLOY_DIR}/images
DEPLOY_DIR_IMAGE="/tool/yocto/poky/build/tmp/deploy/images"
# BB_DEFAULT_TASK=build
BB_DEFAULT_TASK="build"
# PSEUDO_DISABLED=1
export PSEUDO_DISABLED="1"
# SRCREV_pn-u-boot-xilinx=${AUTOREV}
SRCREV_pn-u-boot-xilinx="AUTOINC"
# PACKAGE_CLASSES=package_rpm
PACKAGE_CLASSES="package_rpm"
# PREFERRED_VERSION_linux-yocto_qemux86=3.4%
PREFERRED_VERSION_linux-yocto_qemux86="3.4%"
# EXTRA_IMAGE_FEATURES=debug-tweaks
EXTRA_IMAGE_FEATURES="debug-tweaks"
# TOOLCHAIN_OPTIONS= --sysroot=${STAGING_DIR_TARGET}
TOOLCHAIN_OPTIONS="--sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# LIBC_DEPENDENCIES=libsegfault eglibc eglibc-dbg eglibc-dev eglibc-utils eglibc-thread-db ${@get_libc_locales_dependencies(d)}
LIBC_DEPENDENCIES="libsegfault eglibc eglibc-dbg eglibc-dev eglibc-utils eglibc-thread-db eglibc-localedata-i18n eglibc-gconv-ibm850 eglibc-gconv-cp1252 eglibc-gconv-iso8859-1 eglibc-gconv-iso8859-15"
# BB_NUMBER_THREADS=6
BB_NUMBER_THREADS="6"
# OE_TERMINAL=auto
OE_TERMINAL="auto"
# PYTHON=${@sys.executable}
PYTHON="/usr/bin/python"
# CACHE=/tool/yocto/poky/build/tmp/cache/default-eglibc/virtex5
CACHE="/tool/yocto/poky/build/tmp/cache/default-eglibc/virtex5"
# PREFERRED_PROVIDER_virtual/libx11=libx11-trim
PREFERRED_PROVIDER_virtual/libx11="libx11-trim"
# TARGET_PREFIX=${TARGET_SYS}-
TARGET_PREFIX="powerpc-poky-linux-"
# SRCPV=${@bb.fetch2.get_srcrev(d)}
SRCPV="1+ed63a4d76efadcb68f5776e4244766ffea226cc4"
# _task_deps={'noexec': {'do_package_write': '1', 'do_build': '1'}, 'tasks': ['do_patch', 'do_populate_sysroot', 'do_populate_sysroot_setscene', 'do_listtasks', 'do_clean', 'do_checkuri', 'do_checkuriall', 'do_fetchall', 'do_buildall', 'do_fetch', 'do_unpack', 'do_configure', 'do_compile', 'do_install', 'do_build', 'do_cleansstate', 'do_cleanall', 'do_package', 'do_package_setscene', 'do_package_write', 'do_package_write_rpm_setscene', 'do_package_write_rpm', 'do_devshell', 'do_populate_lic', 'do_populate_lic_setscene', 'do_deploy_setscene', 'do_compile_kernelmodules', 'do_savedefconfig', 'do_menuconfig', 'do_sizecheck', 'do_uboot_mkimage', 'do_deploy'], 'rdeptask': {'do_package_write_rpm': 'do_package'}, 'recrdeptask': {'do_buildall': 'do_build', 'do_checkuriall': 'do_checkuri', 'do_fetchall': 'do_fetch', 'do_build': ' do_deploy do_package_write'}, 'umask': {'do_install': 18, 'do_configure': 18, 'do_package': 18, 'do_populate_sysroot': '022', 'do_compile': 18, 'do_package_write_rpm': '022'}, 'depends': {'do_menuconfig': ' ncurses-native:do_populate_sysroot', 'do_install': ' virtual/fakeroot-native:do_populate_sysroot', 'do_configure': ' ', 'do_package_write_rpm': ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot', 'do_fetch': ' git-native:do_populate_sysroot', 'do_patch': 'quilt-native:do_populate_sysroot', 'do_package': ' virtual/fakeroot-native:do_populate_sysroot rpm-native:do_populate_sysroot file-native:do_populate_sysroot pax-utils-native:do_populate_sysroot prelink-native:do_populate_sysroot'}, 'fakeroot': {'do_install': 1, 'do_package_setscene': 1, 'do_package_write_rpm': 1, 'do_package': 1, 'do_package_write_rpm_setscene': 1}, 'parents': {'do_configure': ['do_patch', 'do_unpack'], 'do_package': ['do_populate_lic', 'do_install'], 'do_package_write': ['do_package_write_rpm', 'do_package'], 'do_savedefconfig': ['do_configure'], 'do_fetchall': ['do_fetch'], 'do_compile': ['do_configure'], 'do_cleanall': ['do_cleansstate'], 'do_checkuri': [], 'do_unpack': ['do_fetch'], 'do_menuconfig': ['do_configure'], 'do_populate_lic': ['do_patch'], 'do_build': ['do_deploy', 'do_package_write', 'do_package', 'do_populate_sysroot'], 'do_fetch': [], 'do_devshell': ['do_patch'], 'do_populate_sysroot': ['do_install'], 'do_populate_sysroot_setscene': [], 'do_uboot_mkimage': ['do_compile'], 'do_checkuriall': ['do_checkuri'], 'do_install': ['do_uboot_mkimage', 'do_sizecheck', 'do_compile_kernelmodules', 'do_compile'], 'do_populate_lic_setscene': [], 'do_listtasks': [], 'do_clean': [], 'do_patch': ['do_unpack'], 'do_deploy': ['do_install'], 'do_compile_kernelmodules': ['do_compile'], 'do_buildall': ['do_build'], 'do_package_setscene': [], 'do_package_write_rpm': ['do_package'], 'do_deploy_setscene': [], 'do_package_write_rpm_setscene': [], 'do_sizecheck': ['do_compile'], 'do_cleansstate': ['do_clean']}, 'deptask': {'do_configure': 'do_populate_sysroot', 'do_package': ' do_package'}, 'nostamp': {'do_menuconfig': '1', 'do_savedefconfig': '1', 'do_listtasks': '1', 'do_devshell': '1', 'do_clean': '1', 'do_cleanall': '1', 'do_checkuri': '1', 'do_checkuriall': '1'}}
_task_deps="{'noexec': {'do_package_write': '1', 'do_build': '1'}, 'tasks': ['do_patch', 'do_populate_sysroot', 'do_populate_sysroot_setscene', 'do_listtasks', 'do_clean', 'do_checkuri', 'do_checkuriall', 'do_fetchall', 'do_buildall', 'do_fetch', 'do_unpack', 'do_configure', 'do_compile', 'do_install', 'do_build', 'do_cleansstate', 'do_cleanall', 'do_package', 'do_package_setscene', 'do_package_write', 'do_package_write_rpm_setscene', 'do_package_write_rpm', 'do_devshell', 'do_populate_lic', 'do_populate_lic_setscene', 'do_deploy_setscene', 'do_compile_kernelmodules', 'do_savedefconfig', 'do_menuconfig', 'do_sizecheck', 'do_uboot_mkimage', 'do_deploy'], 'rdeptask': {'do_package_write_rpm': 'do_package'}, 'recrdeptask': {'do_buildall': 'do_build', 'do_checkuriall': 'do_checkuri', 'do_fetchall': 'do_fetch', 'do_build': ' do_deploy do_package_write'}, 'umask': {'do_install': 18, 'do_configure': 18, 'do_package': 18, 'do_populate_sysroot': '022', 'do_compile': 18, 'do_package_write_rpm': '022'}, 'depends': {'do_menuconfig': ' ncurses-native:do_populate_sysroot', 'do_install': ' virtual/fakeroot-native:do_populate_sysroot', 'do_configure': ' ', 'do_package_write_rpm': ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot', 'do_fetch': ' git-native:do_populate_sysroot', 'do_patch': 'quilt-native:do_populate_sysroot', 'do_package': ' virtual/fakeroot-native:do_populate_sysroot rpm-native:do_populate_sysroot file-native:do_populate_sysroot pax-utils-native:do_populate_sysroot prelink-native:do_populate_sysroot'}, 'fakeroot': {'do_install': 1, 'do_package_setscene': 1, 'do_package_write_rpm': 1, 'do_package': 1, 'do_package_write_rpm_setscene': 1}, 'parents': {'do_configure': ['do_patch', 'do_unpack'], 'do_package': ['do_populate_lic', 'do_install'], 'do_package_write': ['do_package_write_rpm', 'do_package'], 'do_savedefconfig': ['do_configure'], 'do_fetchall': ['do_fetch'], 'do_compile': ['do_configure'], 'do_cleanall': ['do_cleansstate'], 'do_checkuri': [], 'do_unpack': ['do_fetch'], 'do_menuconfig': ['do_configure'], 'do_populate_lic': ['do_patch'], 'do_build': ['do_deploy', 'do_package_write', 'do_package', 'do_populate_sysroot'], 'do_fetch': [], 'do_devshell': ['do_patch'], 'do_populate_sysroot': ['do_install'], 'do_populate_sysroot_setscene': [], 'do_uboot_mkimage': ['do_compile'], 'do_checkuriall': ['do_checkuri'], 'do_install': ['do_uboot_mkimage', 'do_sizecheck', 'do_compile_kernelmodules', 'do_compile'], 'do_populate_lic_setscene': [], 'do_listtasks': [], 'do_clean': [], 'do_patch': ['do_unpack'], 'do_deploy': ['do_install'], 'do_compile_kernelmodules': ['do_compile'], 'do_buildall': ['do_build'], 'do_package_setscene': [], 'do_package_write_rpm': ['do_package'], 'do_deploy_setscene': [], 'do_package_write_rpm_setscene': [], 'do_sizecheck': ['do_compile'], 'do_cleansstate': ['do_clean']}, 'deptask': {'do_configure': 'do_populate_sysroot', 'do_package': ' do_package'}, 'nostamp': {'do_menuconfig': '1', 'do_savedefconfig': '1', 'do_listtasks': '1', 'do_devshell': '1', 'do_clean': '1', 'do_cleanall': '1', 'do_checkuri': '1', 'do_checkuriall': '1'}}"
# PSEUDO_BUILD=0
PSEUDO_BUILD="0"
# FILES_SOLIBSDEV=${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}
FILES_SOLIBSDEV="/lib/lib*.so /usr/lib/lib*.so"
# HOST_LOADLIBES=-lncurses
HOST_LOADLIBES="-lncurses"
# BB_BASEHASH_task-do_populate_sysroot_setscene=3bdcbad02cc5fbfdbf0709766880eac2
BB_BASEHASH_task-do_populate_sysroot_setscene="3bdcbad02cc5fbfdbf0709766880eac2"
# PREFERRED_PROVIDER_virtual/update-alternatives=update-alternatives-cworth
PREFERRED_PROVIDER_virtual/update-alternatives="update-alternatives-cworth"
# DOTDEBUG-dbg=${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${BPN}/.debug ${libdir}/matchbox-panel/.debug /usr/src/debug
DOTDEBUG-dbg="/usr/bin/.debug /usr/sbin/.debug /usr/libexec/.debug /usr/lib/.debug /bin/.debug /sbin/.debug /lib/.debug /usr/lib/linux-xilinx/.debug /usr/lib/matchbox-panel/.debug /usr/src/debug"
# PACKAGE_ARCHS=all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}
PACKAGE_ARCHS="all any noarch powerpc-nf ppc440 virtex5"
# PACKAGE_ARCH=${MACHINE_ARCH}
PACKAGE_ARCH="virtex5"
# EXTRA_OECONF=
# SHLIBSWORKDIR=${WORKDIR}/shlibs
SHLIBSWORKDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/shlibs"
# PRAUTOINX=${PF}
PRAUTOINX="linux-xilinx-3.3.0-r0"
# BUILD_LD_ARCH=
# BB_BASEHASH_task-do_fetchall=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_fetchall="fdc376fd264c2fc126ec182f0a53ca8a"
# RPROVIDES=
# RPMDEPS=${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt
RPMDEPS="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/rpmdeps-oecore --macros /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/macros --define '_rpmfc_magic_path /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share/misc/magic.mgc' --rpmpopt /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/rpmpopt"
# base_libdir_nativesdk=/lib
base_libdir_nativesdk="/lib"
# PACKAGEFUNCS=package_get_auto_pr perform_packagecopy ${PACKAGE_PREPROCESS_FUNCS} package_do_split_locales split_and_strip_files fixup_perms populate_packages package_do_filedeps package_do_shlibs package_do_pkgconfig read_shlibdeps package_depchains emit_pkgdata do_package_qa
PACKAGEFUNCS="package_get_auto_pr perform_packagecopy kernel_package_preprocess package_do_split_locales split_and_strip_files fixup_perms populate_packages package_do_filedeps package_do_shlibs package_do_pkgconfig read_shlibdeps package_depchains emit_pkgdata do_package_qa"
# PWD=/tool/yocto/poky/build
export PWD="/tool/yocto/poky/build"
# BZRDIR=${CO_DIR}/bzr
BZRDIR="/tool/yocto/poky/build/downloads/bzr"
# GPE_SVN=svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=${PN}
GPE_SVN="svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=linux-xilinx"
# EXTENDPKGV=${EXTENDPKGEVER}${PKGV}-${PKGR}
EXTENDPKGV="3.3.0-r0"
# PREFERRED_PROVIDER_virtual/db-native=db-native
PREFERRED_PROVIDER_virtual/db-native="db-native"
# BB_VERSION=1.15.2
BB_VERSION="1.15.2"
# SSTATETASKS=do_deploy do_package_write_rpm do_populate_lic do_package do_populate_sysroot
SSTATETASKS="do_deploy do_package_write_rpm do_populate_lic do_package do_populate_sysroot"
# SOLIBS_darwin=.*.dylib
SOLIBS_darwin=".*.dylib"
# PREFERRED_PROVIDER_virtual/db=db
PREFERRED_PROVIDER_virtual/db="db"
# BP=${BPN}-${PV}
BP="linux-xilinx-3.3.0"
# BBFILE_PATTERN_normal=^/tool/yocto/poky/meta/
BBFILE_PATTERN_normal="^/tool/yocto/poky/meta/"
# PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-for-gcc-nativesdk=${TCLIBC}-nativesdk
PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-for-gcc-nativesdk="eglibc-nativesdk"
# module_conf_af_packet=alias net-pf-17 af_packet
module_conf_af_packet="alias net-pf-17 af_packet"
# DEBUGFILEDIRECTORY-dbg=/usr/lib/debug /usr/src/debug
DEBUGFILEDIRECTORY-dbg="/usr/lib/debug /usr/src/debug"
# PREFERRED_VERSION_uclibc=${UCLIBCVERSION}
PREFERRED_VERSION_uclibc="0.9.33"
# PREFERRED_PROVIDER_xf86-video-intel=xf86-video-intel
PREFERRED_PROVIDER_xf86-video-intel="xf86-video-intel"
# module_conf_l2cap=alias bt-proto-0 l2cap
module_conf_l2cap="alias bt-proto-0 l2cap"
# BB_GENERATE_MIRROR_TARBALLS=0
BB_GENERATE_MIRROR_TARBALLS="0"
# SOURCE_MIRROR_FETCH=None
# PSEUDO_PASSWD=${STAGING_DIR_TARGET}
PSEUDO_PASSWD="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# T=${WORKDIR}/temp
T="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp"
# LINKER_HASH_STYLE_mips64=sysv
LINKER_HASH_STYLE_mips64="sysv"
# COMMERCIAL_VIDEO_PLUGINS=
# BUILD_CC_ARCH=
# PREFERRED_VERSION=None
# LINUXLIBCVERSION=3.4
LINUXLIBCVERSION="3.4"
# SUMMARY_${PN}-staticdev=None
# SECTION_linux-xilinx-dev=devel
SECTION_linux-xilinx-dev="devel"
# FILES_${PN}-bin=None
# BB_BASEHASH_task-do_build=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_build="fdc376fd264c2fc126ec182f0a53ca8a"
# MIRRORS=ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ${DEBIAN_MIRROR}/main http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool/ \n ${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.hr.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.fi.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.hk.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.hu.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.ie.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.it.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.jp.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.no.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.pl.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.ro.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.si.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.es.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool \n ${GNU_MIRROR} ftp://mirrors.kernel.org/gnu \n ${KERNELORG_MIRROR} http://www.kernel.org/pub \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/ \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/ \n ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ \n ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnutls.org/pub/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://josefsson.org/gnutls/releases/ \n http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tau.ac.il/pub/unix/admin/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.kaizo.org/pub/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n http://www.apache.org/dist http://archive.apache.org/dist \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://sources.openembedded.org/ \n svn://.*/.* http://sources.openembedded.org/ \n git://.*/.* http://sources.openembedded.org/ \n hg://.*/.* http://sources.openembedded.org/ \n bzr://.*/.* http://sources.openembedded.org/ \n svk://.*/.* http://sources.openembedded.org/ \n p4://.*/.* http://sources.openembedded.org/ \n osc://.*/.* http://sources.openembedded.org/ \n https?$://.*/.* http://sources.openembedded.org/ \n ftp://.*/.* http://sources.openembedded.org/ \n
MIRRORS="ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ftp://ftp.debian.org/debian/pool/main http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool/ \n ftp://ftp.debian.org/debian/pool ftp://ftp.de.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.au.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.cl.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.hr.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.fi.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.hk.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.hu.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.ie.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.it.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.jp.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.no.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.pl.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.ro.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.si.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.es.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.se.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.tr.debian.org/debian/pool \n ftp://ftp.gnu.org/gnu ftp://mirrors.kernel.org/gnu \n http://kernel.org/pub http://www.kernel.org/pub \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/ \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/ \n ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ \n ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnutls.org/pub/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://josefsson.org/gnutls/releases/ \n http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tau.ac.il/pub/unix/admin/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.kaizo.org/pub/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n http://www.apache.org/dist http://archive.apache.org/dist \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://sources.openembedded.org/ \n svn://.*/.* http://sources.openembedded.org/ \n git://.*/.* http://sources.openembedded.org/ \n hg://.*/.* http://sources.openembedded.org/ \n bzr://.*/.* http://sources.openembedded.org/ \n svk://.*/.* http://sources.openembedded.org/ \n p4://.*/.* http://sources.openembedded.org/ \n osc://.*/.* http://sources.openembedded.org/ \n https?$://.*/.* http://sources.openembedded.org/ \n ftp://.*/.* http://sources.openembedded.org/ \n"
# LOG_DIR=${TMPDIR}/log
LOG_DIR="/tool/yocto/poky/build/tmp/log"
# DEPCHAIN_PRE=
# GNOME_GIT=git://git.gnome.org
GNOME_GIT="git://git.gnome.org"
# NO32LIBS=1
NO32LIBS="1"
# PACKAGE_EXTRA_ARCHS_tune-ppc440=${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} ppc440
PACKAGE_EXTRA_ARCHS_tune-ppc440="powerpc-nf ppc440"
# PREFERRED_PROVIDER_gzip-native=pigz-native
PREFERRED_PROVIDER_gzip-native="pigz-native"
# _=/tool/yocto/poky/scripts/bitbake
_="/tool/yocto/poky/scripts/bitbake"
# PREFERRED_VERSION_u-boot_virtex5=None
# PREFERRED_PROVIDER_virtual/xserver=xserver-xorg
PREFERRED_PROVIDER_virtual/xserver="xserver-xorg"
# SPDXLICENSEMAP=None
# PN=${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}
PN="linux-xilinx"
# FREEDESKTOP_CVS=cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs
FREEDESKTOP_CVS="cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
# SANITY_ABIFILE=${TMPDIR}/abi_version
SANITY_ABIFILE="/tool/yocto/poky/build/tmp/abi_version"
# DEBUG_OPTIMIZATION=-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe
DEBUG_OPTIMIZATION="-O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe"
# libdir_native=${prefix_native}/lib
libdir_native="/usr/lib"
# MACHINE_EXTRA_RRECOMMENDS=
# PATCH_GET=0
export PATCH_GET="0"
# SITE_CONF_VERSION=1
SITE_CONF_VERSION="1"
# CXXFLAGS=${TARGET_CXXFLAGS} -fvisibility-inlines-hidden
export CXXFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden"
# RDEPENDS_${PN}-dev=None
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate=None
# DISPLAY=:0
DISPLAY=":0"
# NM=${HOST_PREFIX}nm
export NM="powerpc-poky-linux-nm"
# SEPPUKU_ADDCOMMENT=None
# DEPENDS= virtual/powerpc-poky-linux-gcc kmod-native virtual/powerpc-poky-linux-gcc update-modules u-boot-mkimage-native dtc-native
DEPENDS="virtual/powerpc-poky-linux-gcc kmod-native virtual/powerpc-poky-linux-gcc update-modules u-boot-mkimage-native dtc-native"
# PREFERRED_PROVIDER_virtual/fakeroot-native=pseudo-native
PREFERRED_PROVIDER_virtual/fakeroot-native="pseudo-native"
# TARGET_LINK_HASH_STYLE=${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}
TARGET_LINK_HASH_STYLE="-Wl,--hash-style=gnu"
# DISTRO_FEATURES_BACKFILL=pulseaudio
DISTRO_FEATURES_BACKFILL="pulseaudio"
# AUTO_LIBNAME_PKGS=${PACKAGES}
AUTO_LIBNAME_PKGS="kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc kernel-devicetree"
# WORKDIR=${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}
WORKDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0"
# BUILDSDK_CFLAGS=${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION}
BUILDSDK_CFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/include -O2 -pipe"
# SECTION_linux-xilinx-dbg=devel
SECTION_linux-xilinx-dbg="devel"
# F77=${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export F77="powerpc-poky-linux-g77 -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# DISTRO_FEATURES_LIBC=${DISTRO_FEATURES_LIBC_DEFAULT}
DISTRO_FEATURES_LIBC="ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io"
# SDK_AS_ARCH=${BUILD_AS_ARCH}
# GNOME_KEYRING_PID=4294
GNOME_KEYRING_PID="4294"
# BB_HASHFILENAME=${SSTATE_PKGNAME}
BB_HASHFILENAME="sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}"
# SSTATE_PKGARCH=${PACKAGE_ARCH}
SSTATE_PKGARCH="virtex5"
# METADATA_REVISION=${@base_detect_revision(d)}
METADATA_REVISION="b876f42821383bf0069ee49b607ba06614417fba"
# UBOOT_ARCH=${@map_uboot_arch(d.getVar('ARCH', True), d)}
export UBOOT_ARCH="ppc"
# EXTRA_IMAGEDEPENDS= u-boot-xilinx
EXTRA_IMAGEDEPENDS="u-boot-xilinx"
# BUILD_STRIP=${BUILD_PREFIX}strip
export BUILD_STRIP="strip"
# libdir_nativesdk=${prefix_nativesdk}/lib
libdir_nativesdk="/usr/lib"
# BB_BASEHASH_task-do_package_setscene=79b3a3c162c8fd538cfa409bb9455043
BB_BASEHASH_task-do_package_setscene="79b3a3c162c8fd538cfa409bb9455043"
# SDK_LD_ARCH=${BUILD_LD_ARCH}
# TCLIBCAPPEND=
# STAGING_DIR=${TMPDIR}/sysroots
STAGING_DIR="/tool/yocto/poky/build/tmp/sysroots"
# STAGING_BINDIR_TOOLCHAIN=${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}
STAGING_BINDIR_TOOLCHAIN="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/ppc440-poky-linux"
# FILES_linux-xilinx-dbg=${@d.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory'], True)}
FILES_linux-xilinx-dbg="/usr/bin/.debug /usr/sbin/.debug /usr/libexec/.debug /usr/lib/.debug /bin/.debug /sbin/.debug /lib/.debug /usr/lib/linux-xilinx/.debug /usr/lib/matchbox-panel/.debug /usr/src/debug"
# BB_SIGNATURE_HANDLER=OEBasicHash
BB_SIGNATURE_HANDLER="OEBasicHash"
# LINKER_HASH_STYLE=gnu
LINKER_HASH_STYLE="gnu"
# PREFERRED_VERSION_linux-yocto_qemumips=3.4%
PREFERRED_VERSION_linux-yocto_qemumips="3.4%"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-initial=gcc-cross-initial
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-initial="gcc-cross-initial"
# VIRTUAL-RUNTIME_alsa-state=alsa-state
VIRTUAL-RUNTIME_alsa-state="alsa-state"
# SSH_AGENT_PID=4340
SSH_AGENT_PID="4340"
# XDG_SESSION_COOKIE=7e784a950e35e8c870d2db2900000013-1340396892.331324-597899210
XDG_SESSION_COOKIE="7e784a950e35e8c870d2db2900000013-1340396892.331324-597899210"
# LICENSE=GPLv2
LICENSE="GPLv2"
# PACKAGES_DYNAMIC=${PN}-locale-* kernel-module-* kernel-image-* kernel-firmware-*
PACKAGES_DYNAMIC="linux-xilinx-locale-* kernel-module-* kernel-image-* kernel-firmware-*"
# LOCALCONF_VERSION=1
LOCALCONF_VERSION="1"
# MULTILIB_VARIANTS=
# TARGET_CC_KERNEL_ARCH=
# PREFERRED_PROVIDER_console-tools=kbd
PREFERRED_PROVIDER_console-tools="kbd"
# SSTATEPREINSTFUNCS=
# SSH_AUTH_SOCK=/tmp/keyring-MhCyXy/ssh
SSH_AUTH_SOCK="/tmp/keyring-MhCyXy/ssh"
# STAGING_DIR_TARGET=${STAGING_DIR}/${MACHINE}
STAGING_DIR_TARGET="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# FILES_linux-xilinx-dev=${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig ${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la ${base_libdir}/*.la
FILES_linux-xilinx-dev="/usr/include /lib/lib*.so /usr/lib/lib*.so /usr/lib/*.la /usr/lib/*.o /usr/lib/pkgconfig /usr/share/pkgconfig /usr/share/aclocal /lib/*.o /usr/lib/linux-xilinx/*.la /lib/*.la"
# PREFERRED_VERSION_gcc-runtime=${GCCVERSION}
PREFERRED_VERSION_gcc-runtime="4.7%"
# OE_IMPORTS= os sys time oe.path oe.utils oe.data oe.packagegroup oe.sstatesig
OE_IMPORTS="os sys time oe.path oe.utils oe.data oe.packagegroup oe.sstatesig"
# AUTOREV=${@bb.fetch2.get_autorev(d)}
AUTOREV="AUTOINC"
# FETCHCOMMAND_svn=/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}
FETCHCOMMAND_svn="/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
# DEPLOY_DIR_DEB=${DEPLOY_DIR}/deb
DEPLOY_DIR_DEB="/tool/yocto/poky/build/tmp/deploy/deb"
# DEPLOY_DIR_RPM=${DEPLOY_DIR}/rpm
DEPLOY_DIR_RPM="/tool/yocto/poky/build/tmp/deploy/rpm"
# PREFERRED_VERSION_eglibc-locale=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-locale="2.15"
# CLEANFUNCS= sstate_cleanall
CLEANFUNCS="sstate_cleanall"
# STAGING_BINDIR_CROSS=${STAGING_BINDIR}/crossscripts
STAGING_BINDIR_CROSS="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts"
# PALMTOP_USE_MULTITHREADED_QT=None
# PREFERRED_VERSION_eglibc-initial=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-initial="2.15"
do_fetchall() {
:
}
do_build() {
:
}
resolve_package_rpm() {
local conffile="$1"
shift
local pkg_name=""
for solve in `cat ${conffile}`; do
pkg_name=$(rpm -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --qf "%{packageorigin}\n" "$@" | grep -v "is not installed" || true)
if [ -n "$pkg_name" -a "$pkg_name" != "(none)" ]; then
echo $pkg_name
break;
fi
done
}
do_savedefconfig() {
oe_runmake savedefconfig
}
do_uboot_mkimage() {
if test "xuImage" = "xuImage" ; then
if test ! -e arch/powerpc/boot/uImage ; then
ENTRYPOINT=0x00000000
if test -n "${UBOOT_ENTRYSYMBOL}"; then
ENTRYPOINT=`powerpc-poky-linux-nm /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/vmlinux | \
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
fi
if test -e arch/powerpc/boot/compressed/vmlinux ; then
powerpc-poky-linux-objcopy -O binary -R .note -R .comment -S arch/powerpc/boot/compressed/vmlinux linux.bin
uboot-mkimage -A ppc -O linux -T kernel -C none -a 0x00000000 -e $ENTRYPOINT -n "Yocto (Built by Poky 7.0)/3.3.0/virtex5" -d linux.bin arch/powerpc/boot/uImage
rm -f linux.bin
else
powerpc-poky-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
rm -f linux.bin.gz
gzip -9 linux.bin
uboot-mkimage -A ppc -O linux -T kernel -C gzip -a 0x00000000 -e $ENTRYPOINT -n "Yocto (Built by Poky 7.0)/3.3.0/virtex5" -d linux.bin.gz arch/powerpc/boot/uImage
rm -f linux.bin.gz
fi
fi
fi
}
prelink_image() {
# export PSEUDO_DEBUG=4
# /bin/env | /bin/grep PSEUDO
# echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
# echo "LD_PRELOAD=$LD_PRELOAD"
pre_prelink_size=`du -ks /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs | awk '{size = $1 ; print size }'`
echo "Size before prelinking $pre_prelink_size."
# We need a prelink conf on the filesystem, add one if it's missing
if [ ! -e /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/etc/prelink.conf ]; then
cp /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc/prelink.conf \
/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/etc/prelink.conf
dummy_prelink_conf=true;
else
dummy_prelink_conf=false;
fi
# prelink!
/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/sbin/prelink --root /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs -amR -N -c /etc/prelink.conf
# Remove the prelink.conf if we had to add it.
if [ "$dummy_prelink_conf" = "true" ]; then
rm -f /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/etc/prelink.conf
fi
pre_prelink_size=`du -ks /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs | awk '{size = $1 ; print size }'`
echo "Size after prelinking $pre_prelink_size."
}
do_sizecheck() {
if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
size=`ls -l arch/powerpc/boot/uImage | awk '{ print $5}'`
if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
rm arch/powerpc/boot/uImage
die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
fi
fi
}
bbdebug() {
USAGE='Usage: bbdebug [123] "message"'
if [ $# -lt 2 ]; then
bbfatal "$USAGE"
fi
# Strip off the debug level and ensure it is an integer
DBGLVL=$1; shift
if ! [[ "$DBGLVL" =~ ^[0-9]+ ]]; then
bbfatal "$USAGE"
fi
# All debug output is printed to the logs
echo "DEBUG: $*"
}
package_generate_rpm_conf() {
# Update target packages
package_generate_rpm_conf_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb" base_archs ml_archs
# Update SDK packages
package_generate_rpm_conf_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb-sdk" base_archs
}
oe_machinstall() {
# Purpose: Install machine dependent files, if available
# If not available, check if there is a default
# If no default, just touch the destination
# Example:
# $1 $2 $3 $4
# oe_machinstall -m 0644 fstab /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/etc/fstab
#
# TODO: Check argument number?
#
filename=`basename $3`
dirname=`dirname $3`
for o in `echo linux:powerpc:build-linux:pn-linux-xilinx:virtex5:poky:class-target:forcevariable:libc-glibc | tr ':' ' '`; do
if [ -e $dirname/$o/$filename ]; then
bbnote $dirname/$o/$filename present, installing to $4
install $1 $2 $dirname/$o/$filename $4
return
fi
done
# bbnote overrides specific file NOT present, trying default=$3...
if [ -e $3 ]; then
bbnote $3 present, installing to $4
install $1 $2 $3 $4
else
bbnote $3 NOT present, touching empty $4
touch $4
fi
}
do_install() {
kernel_do_install
if test -n "arch/powerpc/boot/dts/virtex440-ml507.dts"; then
dtc -I dts -O dtb -R 8 -p 0x3000 -o devicetree arch/powerpc/boot/dts/virtex440-ml507.dts
install -m 0644 devicetree /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/devicetree-3.3.0-14.2-build1
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx
install -m 0644 devicetree /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/uImage-3.3.0-r0-virtex5-20120623074645.dtb
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx
rm -f uImage-virtex5.dtb
ln -sf uImage-3.3.0-r0-virtex5-20120623074645.dtb uImage-virtex5.dtb
fi
}
do_configure() {
#first check that the XILINX_BSP_PATH and XILINX_BOARD have been defined in local.conf
#now depending on the board type and arch do what is nessesary
if [ -n "/project/xilinx-ml507-workspace" ]; then
if [ "ml507" != "unknown" ]; then
dts=`find "/project/xilinx-ml507-workspace" -name *.dts -print`
if [ -e "$dts" ]; then
bbnote "Xilinx BSP device tree located in: ${dts}"
if [ "powerpc" = "powerpc" ]; then
bbnote "Replacing linux kernel powerpc device tree to match located hardware model"
cp -pP ${dts} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/arch/powerpc/boot/dts/virtex440-ml507.dts
else
bbnote "Replacing linux kernel microblaze device tree to match located hardware model"
cp -pP ${dts} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/arch/microblaze/platform/generic/440-ml507.dts
fi
else
bbfatal "No device tree found, missing hardware ref design?"
exit 1
fi
else
bbnote "Xilinx board model: ml507"
bbfatal "XILINX_BSP_PATH points to a valid Xilinx XPS project directory? ! Exit"
exit 1
fi
else
bbfatal "XILINX_BSP_PATH not defined ! Exit"
exit 1
fi
kernel_do_configure
}
kernel_package_preprocess() {
rm -rf /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/package/kernel
}
cml1_do_configure() {
set -e
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake oldconfig
}
kernel_do_deploy() {
install -m 0644 arch/powerpc/boot/uImage /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/uImage-3.3.0-r0-virtex5-20120623074645.bin
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
tar -cvzf /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/modules-3.3.0-14.2-build1-r0-virtex5.tgz -C /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image lib
fi
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx
rm -f uImage-virtex5.bin
ln -sf uImage-3.3.0-r0-virtex5-20120623074645.bin uImage-virtex5.bin
ln -sf uImage-3.3.0-r0-virtex5-20120623074645.bin uImage
cp /tool/yocto/poky/meta/files/deploydir_readme.txt /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
}
pkg_postrm_modules() {
update-modules || true
}
sysroot_stage_dir() {
src="$1"
dest="$2"
# if the src doesn't exist don't do anything
if [ ! -d "$src" ]; then
return
fi
# We only want to stage the contents of $src if it's non-empty so first rmdir $src
# then if it still exists (rmdir on non-empty dir fails) we can copy its contents
rmdir "$src" 2> /dev/null || true
# However we always want to stage a $src itself, even if it's empty
mkdir -p "$dest"
if [ -d "$src" ]; then
tar -cf - -C "$src" -ps . | tar -xf - -C "$dest"
fi
}
do_buildall() {
:
}
pkg_postinst_modules() {
if [ -z "$D" ]; then
depmod -a 3.3.0-14.2-build1
update-modules || true
fi
}
package_update_index_rpm_common() {
rpmconf_base="$1"
shift
createdirs=""
for archvar in "$@"; do
eval archs=\${${archvar}}
packagedirs=""
for arch in $archs; do
packagedirs="/tool/yocto/poky/build/tmp/deploy/rpm/$arch $packagedirs"
rm -rf /tool/yocto/poky/build/tmp/deploy/rpm/$arch/solvedb.done
done
cat /dev/null > ${rpmconf_base}-${archvar}.conf
for pkgdir in $packagedirs; do
if [ -e $pkgdir/ ]; then
echo "Generating solve db for $pkgdir..."
echo $pkgdir/solvedb >> ${rpmconf_base}-${archvar}.conf
createdirs="$createdirs $pkgdir"
fi
done
done
rpm-createsolvedb.py "rpm" $createdirs
}
base_do_configure() {
:
}
create_wrapper() {
# Create a wrapper script
#
# These are useful to work around relocation issues, by setting environment
# variables which point to paths in the filesystem.
#
# Usage: create_wrapper FILENAME [[VAR=VALUE]..]
cmd=$1
shift
echo "Generating wrapper script for $cmd"
mv $cmd $cmd.real
cmdname=`basename $cmd`.real
cat <<END >$cmd
#!/bin/sh
realpath=\`readlink -fn \$0\`
exec env $@ \`dirname \$realpath\`/$cmdname "\$@"
END
chmod +x $cmd
}
bbnote() {
echo "NOTE: $*"
}
do_deploy() {
kernel_do_deploy
}
sstate_create_package() {
cd ${SSTATE_BUILDDIR}
TFILE=`mktemp /tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}.XXXXXXXX`
# Need to handle empty directories
if [ "$(ls -A)" ]; then
tar -czf $TFILE *
else
tar -cz --file=$TFILE --files-from=/dev/null
fi
chmod 0664 $TFILE
mv $TFILE /tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0
rm -rf ${SSTATE_BUILDDIR}
}
bbplain() {
echo "$*"
}
rpm_log_check() {
target="$1"
lf_path="$2"
lf_txt="`cat $lf_path`"
for keyword_die in "Cannot find package" "exit 1" ERR Fail
do
if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
echo -e "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
do_exit=1
fi
done
test "$do_exit" = 1 && exit 1
true
}
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
[ -x /sbin/ldconfig ] && /sbin/ldconfig
fi
}
package_update_index_rpm() {
if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
return
fi
# Update target packages
base_archs="all any noarch powerpc-nf ppc440 virtex5"
ml_archs="${MULTILIB_PACKAGE_ARCHS}"
package_update_index_rpm_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb" base_archs ml_archs
# Update SDK packages
base_archs="all any noarch x86_64-nativesdk"
package_update_index_rpm_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb-sdk" base_archs
}
kernel_do_configure() {
# fixes extra + in /lib/modules/2.6.37+
# $ scripts/setlocalversion . => +
# $ make kernelversion => 2.6.37
# $ make kernelrelease => 2.6.37+
touch /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.scmversion /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.scmversion
# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend().
if [ -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/defconfig" ] && [ ! -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.config" ]; then
cp "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/defconfig" "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.config"
fi
yes '' | oe_runmake oldconfig
if [ ! -z "" ]; then
for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do
if [ -e "/tool/yocto/poky/build/tmp/deploy/images/-virtex5.$img" ]; then
cp "/tool/yocto/poky/build/tmp/deploy/images/-virtex5.$img" initramfs.$img
fi
done
fi
}
sysroot_stage_libdir() {
src="$1"
dest="$2"
sysroot_stage_dir $src $dest
}
die() {
bbfatal "$*"
}
base_do_install() {
:
}
do_compile() {
kernel_do_compile
}
autoload_postinst_fragment() {
if [ x"$D" = "x" ]; then
modprobe %s || true
fi
}
kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
oe_runmake include/linux/version.h CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
oe_runmake uImage CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
if test "uImage.gz" = "uImage"; then
gzip -9c < "uImage" > "arch/powerpc/boot/uImage"
fi
}
base_do_package() {
:
}
do_compile_kernelmodules() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake -j 6 modules CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
else
bbnote "no modules to compile"
fi
}
oe_soinstall() {
# Purpose: Install shared library file and
# create the necessary links
# Example:
#
# oe_
#
#bbnote installing shared library $1 to $2
#
libname=`basename $1`
install -m 755 $1 $2/$libname
sonamelink=`powerpc-poky-linux-readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
ln -sf $libname $2/$sonamelink
ln -sf $libname $2/$solink
}
create_cmdline_wrapper() {
# Create a wrapper script
#
# These are useful to work around relocation issues, by setting environment
# variables which point to paths in the filesystem.
#
# Usage: create_wrapper FILENAME [[VAR=VALUE]..]
cmd=$1
shift
echo "Generating wrapper script for $cmd"
mv $cmd $cmd.real
cmdname=`basename $cmd`.real
cat <<END >$cmd
#!/bin/sh
realpath=\`readlink -fn \$0\`
exec \`dirname \$realpath\`/$cmdname $@ "\$@"
END
chmod +x $cmd
}
oe_libinstall() {
# Purpose: Install a library, in all its forms
# Example
#
# oe_libinstall libltdl /tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib/
# oe_libinstall -C src/libblah libblah /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image//usr/lib/
dir=""
libtool=""
silent=""
require_static=""
require_shared=""
staging_install=""
while [ "$#" -gt 0 ]; do
case "$1" in
-C)
shift
dir="$1"
;;
-s)
silent=1
;;
-a)
require_static=1
;;
-so)
require_shared=1
;;
-*)
bbfatal "oe_libinstall: unknown option: $1"
;;
*)
break;
;;
esac
shift
done
libname="$1"
shift
destpath="$1"
if [ -z "$destpath" ]; then
bbfatal "oe_libinstall: no destination path specified"
fi
if echo "$destpath/" | egrep '^/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib/' >/dev/null
then
staging_install=1
fi
__runcmd () {
if [ -z "$silent" ]; then
echo >&2 "oe_libinstall: $*"
fi
$*
}
if [ -z "$dir" ]; then
dir=`pwd`
fi
dotlai=$libname.lai
# Sanity check that the libname.lai is unique
number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l`
if [ $number_of_files -gt 1 ]; then
bbfatal "oe_libinstall: $dotlai is not unique in $dir"
fi
dir=$dir`(cd $dir;find . -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"`
olddir=`pwd`
__runcmd cd $dir
lafile=$libname.la
# If such file doesn't exist, try to cut version suffix
if [ ! -f "$lafile" ]; then
libname1=`echo "$libname" | sed 's/-[0-9.]*$//'`
lafile1=$libname.la
if [ -f "$lafile1" ]; then
libname=$libname1
lafile=$lafile1
fi
fi
if [ -f "$lafile" ]; then
# libtool archive
eval `cat $lafile|grep "^library_names="`
libtool=1
else
library_names="$libname.so* $libname.dll.a $libname.*.dylib"
fi
__runcmd install -d $destpath/
dota=$libname.a
if [ -f "$dota" -o -n "$require_static" ]; then
rm -f $destpath/$dota
__runcmd install -m 0644 $dota $destpath/
fi
if [ -f "$dotlai" -a -n "$libtool" ]; then
rm -f $destpath/$libname.la
__runcmd install -m 0644 $dotlai $destpath/$libname.la
fi
for name in $library_names; do
files=`eval echo $name`
for f in $files; do
if [ ! -e "$f" ]; then
if [ -n "$libtool" ]; then
bbfatal "oe_libinstall: $dir/$f not found."
fi
elif [ -L "$f" ]; then
__runcmd cp -P "$f" $destpath/
elif [ ! -L "$f" ]; then
libfile="$f"
rm -f $destpath/$libfile
__runcmd install -m 0755 $libfile $destpath/
fi
done
done
if [ -z "$libfile" ]; then
if [ -n "$require_shared" ]; then
bbfatal "oe_libinstall: unable to locate shared library"
fi
elif [ -z "$libtool" ]; then
# special case hack for non-libtool .so.#.#.# links
baselibfile=`basename "$libfile"`
if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
sonamelink=`powerpc-poky-linux-readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
__runcmd ln -sf $baselibfile $destpath/$sonamelink
fi
__runcmd ln -sf $baselibfile $destpath/$solink
fi
fi
__runcmd cd "$olddir"
}
kernel_do_install() {
#
# First install the modules
#
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image" modules_install
rm -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/modules.order"
rm -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/modules.builtin"
rm "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/build"
rm "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/source"
else
bbnote "no modules to install"
fi
#
# Install various kernel output (zImage, map file, config, module support files)
#
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot
install -m 0644 arch/powerpc/boot/uImage /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/uImage-3.3.0-14.2-build1
install -m 0644 System.map /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/System.map-3.3.0-14.2-build1
install -m 0644 .config /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/config-3.3.0-14.2-build1
install -m 0644 vmlinux /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/vmlinux-3.3.0-14.2-build1
[ -e Module.symvers ] && install -m 0644 Module.symvers /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/Module.symvers-3.3.0-14.2-build1
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/etc/modules-load.d
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/etc/modprobe.d
#
# Support for external module building - create a minimal copy of the
# kernel source tree.
#
kerneldir=/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/kernel
install -d $kerneldir
#
# Store the kernel version in sysroots for module-base.bbclass
#
echo "3.3.0-14.2-build1" > $kerneldir/kernel-abiversion
#
# Store kernel image name to allow use during image generation
#
echo "uImage-3.3.0-r0-virtex5-20120623074645" >$kerneldir/kernel-image-name
#
# Copy the entire source tree. In case an external build directory is
# used, copy the build directory over first, then copy over the source
# dir. This ensures the original Makefiles are used and not the
# redirecting Makefiles in the build directory.
#
# work and sysroots can be on different partitions, so we can't rely on
# hardlinking, unfortunately.
#
cp -fR * $kerneldir
cp .config $kerneldir
if [ "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git" != "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git" ]; then
cp -fR /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/* $kerneldir
fi
install -m 0644 arch/powerpc/boot/uImage $kerneldir/uImage
install -m 0644 System.map $kerneldir/System.map-3.3.0-14.2-build1
#
# Clean and remove files not needed for building modules.
# Some distributions go through a lot more trouble to strip out
# unecessary headers, for now, we just prune the obvious bits.
#
# We don't want to leave host-arch binaries in /sysroots, so
# we clean the scripts dir while leaving the generated config
# and include files.
#
oe_runmake -C $kerneldir CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" clean
make -C $kerneldir _mrproper_scripts
find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
# As of Linux kernel version 3.0.1, the clean target removes
# arch/powerpc/lib/crtsavres.o which is present in
# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
if [ powerpc = "powerpc" ]; then
cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
fi
# Remove the following binaries which cause strip errors
# during do_package for cross-compiled platforms
bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
arch/powerpc/boot/mktree"
for entry in $bin_files; do
rm -f $kerneldir/$entry
done
}
base_do_compile() {
if [ -e Makefile -o -e makefile ]; then
oe_runmake || die "make failed"
else
bbnote "nothing to compile"
fi
}
bbfatal() {
echo "ERROR: $*"
exit 1
}
package_install_internal_rpm() {
local target_rootfs="${INSTALL_ROOTFS_RPM}"
local platform="${INSTALL_PLATFORM_RPM}"
local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
local confbase="${INSTALL_CONFBASE_RPM}"
local package_to_install="${INSTALL_PACKAGES_RPM}"
local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}"
local providename="${INSTALL_PROVIDENAME_RPM}"
local task="${INSTALL_TASK_RPM}"
# Setup base system configuration
mkdir -p ${target_rootfs}/etc/rpm/
echo "${platform}-poky-linux" > ${target_rootfs}/etc/rpm/platform
if [ ! -z "$platform_extra" ]; then
for pt in $platform_extra ; do
case $pt in
noarch | any | all)
os="`echo linux | sed "s,-.*,,"`.*"
;;
*)
os="linux"
;;
esac
echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform
done
fi
# Tell RPM that the "/" directory exist and is available
mkdir -p ${target_rootfs}/etc/rpm/sysinfo
echo "/" >${target_rootfs}/etc/rpm/sysinfo/Dirnames
if [ ! -z "$providename" ]; then
cat /dev/null > ${target_rootfs}/etc/rpm/sysinfo/Providename
for provide in $providename ; do
echo $provide >> ${target_rootfs}/etc/rpm/sysinfo/Providename
done
fi
# Setup manifest of packages to install...
mkdir -p ${target_rootfs}/install
rm -f ${target_rootfs}/install/install.manifest
# Uclibc builds don't provide this stuff...
if [ xlinux = "xlinux" ] || [ xlinux = "xlinux-gnueabi" ] ; then
if [ ! -z "${package_linguas}" ]; then
for pkg in ${package_linguas}; do
echo "Processing $pkg..."
archvar=base_archs
manifest=install.manifest
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
manifest=install_multilib.manifest
break
fi
done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
echo "Unable to find package $pkg ($ml_pkg)!"
exit 1
fi
echo $pkg_name >> ${target_rootfs}/install/${manifest}
done
fi
fi
if [ ! -z "${package_to_install}" ]; then
for pkg in ${package_to_install} ; do
echo "Processing $pkg..."
archvar=base_archs
manifest=install.manifest
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
manifest=install_multilib.manifest
break
fi
done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
echo "Unable to find package $pkg ($ml_pkg)!"
exit 1
fi
echo $pkg_name >> ${target_rootfs}/install/${manifest}
done
fi
# Normal package installation
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
if [ -s ${target_rootfs}/install/install.manifest ]; then
echo "# Install manifest padding" >> ${target_rootfs}/install/install.manifest
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-base_archs.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/install.manifest
fi
if [ ! -z "${package_attemptonly}" ]; then
echo "Adding attempt only packages..."
for pkg in ${package_attemptonly} ; do
echo "Processing $pkg..."
archvar=base_archs
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
break
fi
done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
echo "Note: Unable to find package $pkg ($ml_pkg) -- PACKAGE_INSTALL_ATTEMPTONLY"
continue
fi
echo "Attempting $pkg_name..." >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_attemptonly.${PID}"
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
$pkg_name >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_attemptonly.${PID}" || true
done
fi
#### Note: 'Recommends' is an arbitrary tag that means _SUGGESTS_ in OE-core..
# Add any recommended packages to the image
# RPM does not solve for recommended packages because they are optional...
# So we query them and tree them like the ATTEMPTONLY packages above...
# Change the loop to "1" to run this code...
loop=0
if [ $loop -eq 1 ]; then
echo "Processing recommended packages..."
cat /dev/null > ${target_rootfs}/install/recommend.list
while [ $loop -eq 1 ]; do
# Dump the full set of recommends...
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-qa --qf "[%{RECOMMENDS}\n]" | sort -u > ${target_rootfs}/install/recommend
# Did we add more to the list?
grep -v -x -F -f ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend > ${target_rootfs}/install/recommend.new || true
# We don't want to loop unless there is a change to the list!
loop=0
cat ${target_rootfs}/install/recommend.new | \
while read pkg ; do
# Ohh there was a new one, we'll need to loop again...
loop=1
echo "Processing $pkg..."
found=0
for archvar in base_archs ml_archs ; do
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${pkg})
if [ -n "$pkg_name" ]; then
found=1
break
fi
done
if [ $found -eq 0 ]; then
echo "Note: Unable to find package $pkg -- suggests"
echo "Unable to find package $pkg." >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_recommend.${PID}"
continue
fi
echo "Attempting $pkg_name..." >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_{task}_recommend.${PID}"
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
$pkg_name >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_recommend.${PID}" 2>&1 || true
done
cat ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend.new | sort -u > ${target_rootfs}/install/recommend.new.list
mv -f ${target_rootfs}/install/recommend.new.list ${target_rootfs}/install/recommend.list
rm ${target_rootfs}/install/recommend ${target_rootfs}/install/recommend.new
done
fi
# Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install.manifest"
rpm -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
--root "${target_rootfs}/install" \
-D "__dbi_txn create nofsync private" \
> ${target_rootfs}/install/install_solution.manifest
touch ${target_rootfs}/install/install_multilib_solution.manifest
if [ -s "${target_rootfs}/install/install_multilib.manifest" ]; then
# multilib package installation
echo "# Install multilib manifest padding" >> ${target_rootfs}/install/install_multilib.manifest
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-ml_archs.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/install_multilib.manifest
# Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
rpm -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
--root "${target_rootfs}/install" \
-D "__dbi_txn create nofsync private" \
> ${target_rootfs}/install/install_multilib_solution.manifest
fi
cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest
cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest
# Construct install scriptlet wrapper
cat << EOF > /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/scriptlet_wrapper
#!/bin/bash
export PATH="/tool/yocto/poky/scripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/ppc440-poky-linux:/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux//bin:/tool/yocto/poky/scripts:/tool/yocto/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
export D="${target_rootfs}"
export OFFLINE_ROOT="\$D"
export IPKG_OFFLINE_ROOT="\$D"
export OPKG_OFFLINE_ROOT="\$D"
\$2 \$1/\$3 \$4
if [ \$? -ne 0 ]; then
mkdir -p \$1/etc/rpm-postinsts
num=100
while [ -e \$1/etc/rpm-postinsts/\${num} ]; do num=\$((num + 1)); done
echo "#!\$2" > \$1/etc/rpm-postinsts/\${num}
echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${num}
cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${num}
chmod +x \$1/etc/rpm-postinsts/\${num}
fi
EOF
chmod 0755 /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/scriptlet_wrapper
# Configure RPM... we enforce these settings!
mkdir -p ${target_rootfs}${rpmlibdir}
mkdir -p ${target_rootfs}${rpmlibdir}/log
# After change the __db.* cache size, log file will not be generated automatically,
# that will raise some warnings, so touch a bare log for rpm write into it.
touch ${target_rootfs}${rpmlibdir}/log/log.0000000001
cat > ${target_rootfs}${rpmlibdir}/DB_CONFIG << EOF
# ================ Environment
set_data_dir .
set_create_dir .
set_lg_dir ./log
set_tmp_dir ./tmp
set_flags db_log_autoremove on
# -- thread_count must be >= 8
set_thread_count 64
# ================ Logging
# ================ Memory Pool
set_cachesize 0 1048576 0
set_mp_mmapsize 268435456
# ================ Locking
set_lk_max_locks 16384
set_lk_max_lockers 16384
set_lk_max_objects 16384
mutex_set_max 163840
# ================ Replication
EOF
# RPM is special. It can't handle dependencies and preinstall scripts correctly. Its
# probably a feature. The only way to convince rpm to actually run the preinstall scripts
# for base-passwd and shadow first before installing packages that depend on these packages
# is to do two image installs, installing one set of packages, then the other.
if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
echo "Skipping pre install due to exisitng image"
else
rm -f ${target_rootfs}/install/initial_install.manifest
echo "Installing base dependencies first (base-passwd, base-files and shadow) since rpm is special"
grep /base-passwd-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
grep /base-files-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
grep /shadow-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
if [ -s ${target_rootfs}/install/initial_install.manifest ]; then
echo "# Initial Install manifest padding..." >> ${target_rootfs}/install/initial_install.manifest
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
mkdir -p ${target_rootfs}/initial
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/initial_install.manifest
rpm -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
-D "__dbi_txn create nofsync private" \
--root "${target_rootfs}/install" \
> ${target_rootfs}/install/initial_solution.manifest
rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
grep -Fv -f ${target_rootfs}/install/initial_solution.manifest ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution.manifest.new
mv ${target_rootfs}/install/total_solution.manifest.new ${target_rootfs}/install/total_solution.manifest
rm -rf ${target_rootfs}/initial
fi
fi
echo "Installing main solution manifest (${target_rootfs}/install/total_solution.manifest)"
rpm_update_pkg ${target_rootfs}/install/total_solution.manifest
}
bbwarn() {
echo "WARNING: $*"
}
rpm_common_comand() {
local target_rootfs="${INSTALL_ROOTFS_RPM}"
rpm --root ${target_rootfs} \
--predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_var /var" \
-D "_dbpath ${rpmlibdir}" \
-D "_tmppath /install/tmp" \
--noparentdirs --nolinktos \
-D "__dbi_txn create nofsync private" \
-D "_cross_scriptlet_wrapper /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/scriptlet_wrapper" $@
}
do_package_write() {
:
}
rpm_update_pkg() {
manifest=$1
btmanifest=$manifest.bt.manifest
pre_btmanifest=/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/${btmanifest##/*/}
local target_rootfs="${INSTALL_ROOTFS_RPM}"
# Save the rpm's build time for incremental image generation, and the file
# would be moved to /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp
for i in `cat $manifest`; do
# Use "rpm" rather than "rpm" here, since we don't need the
# '--dbpath' option
echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
done | sort -u > $btmanifest
# Only install the different pkgs if incremental image generation is set
if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
"rpm" = "rpm" ]; then
comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
${target_rootfs}/install/remove.manifest
comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
${target_rootfs}/install/incremental.manifest
# Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
# been run by now, so don't have to run them(preun, postun, etc.) when
# erase the pkg
if [ -s ${target_rootfs}/install/remove.manifest ]; then
rpm_common_comand --noscripts --nodeps \
-e `cat ${target_rootfs}/install/remove.manifest`
fi
# Attempt to install the incremental pkgs
if [ -s ${target_rootfs}/install/incremental.manifest ]; then
rpm_common_comand --nodeps --replacefiles --replacepkgs \
-Uvh ${target_rootfs}/install/incremental.manifest
fi
else
# Attempt to install
rpm_common_comand --replacepkgs -Uhv $manifest
fi
}
sysroot_stage_dirs() {
from="$1"
to="$2"
sysroot_stage_dir $from/usr/include $to/usr/include
if [ "x86_64-linux" = "powerpc-poky-linux" ]; then
sysroot_stage_dir $from/usr/bin $to/usr/bin
sysroot_stage_dir $from/usr/sbin $to/usr/sbin
sysroot_stage_dir $from/bin $to/bin
sysroot_stage_dir $from/sbin $to/sbin
sysroot_stage_dir $from/usr/libexec $to/usr/libexec
sysroot_stage_dir $from/etc $to/etc
sysroot_stage_dir $from/var $to/var
fi
if [ -d $from/usr/lib ]
then
sysroot_stage_libdir $from//usr/lib $to/usr/lib
fi
if [ -d $from/lib ]
then
sysroot_stage_libdir $from/lib $to/lib
fi
sysroot_stage_dir $from/usr/share $to/usr/share
}
do_checkuriall() {
:
}
packagedstaging_fastpath() {
:
}
sstate_unpack_package() {
mkdir -p ${SSTATE_INSTDIR}
cd ${SSTATE_INSTDIR}
tar -xvzf /tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}
}
package_generate_rpm_conf_common() {
rpmconf_base="$1"
shift
printf "_solve_dbpath " > ${rpmconf_base}.macro
o_colon="false"
for archvar in "$@"; do
printf "_solve_dbpath " > ${rpmconf_base}-${archvar}.macro
colon="false"
for each in `cat ${rpmconf_base}-${archvar}.conf` ; do
if [ "$o_colon" = "true" ]; then
printf ":" >> ${rpmconf_base}.macro
fi
if [ "$colon" = "true" ]; then
printf ":" >> ${rpmconf_base}-${archvar}.macro
fi
printf "%s" $each >> ${rpmconf_base}.macro
o_colon="true"
printf "%s" $each >> ${rpmconf_base}-${archvar}.macro
colon="true"
done
printf "\n" >> ${rpmconf_base}-${archvar}.macro
done
printf "\n" >> ${rpmconf_base}.macro
}
sysroot_stage_all() {
sysroot_stage_dirs /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir/
sysroot_stage_dir /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/kernel /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir//kernel
}
license_create_manifest() {
mkdir -p /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645
# Get list of installed packages
list_installed_packages | grep -v "locale" |sort > /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/package.manifest
INSTALLED_PKGS=`cat /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/package.manifest`
# remove existing license.manifest file
if [ -f /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest ]; then
rm /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
fi
# list of installed packages is broken for deb
for pkg in ${INSTALLED_PKGS}; do
# not the best way to do this but licenses are not arch dependant iirc
filename=`ls /tool/yocto/poky/build/tmp/pkgdata/*/runtime/${pkg}| head -1`
pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
# check to see if the package name exists in the manifest. if so, bail.
if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then
# exclude local recipes
if [ ! "${pkged_pn}" = "*locale*" ]; then
echo "PACKAGE NAME:" ${pkg} >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
echo "PACKAGE VERSION:" ${pkged_pv} >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
echo "RECIPE NAME:" ${pkged_pn} >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
echo "LICENSE: " >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
for lic in ${pkged_lic}; do
if [ -e "/tool/yocto/poky/build/tmp/deploy/licenses/${pkged_pn}/generic_${lic}" ]; then
echo ${lic}|sed s'/generic_//'g >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
else
echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
fi
done
echo "" >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest
fi
fi
done
# Two options here:
# - Just copy the manifest
# - Copy the manifest and the license directories
# With both options set we see a .5 M increase in core-image-minimal
if [ -n "${COPY_LIC_MANIFEST}" ]; then
mkdir -p /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/
cp /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074645/license.manifest /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/license.manifest
if [ -n "${COPY_LIC_DIRS}" ]; then
for pkg in ${INSTALLED_PKGS}; do
mkdir -p /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${pkg}
for lic in `ls /tool/yocto/poky/build/tmp/deploy/licenses/${pkg}`; do
# Really don't need to copy the generics as they're
# represented in the manifest and in the actual pkg licenses
# Doing so would make your image quite a bit larger
if [[ "${lic}" != "generic_"* ]]; then
cp /tool/yocto/poky/build/tmp/deploy/licenses/${pkg}/${lic} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${pkg}/${lic}
elif [[ "${lic}" == "generic_"* ]]; then
if [ ! -f /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${lic} ]; then
cp /tool/yocto/poky/build/tmp/deploy/licenses/${pkg}/${lic} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/
fi
ln -s ../${lic} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${pkg}/${lic}
fi
done
done
fi
fi
}
mklibs_optimize_image() {
for img in ${MKLIBS_OPTIMIZED_IMAGES}
do
if [ "${img}" = "linux-xilinx" ] || [ "${img}" = "all" ]
then
mklibs_optimize_image_doit
break
fi
done
}
oe_runmake() {
if [ x"$MAKE" = x ]; then MAKE=make; fi
bbnote make "$@"
make "$@" || die "oe_runmake failed"
}
bberror() {
echo "ERROR: $*"
}
mklibs_optimize_image_doit() {
rm -rf /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs
mkdir -p /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/dest
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs
du -bs > /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.before.mklibs.txt
for i in `find .`; do file $i; done \
| grep ELF \
| grep "LSB executable" \
| grep "dynamically linked" \
| sed "s/:.*//" \
| sed "s+^\./++" \
> /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/executables.list
case powerpc in
powerpc | mips | microblaze )
dynamic_loader="/lib/ld.so.1"
;;
powerpc64)
dynamic_loader="/lib/ld64.so.1"
;;
x86_64)
dynamic_loader="/lib/ld-linux-x86-64.so.2"
;;
i586 )
dynamic_loader="/lib/ld-linux.so.2"
;;
arm )
dynamic_loader="/lib/ld-linux.so.3"
;;
* )
dynamic_loader="/unknown_dynamic_linker"
;;
esac
mklibs -v \
--ldlib ${dynamic_loader} \
--sysroot /tool/yocto/poky/build/tmp/sysroots/virtex5 \
--root /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs \
--target `echo powerpc-poky-linux- | sed 's/-$//' ` \
-d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/dest \
`cat /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/executables.list`
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/dest
for i in *
do
cp $i `find /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs -name $i`
done
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs
du -bs > /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.after.mklibs.txt
echo rootfs size before mklibs optimization: `cat /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.before.mklibs.txt`
echo rootfs size after mklibs optimization: `cat /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.after.mklibs.txt`
}
python do_devshell () {
oe_terminal(d.getVar('SHELL', True), 'OpenEmbedded Developer Shell', d)
}
python oe_import_eh () {
if isinstance(e, bb.event.ConfigParsed):
oe_import(e.data)
}
python package_qa_check_unsafe_references_in_scripts () {
def package_qa_check_unsafe_references_in_scripts(path, name, d, elf, messages):
"""
Warn if scripts in base_[bindir|sbindir|libdir] reference files under exec_prefix
"""
if unsafe_references_skippable(path, name, d):
return
if not elf:
import stat
import subprocess
pn = d.getVar('PN', True)
# Ensure we're checking an executable script
statinfo = os.stat(path)
if bool(statinfo.st_mode & stat.S_IXUSR):
# grep shell scripts for possible references to /exec_prefix/
exec_prefix = d.getVar('exec_prefix', True)
statement = "grep -e '%s/' %s > /dev/null" % (exec_prefix, path)
if subprocess.call(statement, shell=True) == 0:
error_msg = pn + ": Found a reference to %s/ in %s" % (exec_prefix, path)
package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
error_msg = "Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix"
package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
}
python gen_packagevar () {
def gen_packagevar(d):
ret = []
pkgs = (d.getVar("PACKAGES", True) or "").split()
vars = (d.getVar("PACKAGEVARS", True) or "").split()
for p in pkgs:
for v in vars:
ret.append(v + "_" + p)
return " ".join(ret)
}
python check_connectivity () {
def check_connectivity(d):
# URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
# using the same syntax as for SRC_URI. If the variable is not set
# the check is skipped
test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
retval = ""
# Only check connectivity if network enabled and the
# CONNECTIVITY_CHECK_URIS are set
network_enabled = not d.getVar('BB_NO_NETWORK', True)
check_enabled = len(test_uris)
# Take a copy of the data store and unset MIRRORS and PREMIRROS
data = bb.data.createCopy(d)
data.delVar('PREMIRRORS')
data.delVar('MIRRORS')
if check_enabled and network_enabled:
try:
fetcher = bb.fetch2.Fetch(test_uris, data)
fetcher.checkstatus()
except Exception:
# Allow the message to be configured so that users can be
# pointed to a support mechanism.
msg = data.getVar('CONNECTIVITY_CHECK_MSG', True) or ""
if len(msg) == 0:
msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n"
retval = msg
return retval
}
python do_cleansstate () {
sstate_clean_cachefiles(d)
}
python package_rpm_fn () {
d.setVar('PKGFN', d.getVar('PKG'))
}
python get_libc_locales_dependencies () {
def get_libc_locales_dependencies(d):
if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''
else:
return ''}
python get_kernelversion () {
def get_kernelversion(p):
import re
fn = p + '/include/linux/utsrelease.h'
if not os.path.isfile(fn):
# after 2.6.33-rc1
fn = p + '/include/generated/utsrelease.h'
if not os.path.isfile(fn):
fn = p + '/include/linux/version.h'
import re
try:
f = open(fn, 'r')
except IOError:
return None
l = f.readlines()
f.close()
r = re.compile("#define UTS_RELEASE \"(.*)\"")
for s in l:
m = r.match(s)
if m:
return m.group(1)
return None
}
python splitfile2 () {
def splitfile2(debugsrcdir, d):
# Function to split a single file, called from split_and_strip_files below
#
# The debug src information processed in the splitfile2 is further procecessed
# and copied to the destination here.
import commands, stat, subprocess
sourcefile = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/debugsources.list")
if debugsrcdir and os.path.isfile(sourcefile):
dvar = d.getVar('PKGD', True)
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
strip = d.getVar("STRIP", True)
objcopy = d.getVar("OBJCOPY", True)
debugedit = d.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR", True)
workparentdir = os.path.dirname(workdir)
workbasedir = os.path.basename(workdir)
nosuchdir = []
basepath = dvar
for p in debugsrcdir.split("/"):
basepath = basepath + "/" + p
if not os.path.exists(basepath):
nosuchdir.append(basepath)
bb.mkdirhier(basepath)
processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
# We need to ignore files that are not actually ours
# we do this by only paying attention to items from this package
processdebugsrc += "fgrep -z '%s' | "
processdebugsrc += "(cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)"
subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True)
# The copy by cpio may have resulted in some empty directories! Remove these
for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)):
for d in dirs:
dir = os.path.join(root, d)
#bb.note("rmdir -p %s" % dir)
subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True)
# Also remove debugsrcdir if its empty
for p in nosuchdir[::-1]:
if os.path.exists(p) and not os.listdir(p):
os.rmdir(p)
}
python return_spdx () {
def return_spdx(d, license):
"""
This function returns the spdx mapping of a license.
"""
if d.getVarFlag('SPDXLICENSEMAP', license) != None:
return license
else:
return d.getVarFlag('SPDXLICENSEMAP', license_type)
}
python base_version_less_or_equal () {
def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
}
python get_cputime () {
def get_cputime():
fields = open("/proc/stat", "r").readline().rstrip().split()[1:]
return sum(int(field) for field in fields)
}
python base_do_patch () {
bb.build.exec_func('patch_do_patch', d)
}
python runtime_mapping_rename () {
def runtime_mapping_rename (varname, d):
#bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
new_depends = []
deps = bb.utils.explode_dep_versions(d.getVar(varname, True) or "")
for depend in deps:
# Have to be careful with any version component of the depend
new_depend = get_package_mapping(depend, d)
if deps[depend]:
new_depends.append("%s (%s)" % (new_depend, deps[depend]))
else:
new_depends.append(new_depend)
d.setVar(varname, " ".join(new_depends) or None)
#bb.note("%s after: %s" % (varname, d.getVar(varname, True)))
}
python split_and_strip_files () {
import commands, stat, errno, subprocess
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
# We default to '.debug' style
if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory':
# Single debug-file-directory style debug info
debugappend = ".debug"
debugdir = ""
debuglibdir = "/usr/lib/debug"
debugsrcdir = "/usr/src/debug"
else:
# Original OE-core, a.k.a. ".debug", style debug info
debugappend = ""
debugdir = "/.debug"
debuglibdir = ""
debugsrcdir = "/usr/src/debug"
os.chdir(dvar)
# Return type (bits):
# 0 - not elf
# 1 - ELF
# 2 - stripped
# 4 - executable
# 8 - shared library
def isELF(path):
type = 0
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
if ret:
bb.error("split_and_strip_files: 'file %s' failed" % path)
return type
# Not stripped
if "ELF" in result:
type |= 1
if "not stripped" not in result:
type |= 2
if "executable" in result:
type |= 4
if "shared" in result:
type |= 8
return type
#
# First lets figure out all of the files we may have to process ... do this only once!
#
file_list = {}
file_links = {}
if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \
(d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
# Only process files (and symlinks)... Skip files that are obviously debug files
if not (debugappend != "" and file.endswith(debugappend)) and \
not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and \
os.path.isfile(file):
try:
s = os.stat(file)
except OSError, (err, strerror):
if err != errno.ENOENT:
raise
# Skip broken symlinks
continue
# Is the item excutable? Then we need to process it.
if (s[stat.ST_MODE] & stat.S_IXUSR) or \
(s[stat.ST_MODE] & stat.S_IXGRP) or \
(s[stat.ST_MODE] & stat.S_IXOTH):
# If it's a symlink, and points to an ELF file, we capture the readlink target
if os.path.islink(file):
target = os.readlink(file)
if not os.path.isabs(target):
ltarget = os.path.join(os.path.dirname(file), target)
else:
ltarget = target
if isELF(ltarget):
#bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget)))
file_list[file] = "sym: " + target
continue
# It's a file (or hardlink), not a link
# ...but is it ELF, and is it already stripped?
elf_file = isELF(file)
if elf_file & 1:
# Check if it's a hard link to something else
if s.st_nlink > 1:
file_reference = "%d_%d" % (s.st_dev, s.st_ino)
# Hard link to something else
file_list[file] = "hard: " + file_reference
continue
file_list[file] = "ELF: %d" % elf_file
#
# First lets process debug splitting
#
if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
for file in file_list:
src = file[len(dvar):]
dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
fpath = dvar + dest
# Preserve symlinks in debug area...
if file_list[file].startswith("sym: "):
ltarget = file_list[file][5:]
lpath = os.path.dirname(ltarget)
lbase = os.path.basename(ltarget)
ftarget = ""
if lpath and lpath != ".":
ftarget += lpath + debugdir + "/"
ftarget += lbase + debugappend
if lpath.startswith(".."):
ftarget = os.path.join("..", ftarget)
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Symlink %s -> %s" % (fpath, ftarget))
os.symlink(ftarget, fpath)
continue
# Preserve hard links in debug area...
file_reference = ""
if file_list[file].startswith("hard: "):
file_reference = file_list[file][6:]
if file_reference not in file_links:
# If this is a new file, add it as a reference, and
# update it's type, so we can fall through and split
file_list[file] = "ELF: %d" % (isELF(file))
else:
target = file_links[file_reference][len(dvar):]
ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Link %s -> %s" % (fpath, ftarget))
os.link(ftarget, fpath)
continue
# It's ELF...
if file_list[file].startswith("ELF: "):
elf_file = int(file_list[file][5:])
if elf_file & 2:
bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (src, pn))
continue
# Split the file...
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Split %s -> %s" % (file, fpath))
# Only store off the hard link reference if we successfully split!
if splitfile(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
file_links[file_reference] = file
# The above may have generated dangling symlinks, remove them!
# Dangling symlinks are a result of something NOT being split, such as a stripped binary.
# This should be a rare occurance, but we want to clean up anyway.
for file in file_list:
if file_list[file].startswith("sym: "):
src = file[len(dvar):]
dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
fpath = dvar + dest
try:
s = os.stat(fpath)
except OSError, (err, strerror):
if err != errno.ENOENT:
raise
#bb.note("Remove dangling link %s -> %s" % (fpath, os.readlink(fpath)))
os.unlink(fpath)
# This could leave an empty debug directory laying around
# take care of the obvious case...
subprocess.call("rmdir %s 2>/dev/null" % os.path.dirname(fpath), shell=True)
# Process the debugsrcdir if requested...
# This copies and places the referenced sources for later debugging...
splitfile2(debugsrcdir, d)
#
# End of debug splitting
#
#
# Now lets go back over things and strip them
#
if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for file in file_list:
if file_list[file].startswith("ELF: "):
elf_file = int(file_list[file][5:])
#bb.note("Strip %s" % file)
runstrip(file, elf_file, d)
if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
if not f.endswith(".ko"):
continue
runstrip(os.path.join(root, f), None, d)
#
# End of strip
#
}
python patch_do_patch () {
import oe.patch
patchsetmap = {
"patch": oe.patch.PatchTree,
"quilt": oe.patch.QuiltTree,
"git": oe.patch.GitApplyTree,
}
cls = patchsetmap[d.getVar('PATCHTOOL', True) or 'quilt']
resolvermap = {
"noop": oe.patch.NOOPResolver,
"user": oe.patch.UserResolver,
}
rcls = resolvermap[d.getVar('PATCHRESOLVE', True) or 'user']
classes = {}
s = d.getVar('S', True)
path = os.getenv('PATH')
os.putenv('PATH', d.getVar('PATH', True))
for patch in src_patches(d):
_, _, local, _, _, parm = bb.decodeurl(patch)
if "patchdir" in parm:
patchdir = parm["patchdir"]
if not os.path.isabs(patchdir):
patchdir = os.path.join(s, patchdir)
else:
patchdir = s
if not patchdir in classes:
patchset = cls(patchdir, d)
resolver = rcls(patchset, oe_terminal)
classes[patchdir] = (patchset, resolver)
patchset.Clean()
else:
patchset, resolver = classes[patchdir]
bb.note("Applying patch '%s' (%s)" % (parm['patchname'], oe.path.format_display(local, d)))
try:
patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
except Exception as exc:
bb.fatal(str(exc))
try:
resolver.Resolve()
except bb.BBHandledException as e:
bb.fatal(str(e))
}
python pkgarch_mapping () {
def pkgarch_mapping(d):
# Compatibility mappings of TUNE_PKGARCH (opt in)
if d.getVar("PKGARCHCOMPAT_ARMV7A", True):
if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon":
d.setVar("TUNE_PKGARCH", "armv7a")
}
python populate_packages_prepend () {
None}
python run_buildstats () {
import bb.build
import bb.event
import bb.data
import time, subprocess, platform
if isinstance(e, bb.event.BuildStarted):
########################################################################
# at first pass make the buildstats heriarchy and then
# set the buildname
########################################################################
try:
bb.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
except:
pass
set_bn(e)
bn = get_bn(e)
set_device(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
try:
bb.mkdirhier(bsdir)
except:
pass
if device != "NoLogicalDevice":
set_diskdata("__diskdata_build", device, e.data)
set_timedata("__timedata_build", e.data)
build_time = os.path.join(bsdir, "build_stats")
# write start of build into build_time
file = open(build_time,"a")
host_info = platform.uname()
file.write("Host Info: ")
for x in host_info:
if x:
file.write(x + " ")
file.write("\n")
file.write("Build Started: %0.2f \n" % time.time())
file.close()
elif isinstance(e, bb.event.BuildCompleted):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
build_time = os.path.join(bsdir, "build_stats")
file = open(build_time, "a")
########################################################################
# Write build statistics for the build
########################################################################
timedata = get_timedata("__timedata_build", e.data)
if timedata:
time, cpu = timedata
# write end of build and cpu used into build_time
file = open(build_time, "a")
file.write("Elapsed time: %0.2f seconds \n" % (time))
if cpu:
file.write("CPU usage: %0.1f%% \n" % cpu)
if device != "NoLogicalDevice":
diskio = get_diskdata("__diskdata_build", device, e.data)
if diskio:
for key in sorted(diskio.iterkeys()):
file.write(key + ": " + diskio[key] + "\n")
file.close()
if isinstance(e, bb.build.TaskStarted):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
if device != "NoLogicalDevice":
set_diskdata("__diskdata_task", device, e.data)
set_timedata("__timedata_task", e.data)
try:
bb.mkdirhier(taskdir)
except:
pass
# write into the task event file the name and start time
file = open(os.path.join(taskdir, e.task), "a")
file.write("Event: %s \n" % bb.event.getName(e))
file.write("Started: %0.2f \n" % time.time())
file.close()
elif isinstance(e, bb.build.TaskSucceeded):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
write_task_data("passed", os.path.join(taskdir, e.task), device, e)
if e.task == "do_rootfs":
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
bs=os.path.join(bsdir, "build_stats")
file = open(bs,"a")
rootfs = e.data.getVar('IMAGE_ROOTFS', True)
rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read()
file.write("Uncompressed Rootfs size: %s" % rootfs_size)
file.close()
elif isinstance(e, bb.build.TaskFailed):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
write_task_data("failed", os.path.join(taskdir, e.task), device, e)
########################################################################
# Lets make things easier and tell people where the build failed in
# build_status. We do this here because BuildCompleted triggers no
# matter what the status of the build actually is
########################################################################
build_status = os.path.join(bsdir, "build_stats")
file = open(build_status,"a")
file.write(e.data.expand("Failed at: linux-xilinx-3.3.0-r0 at task: %s \n" % e.task))
file.close()
}
python package_qa_check_rdepends () {
def package_qa_check_rdepends(pkg, pkgdest, skip, d):
# Don't do this check for kernel/module recipes, there aren't too many debug/development
# packages and you can get false positives e.g. on kernel-module-lirc-dev
if bb.data.inherits_class("kernel", d) or bb.data.inherits_class("module-base", d):
return True
sane = True
if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg:
# Copied from package_ipk.bbclass
# boiler plate to update the data
localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg)
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
pkgname = localdata.getVar('PKG_%s' % pkg, True)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', pkg)
bb.data.update_data(localdata)
# Now check the RDEPENDS
rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
# Now do the sanity check!!!
for rdepend in rdepends:
if "-dbg" in rdepend and "debug-deps" not in skip:
error_msg = "%s rdepends on %s" % (pkgname,rdepend)
sane = package_qa_handle_error("debug-deps", error_msg, d)
if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
error_msg = "%s rdepends on %s" % (pkgname, rdepend)
sane = package_qa_handle_error("dev-deps", error_msg, d)
return sane
}
python explode_deps () {
def explode_deps(s):
return bb.utils.explode_deps(s)
}
python package_qa_check_rpath () {
def package_qa_check_rpath(file,name, d, elf, messages):
"""
Check for dangerous RPATHs
"""
if not elf:
return
scanelf = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'scanelf')
bad_dirs = [d.getVar('TMPDIR', True) + "/work", d.getVar('STAGING_DIR_TARGET', True)]
bad_dir_test = d.getVar('TMPDIR', True)
if not os.path.exists(scanelf):
bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found")
if not bad_dirs[0] in d.getVar('WORKDIR', True):
bb.fatal("This class assumed that WORKDIR is /tool/yocto/poky/build/tmp/work... Not doing any check")
output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file))
txt = output.readline().split()
for line in txt:
for dir in bad_dirs:
if dir in line:
messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file))
}
python map_kernel_arch () {
def map_kernel_arch(a, d):
import re
valid_archs = d.getVar('valid_archs', True).split()
if re.match('(i.86|athlon|x86.64)$', a): return 'x86'
elif re.match('arm26$', a): return 'arm26'
elif re.match('armeb$', a): return 'arm'
elif re.match('mips(el|64|64el)$', a): return 'mips'
elif re.match('p(pc|owerpc)(|64)', a): return 'powerpc'
elif re.match('sh(3|4)$', a): return 'sh'
elif re.match('bfin', a): return 'blackfin'
elif re.match('microblazeel', a): return 'microblaze'
elif a in valid_archs: return a
else:
bb.error("cannot map '%s' to a linux kernel architecture" % a)
}
python perform_packagecopy () {
import subprocess
dest = d.getVar('D', True)
dvar = d.getVar('PKGD', True)
bb.mkdirhier(dvar)
# Start by package population by taking a copy of the installed
# files to operate on
subprocess.call('rm -rf %s/*' % (dvar), shell=True)
# Preserve sparse files and hard links
subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True)
}
python package_depchains () {
"""
For a given set of prefix and postfix modifiers, make those packages
RRECOMMENDS on the corresponding packages for its RDEPENDS.
Example: If package A depends upon package B, and A's .bb emits an
A-dev package, this would make A-dev Recommends: B-dev.
If only one of a given suffix is specified, it will take the RRECOMMENDS
based on the RDEPENDS of *all* other packages. If more than one of a given
suffix is specified, its will only use the RDEPENDS of the single parent
package.
"""
packages = d.getVar('PACKAGES', True)
postfixes = (d.getVar('DEPCHAIN_POST', True) or '').split()
prefixes = (d.getVar('DEPCHAIN_PRE', True) or '').split()
def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
#bb.note('depends for %s is %s' % (base, depends))
rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
for depend in depends:
if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
#bb.note("Skipping %s" % depend)
continue
if depend.endswith('-dev'):
depend = depend.replace('-dev', '')
if depend.endswith('-dbg'):
depend = depend.replace('-dbg', '')
pkgname = getname(depend, suffix)
#bb.note("Adding %s for %s" % (pkgname, depend))
if pkgname not in rreclist:
rreclist[pkgname] = ""
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
#bb.note('rdepends for %s is %s' % (base, rdepends))
rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
for depend in rdepends:
if depend.find('virtual-locale-') != -1:
#bb.note("Skipping %s" % depend)
continue
if depend.endswith('-dev'):
depend = depend.replace('-dev', '')
if depend.endswith('-dbg'):
depend = depend.replace('-dbg', '')
pkgname = getname(depend, suffix)
#bb.note("Adding %s for %s" % (pkgname, depend))
if pkgname not in rreclist:
rreclist[pkgname] = ""
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
def add_dep(list, dep):
dep = dep.split(' (')[0].strip()
if dep not in list:
list.append(dep)
depends = []
for dep in bb.utils.explode_deps(d.getVar('DEPENDS', True) or ""):
add_dep(depends, dep)
rdepends = []
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS', True) or ""):
add_dep(rdepends, dep)
for pkg in packages.split():
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + pkg, True) or ""):
add_dep(rdepends, dep)
#bb.note('rdepends is %s' % rdepends)
def post_getname(name, suffix):
return '%s%s' % (name, suffix)
def pre_getname(name, suffix):
return '%s%s' % (suffix, name)
pkgs = {}
for pkg in packages.split():
for postfix in postfixes:
if pkg.endswith(postfix):
if not postfix in pkgs:
pkgs[postfix] = {}
pkgs[postfix][pkg] = (pkg[:-len(postfix)], post_getname)
for prefix in prefixes:
if pkg.startswith(prefix):
if not prefix in pkgs:
pkgs[prefix] = {}
pkgs[prefix][pkg] = (pkg[:-len(prefix)], pre_getname)
for suffix in pkgs:
for pkg in pkgs[suffix]:
if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs'):
continue
(base, func) = pkgs[suffix][pkg]
if suffix == "-dev":
pkg_adddeprrecs(pkg, base, suffix, func, depends, d)
if len(pkgs[suffix]) == 1:
pkg_addrrecs(pkg, base, suffix, func, rdepends, d)
else:
rdeps = []
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + base, True) or d.getVar('RDEPENDS', True) or ""):
add_dep(rdeps, dep)
pkg_addrrecs(pkg, base, suffix, func, rdeps, d)
}
python sstate_task_postfunc () {
shared_state = sstate_state_fromvars(d)
sstate_install(shared_state, d)
for intercept in shared_state['interceptfuncs']:
bb.build.exec_func(intercept, d)
sstate_package(shared_state, d)
}
python sysroot_checkhashes () {
def sysroot_checkhashes(covered, tasknames, fnids, fns, d):
problems = set()
configurefnids = set()
for task in xrange(len(tasknames)):
if tasknames[task] == "do_configure" and task not in covered:
configurefnids.add(fnids[task])
for task in covered:
if tasknames[task] == "do_populate_sysroot" and fnids[task] in configurefnids:
problems.add(task)
return problems
}
python populate_packages () {
def extract_modinfo(file):
import tempfile, re, subprocess
tempfile.tempdir = d.getVar("WORKDIR", True)
tf = tempfile.mkstemp()
tmpfile = tf[1]
cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", True), d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
subprocess.call(cmd, shell=True)
f = open(tmpfile)
l = f.read().split("\000")
f.close()
os.close(tf[0])
os.unlink(tmpfile)
exp = re.compile("([^=]+)=(.*)")
vals = {}
for i in l:
m = exp.match(i)
if not m:
continue
vals[m.group(1)] = m.group(2)
return vals
def parse_depmod():
import re
dvar = d.getVar('PKGD', True)
if not dvar:
bb.error("PKGD not defined")
return
kernelver = d.getVar('KERNEL_VERSION', True)
kernelver_stripped = kernelver
m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
if m:
kernelver_stripped = m.group(1)
path = d.getVar("PATH", True)
cmd = "PATH=\"%s\" depmod -n -a -b %s -F %s/boot/System.map-%s %s" % (path, dvar, dvar, kernelver, kernelver_stripped)
f = os.popen(cmd, 'r')
deps = {}
pattern0 = "^(.*\.k?o):..*$"
pattern1 = "^(.*\.k?o):\s*(.*\.k?o)\s*$"
pattern2 = "^(.*\.k?o):\s*(.*\.k?o)\s*\\\$"
pattern3 = "^\t(.*\.k?o)\s*\\\$"
pattern4 = "^\t(.*\.k?o)\s*$"
line = f.readline()
while line:
if not re.match(pattern0, line):
line = f.readline()
continue
m1 = re.match(pattern1, line)
if m1:
deps[m1.group(1)] = m1.group(2).split()
else:
m2 = re.match(pattern2, line)
if m2:
deps[m2.group(1)] = m2.group(2).split()
line = f.readline()
m3 = re.match(pattern3, line)
while m3:
deps[m2.group(1)].extend(m3.group(1).split())
line = f.readline()
m3 = re.match(pattern3, line)
m4 = re.match(pattern4, line)
deps[m2.group(1)].extend(m4.group(1).split())
line = f.readline()
f.close()
return deps
def get_dependencies(file, pattern, format):
# file no longer includes PKGD
file = file.replace(d.getVar('PKGD', True) or '', '', 1)
# instead is prefixed with /lib/modules/3.3.0-14.2-build1
file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
if module_deps.has_key(file):
import re
dependencies = []
for i in module_deps[file]:
m = re.match(pattern, os.path.basename(i))
if not m:
continue
on = legitimize_package_name(m.group(1))
dependency_pkg = format % on
dependencies.append(dependency_pkg)
return dependencies
return []
def frob_metadata(file, pkg, pattern, format, basename):
import re
vals = extract_modinfo(file)
dvar = d.getVar('PKGD', True)
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
# appropriate modprobe commands to the postinst
autoload = d.getVar('module_autoload_%s' % basename, True)
if autoload:
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
for m in autoload.split():
f.write('%s\n' % m)
f.close()
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
if not postinst:
bb.fatal("pkg_postinst_%s not defined" % pkg)
postinst += d.getVar('autoload_postinst_fragment', True) % autoload
d.setVar('pkg_postinst_%s' % pkg, postinst)
# Write out any modconf fragment
modconf = d.getVar('module_conf_%s' % basename, True)
if modconf:
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
f.write("%s\n" % modconf)
f.close()
files = d.getVar('FILES_%s' % pkg, True)
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
d.setVar('FILES_%s' % pkg, files)
if vals.has_key("description"):
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
rdepends_str = d.getVar('RDEPENDS_' + pkg, True)
if rdepends_str:
rdepends = rdepends_str.split()
else:
rdepends = []
rdepends.extend(get_dependencies(file, pattern, format))
d.setVar('RDEPENDS_' + pkg, ' '.join(rdepends))
module_deps = parse_depmod()
module_regex = '^(.*)\.k?o$'
module_pattern = 'kernel-module-%s'
postinst = d.getVar('pkg_postinst_modules', True)
postrm = d.getVar('pkg_postrm_modules', True)
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True))
# If modules-load.d and modprobe.d are empty at this point, remove them to
# avoid warnings. removedirs only raises an OSError if an empty
# directory cannot be removed.
dvar = d.getVar('PKGD', True)
for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
if len(os.listdir(dir)) == 0:
os.rmdir(dir)
import re
metapkg = "kernel-modules"
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
d.setVar('FILES_' + metapkg, "")
blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ]
for l in module_deps.values():
for i in l:
pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
blacklist.append(pkg)
metapkg_rdepends = []
packages = d.getVar('PACKAGES', True).split()
for pkg in packages[1:]:
if not pkg in blacklist and not pkg in metapkg_rdepends:
metapkg_rdepends.append(pkg)
d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
d.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package')
packages.append(metapkg)
d.setVar('PACKAGES', ' '.join(packages))
import glob, stat, errno, re, subprocess
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR', True)
dvar = d.getVar('PKGD', True)
packages = d.getVar('PACKAGES', True)
pn = d.getVar('PN', True)
bb.mkdirhier(outdir)
os.chdir(dvar)
# Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
# Sanity should be moved to sanity.bbclass once we have the infrastucture
package_list = []
for pkg in packages.split():
if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
packages.remove(pkg)
else:
if pkg in package_list:
bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
else:
package_list.append(pkg)
d.setVar('PACKAGES', ' '.join(package_list))
pkgdest = d.getVar('PKGDEST', True)
subprocess.call('rm -rf %s' % pkgdest, shell=True)
seen = []
for pkg in package_list:
localdata = bb.data.createCopy(d)
root = os.path.join(pkgdest, pkg)
bb.mkdirhier(root)
localdata.setVar('PKG', pkg)
overrides = localdata.getVar('OVERRIDES', True)
if not overrides:
raise bb.build.FuncFailed('OVERRIDES not defined')
localdata.setVar('OVERRIDES', overrides + ':' + pkg)
bb.data.update_data(localdata)
filesvar = localdata.getVar('FILES', True) or ""
files = filesvar.split()
file_links = {}
for file in files:
if file.find("//") != -1:
bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
file.replace("//", "/")
if os.path.isabs(file):
file = '.' + file
if not os.path.islink(file):
if os.path.isdir(file):
newfiles = [ os.path.join(file,x) for x in os.listdir(file) ]
if newfiles:
files += newfiles
continue
globbed = glob.glob(file)
if globbed:
if [ file ] != globbed:
files += globbed
continue
if (not os.path.islink(file)) and (not os.path.exists(file)):
continue
if file in seen:
continue
seen.append(file)
def mkdir(src, dest, p):
src = os.path.join(src, p)
dest = os.path.join(dest, p)
bb.mkdirhier(dest)
fstat = os.stat(src)
os.chmod(dest, fstat.st_mode)
os.chown(dest, fstat.st_uid, fstat.st_gid)
if p not in seen:
seen.append(p)
def mkdir_recurse(src, dest, paths):
while paths.startswith("./"):
paths = paths[2:]
p = "."
for c in paths.split("/"):
p = os.path.join(p, c)
if not os.path.exists(os.path.join(dest, p)):
mkdir(src, dest, p)
if os.path.isdir(file) and not os.path.islink(file):
mkdir_recurse(dvar, root, file)
continue
mkdir_recurse(dvar, root, os.path.dirname(file))
fpath = os.path.join(root,file)
if not os.path.islink(file):
os.link(file, fpath)
fstat = os.stat(file)
os.chmod(fpath, fstat.st_mode)
os.chown(fpath, fstat.st_uid, fstat.st_gid)
continue
ret = bb.copyfile(file, fpath)
if ret is False or ret == 0:
raise bb.build.FuncFailed("File population failed")
del localdata
os.chdir(workdir)
unshipped = []
for root, dirs, files in os.walk(dvar):
dir = root[len(dvar):]
if not dir:
dir = os.sep
for f in (files + dirs):
path = os.path.join(dir, f)
if ('.' + path) not in seen:
unshipped.append(path)
if unshipped != []:
bb.warn("For recipe %s, the following files/directories were installed but not shipped in any package:" % pn)
for f in unshipped:
bb.warn(" " + f)
bb.build.exec_func("package_name_hook", d)
for pkg in package_list:
pkgname = d.getVar('PKG_%s' % pkg, True)
if pkgname is None:
d.setVar('PKG_%s' % pkg, pkg)
dangling_links = {}
pkg_files = {}
for pkg in package_list:
dangling_links[pkg] = []
pkg_files[pkg] = []
inst_root = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(inst_root):
for f in files:
path = os.path.join(root, f)
rpath = path[len(inst_root):]
pkg_files[pkg].append(rpath)
try:
s = os.stat(path)
except OSError, (err, strerror):
if err != errno.ENOENT:
raise
target = os.readlink(path)
if target[0] != '/':
target = os.path.join(root[len(inst_root):], target)
dangling_links[pkg].append(os.path.normpath(target))
for pkg in package_list:
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
for l in dangling_links[pkg]:
found = False
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
for p in package_list:
for f in pkg_files[p]:
if f == l:
found = True
bb.debug(1, "target found in %s" % p)
if p == pkg:
break
if p not in rdepends:
rdepends[p] = ""
break
if found == False:
bb.note("%s contains dangling symlink to %s" % (pkg, l))
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
python generate_git_config () {
def generate_git_config(e):
from bb import data
if data.getVar('GIT_CORE_CONFIG', e.data, True):
gitconfig_path = e.data.getVar('GIT_CONFIG', True)
proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True)
bb.mkdirhier(e.data.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc"))
if (os.path.exists(gitconfig_path)):
os.remove(gitconfig_path)
f = open(gitconfig_path, 'w')
f.write("[core]\n")
ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, True).split()
for ignore_host in ignore_hosts:
f.write(" gitProxy = none for %s\n" % ignore_host)
f.write(proxy_command)
f.close
}
python extend_variants () {
def extend_variants(d, var, extend, delim=':'):
"""Return a string of all bb class extend variants for the given extend"""
variants = []
whole = d.getVar(var, True) or ""
for ext in whole.split():
eext = ext.split(delim)
if len(eext) > 1 and eext[0] == extend:
variants.append(eext[1])
return " ".join(variants)
}
python buildcfg_vars () {
def buildcfg_vars(d):
statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
for var in statusvars:
value = d.getVar(var, True)
if value is not None:
yield '%-17s = "%s"' % (var, value)
}
python package_qa_check_unsafe_references_in_binaries () {
def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages):
"""
Ensure binaries in base_[bindir|sbindir|libdir] do not link to files under exec_prefix
"""
if unsafe_references_skippable(path, name, d):
return
if elf:
import subprocess as sub
pn = d.getVar('PN', True)
exec_prefix = d.getVar('exec_prefix', True)
sysroot_path = d.getVar('STAGING_DIR_TARGET', True)
sysroot_path_usr = sysroot_path + exec_prefix
try:
ldd_output = bb.process.Popen(["prelink-rtld", "--root", sysroot_path, path], stdout=sub.PIPE).stdout.read()
except bb.process.CmdError:
error_msg = pn + ": prelink-rtld aborted when processing %s" % path
package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
return False
if sysroot_path_usr in ldd_output:
ldd_output = ldd_output.replace(sysroot_path, "")
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
for package in packages.split():
short_path = path.replace('%s/%s' % (pkgdest, package), "", 1)
if (short_path != path):
break
base_err = pn + ": %s, installed in the base_prefix, requires a shared library under exec_prefix (%s)" % (short_path, exec_prefix)
for line in ldd_output.split('\n'):
if exec_prefix in line:
error_msg = "%s: %s" % (base_err, line.strip())
package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
return False
}
python get_package_mapping () {
def get_package_mapping (pkg, d):
import oe.packagedata
data = oe.packagedata.read_subpkgdata(pkg, d)
key = "PKG_%s" % pkg
if key in data:
return data[key]
return pkg
}
python sstate_task_prefunc () {
shared_state = sstate_state_fromvars(d)
sstate_clean(shared_state, d)
}
python check_sanity_sstate_dir_change () {
def check_sanity_sstate_dir_change(sstate_dir, data):
# Sanity checks to be done when the value of SSTATE_DIR changes
# Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS)
testmsg = ""
if sstate_dir != "":
testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
# If we don't have permissions to SSTATE_DIR, suggest the user set it as an SSTATE_MIRRORS
try:
err = testmsg.split(': ')[1].strip()
if err == "Permission denied.":
testmsg = testmsg + "You could try using %s in SSTATE_MIRRORS rather than as an SSTATE_CACHE.\n" % (sstate_dir)
except IndexError:
pass
return testmsg
}
python sstate_setscene () {
def sstate_setscene(d):
shared_state = sstate_state_fromvars(d)
accelerate = sstate_installpkg(shared_state, d)
if not accelerate:
raise bb.build.FuncFailed("No suitable staging package found")
}
python find_board () {
def find_board(a, d):
# Given a xps project path return the board board model
board = "unknown"
if a and os.path.exists(a):
try:
xps_proj = os.path.join(a, "system.mhs")
xps_hwd = file(xps_proj, 'r')
for l in xps_hwd:
if "Target Board" in l:
board = l
break
# Close file descriptor
xps_hwd.close()
if board != "unknown":
# Strip board board name
board = board.split()
return board[6].lower()
else:
return board
except IOError:
return board
else:
return board}
python base_path_relative () {
def base_path_relative(src, dest):
return oe.path.relative(src, dest)
}
python do_deploy_setscene () {
sstate_setscene(d)
}
python do_cleanall () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.clean()
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python sstate_package () {
def sstate_package(ss, d):
import oe.path
def make_relative_symlink(path, outputpath, d):
# Replace out absolute TMPDIR paths in symlinks with relative ones
if not os.path.islink(path):
return
link = os.readlink(path)
if not os.path.isabs(link):
return
if not link.startswith(tmpdir):
return
depth = link.rpartition(tmpdir)[2].count('/')
base = link.partition(tmpdir)[2].strip()
while depth > 1:
base = "../" + base
depth -= 1
bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base))
os.remove(path)
os.symlink(base, path)
tmpdir = d.getVar('TMPDIR', True)
sstatebuild = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sstate-build-%s/" % ss['name'])
sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['name'] + ".tgz"
bb.mkdirhier(sstatebuild)
bb.mkdirhier(os.path.dirname(sstatepkg))
for state in ss['dirs']:
srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
for walkroot, dirs, files in os.walk(state[1]):
for file in files:
srcpath = os.path.join(walkroot, file)
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
make_relative_symlink(srcpath, dstpath, d)
for dir in dirs:
srcpath = os.path.join(walkroot, dir)
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
make_relative_symlink(srcpath, dstpath, d)
bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0]))
oe.path.copytree(state[1], sstatebuild + state[0])
workdir = d.getVar('WORKDIR', True)
for plain in ss['plaindirs']:
pdir = plain.replace(workdir, sstatebuild)
bb.mkdirhier(plain)
bb.mkdirhier(pdir)
oe.path.copytree(plain, pdir)
d.setVar('SSTATE_BUILDDIR', sstatebuild)
d.setVar('SSTATE_PKG', sstatepkg)
sstate_hardcode_path(d)
bb.build.exec_func('sstate_create_package', d)
bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
return
}
python do_populate_lic () {
"""
Populate LICENSE_DIRECTORY with licenses.
"""
import os
import bb
import shutil
import oe.license
pn = d.getVar('PN', True)
for package in d.getVar('PACKAGES', True):
if d.getVar('LICENSE_' + pn + '-' + package, True):
license_types = license_types + ' & ' + \
d.getVar('LICENSE_' + pn + '-' + package, True)
#If we get here with no license types, then that means we have a recipe
#level license. If so, we grab only those.
try:
license_types
except NameError:
# All the license types at the recipe level
license_types = d.getVar('LICENSE', True)
# All the license files for the package
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
pn = d.getVar('PN', True)
# The base directory we wrangle licenses to
destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn)
# The license files are located in S/LIC_FILE_CHECKSUM.
srcdir = d.getVar('S', True)
# Directory we store the generic licenses as set in the distro configuration
generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
license_source_dirs = []
license_source_dirs.append(generic_directory)
try:
additional_lic_dirs = d.getVar('LICENSE_DIR', True).split()
for lic_dir in additional_lic_dirs:
license_source_dirs.append(lic_dir)
except:
pass
class FindVisitor(oe.license.LicenseVisitor):
def visit_Str(self, node):
#
# Until I figure out what to do with
# the two modifiers I support (or greater = +
# and "with exceptions" being *
# we'll just strip out the modifier and put
# the base license.
find_license(node.s.replace("+", "").replace("*", ""))
self.generic_visit(node)
def find_license(license_type):
try:
bb.mkdirhier(gen_lic_dest)
except:
pass
spdx_generic = None
license_source = None
# If the generic does not exist we need to check to see if there is an SPDX mapping to it
for lic_dir in license_source_dirs:
if not os.path.isfile(os.path.join(lic_dir, license_type)):
if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
# Great, there is an SPDXLICENSEMAP. We can copy!
bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type))
spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
license_source = lic_dir
break
elif os.path.isfile(os.path.join(lic_dir, license_type)):
spdx_generic = license_type
license_source = lic_dir
break
if spdx_generic and license_source:
# we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
# audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
bb.copyfile(os.path.join(license_source, spdx_generic), os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type))
if not os.path.isfile(os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type)):
# If the copy didn't occur, something horrible went wrong and we fail out
bb.warn("%s for %s could not be copied for some reason. It may not exist. WARN for now." % (spdx_generic, pn))
else:
# And here is where we warn people that their licenses are lousy
bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type))
pass
try:
bb.mkdirhier(destdir)
except:
pass
if not generic_directory:
raise bb.build.FuncFailed("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
if not lic_files:
# No recipe should have an invalid license file. This is checked else
# where, but let's be pedantic
bb.note(pn + ": Recipe file does not have license file information.")
return True
for url in lic_files.split():
(type, host, path, user, pswd, parm) = bb.decodeurl(url)
# We want the license file to be copied into the destination
srclicfile = os.path.join(srcdir, path)
ret = bb.copyfile(srclicfile, os.path.join(destdir, os.path.basename(path)))
# If the copy didn't occur, something horrible went wrong and we fail out
if not ret:
bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile)
v = FindVisitor()
try:
v.visit_string(license_types)
except oe.license.InvalidLicense as exc:
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
except SyntaxError:
bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
}
python package_qa_handle_error () {
def package_qa_handle_error(error_class, error_msg, d):
package_qa_write_error(error_msg, d)
if error_class in (d.getVar("ERROR_QA", True) or "").split():
bb.error("QA Issue: %s" % error_msg)
return False
else:
bb.warn("QA Issue: %s" % error_msg)
return True
}
python all_multilib_tune_values () {
def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
"""Return a string of all ${var} in all multilib tune configuration"""
values = []
value = d.getVar(var, True) or ""
if value != "":
if need_split:
for item in value.split(delim):
values.append(item)
else:
values.append(value)
variants = d.getVar("MULTILIB_VARIANTS", True) or ""
for item in variants.split():
localdata = bb.data.createCopy(d)
overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
localdata.setVar("OVERRIDES", overrides)
bb.data.update_data(localdata)
value = localdata.getVar(var, True) or ""
if value != "":
if need_split:
for item in value.split(delim):
values.append(item)
else:
values.append(value)
if unique:
#we do this to keep order as much as possible
ret = []
for value in values:
if not value in ret:
ret.append(value)
else:
ret = values
return " ".join(ret)}
python set_timedata () {
def set_timedata(var, data):
import time
time = time.time()
cputime = get_cputime()
proctime = get_process_cputime(os.getpid())
data.setVar(var, (time, cputime, proctime))
}
python package_get_auto_pr () {
# per recipe PRSERV_HOST PRSERV_PORT
pn = d.getVar('PN', True)
host = d.getVar("PRSERV_HOST_" + pn, True)
port = d.getVar("PRSERV_PORT_" + pn, True)
if not (host is None):
d.setVar("PRSERV_HOST", host)
if not (port is None):
d.setVar("PRSERV_PORT", port)
if d.getVar('USE_PR_SERV', True) != "0":
try:
auto_pr=prserv_get_pr_auto(d)
except Exception as e:
bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
return
if auto_pr is None:
if d.getVar('PRSERV_LOCKDOWN', True):
bb.fatal("Can NOT get PRAUTO from lockdown exported file")
else:
bb.fatal("Can NOT get PRAUTO from remote PR service")
return
d.setVar('PRAUTO',str(auto_pr))
}
python base_do_fetch () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.download()
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python do_populate_sysroot () {
#
# if do_stage exists, we're legacy. In that case run the do_stage,
# modify the SYSROOT_DESTDIR variable and then run the staging preprocess
# functions against staging directly.
#
# Otherwise setup a destdir, copy the results from do_install
# and run the staging preprocess against that
#
bb.build.exec_func("sysroot_stage_all", d)
for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
python package_name_hook () {
bb.build.exec_func('debian_package_name_hook', d)
}
python patch_path () {
def patch_path(url, fetch, workdir):
"""Return the local path of a patch, or None if this isn't a patch"""
local = fetch.localpath(url)
base, ext = os.path.splitext(os.path.basename(local))
if ext in ('.gz', '.bz2', '.Z'):
local = os.path.join(workdir, base)
ext = os.path.splitext(base)[1]
urldata = fetch.ud[url]
if "apply" in urldata.parm:
apply = oe.types.boolean(urldata.parm["apply"])
if not apply:
return
elif ext not in (".diff", ".patch"):
return
return local
}
python base_get_metadata_monotone_revision () {
def base_get_metadata_monotone_revision(path, d):
monotone_revision = "<unknown>"
try:
monotone_revision = file( "%s/_MTN/revision" % path ).read().strip()
if monotone_revision.startswith( "format_version" ):
monotone_revision_words = monotone_revision.split()
monotone_revision = monotone_revision_words[ monotone_revision_words.index( "old_revision" )+1][1:-1]
except IOError:
pass
return monotone_revision
}
python base_path_out () {
def base_path_out(path, d):
return oe.path.format_display(path, d)
}
python set_device () {
def set_device(e):
tmpdir = e.data.getVar('TMPDIR', True)
try:
os.remove(e.data.getVar('DEVFILE', True))
except:
pass
############################################################################
# We look for the volume TMPDIR lives on. To do all disks would make little
# sense and not give us any particularly useful data. In theory we could do
# something like stick DL_DIR on a different partition and this would
# throw stats gathering off. The same goes with SSTATE_DIR. However, let's
# get the basics in here and work on the cornercases later.
# A note. /proc/diskstats does not contain info on encryptfs, tmpfs, etc.
# If we end up hitting one of these fs, we'll just skip diskstats collection.
############################################################################
device=os.stat(tmpdir)
majordev=os.major(device.st_dev)
minordev=os.minor(device.st_dev)
############################################################################
# Bug 1700:
# Because tmpfs/encryptfs/ramfs etc inserts no entry in /proc/diskstats
# we set rdev to NoLogicalDevice and search for it later. If we find NLD
# we do not collect diskstats as the method to collect meaningful statistics
# for these fs types requires a bit more research.
############################################################################
rdev="NoLogicalDevice"
try:
for line in open("/proc/diskstats", "r"):
if majordev == int(line.split()[0]) and minordev == int(line.split()[1]):
rdev=line.split()[2]
except:
pass
file = open(e.data.getVar('DEVFILE', True), "w")
file.write(rdev)
file.close()
}
python sstate_clean_cachefiles () {
def sstate_clean_cachefiles(d):
for task in (d.getVar('SSTATETASKS', True) or "").split():
ss = sstate_state_fromvars(d, task[3:])
sstate_clean_cachefile(ss, d)
}
python do_split_packages () {
def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None, allow_links=False):
"""
Used in .bb files to split up dynamically generated subpackages of a
given package, usually plugins or modules.
"""
ml = d.getVar("MLPREFIX", True)
if ml:
if not output_pattern.startswith(ml):
output_pattern = ml + output_pattern
newdeps = []
for dep in (extra_depends or "").split():
if dep.startswith(ml):
newdeps.append(dep)
else:
newdeps.append(ml + dep)
if newdeps:
extra_depends = " ".join(newdeps)
dvar = d.getVar('PKGD', True)
packages = d.getVar('PACKAGES', True).split()
if postinst:
postinst = '#!/bin/sh\n' + postinst + '\n'
if postrm:
postrm = '#!/bin/sh\n' + postrm + '\n'
if not recursive:
objs = os.listdir(dvar + root)
else:
objs = []
for walkroot, dirs, files in os.walk(dvar + root):
for file in files:
relpath = os.path.join(walkroot, file).replace(dvar + root + '/', '', 1)
if relpath:
objs.append(relpath)
if extra_depends == None:
extra_depends = d.getVar("PN", True)
for o in sorted(objs):
import re, stat
if match_path:
m = re.match(file_regex, o)
else:
m = re.match(file_regex, os.path.basename(o))
if not m:
continue
f = os.path.join(dvar + root, o)
mode = os.lstat(f).st_mode
if not (stat.S_ISREG(mode) or (allow_links and stat.S_ISLNK(mode)) or (allow_dirs and stat.S_ISDIR(mode))):
continue
on = legitimize_package_name(m.group(1))
pkg = output_pattern % on
if not pkg in packages:
if prepend:
packages = [pkg] + packages
else:
packages.append(pkg)
oldfiles = d.getVar('FILES_' + pkg, True)
if not oldfiles:
the_files = [os.path.join(root, o)]
if aux_files_pattern:
if type(aux_files_pattern) is list:
for fp in aux_files_pattern:
the_files.append(fp % on)
else:
the_files.append(aux_files_pattern % on)
if aux_files_pattern_verbatim:
if type(aux_files_pattern_verbatim) is list:
for fp in aux_files_pattern_verbatim:
the_files.append(fp % m.group(1))
else:
the_files.append(aux_files_pattern_verbatim % m.group(1))
d.setVar('FILES_' + pkg, " ".join(the_files))
if extra_depends != '':
d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
d.setVar('DESCRIPTION_' + pkg, description % on)
if postinst:
d.setVar('pkg_postinst_' + pkg, postinst)
if postrm:
d.setVar('pkg_postrm_' + pkg, postrm)
else:
d.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o))
if callable(hook):
hook(f, pkg, file_regex, output_pattern, m.group(1))
d.setVar('PACKAGES', ' '.join(packages))
}
python sstate_state_fromvars () {
def sstate_state_fromvars(d, task = None):
if task is None:
task = d.getVar('BB_CURRENTTASK', True)
if not task:
bb.fatal("sstate code running without task context?!")
task = task.replace("_setscene", "")
name = d.getVarFlag("do_" + task, 'sstate-name', True)
inputs = (d.getVarFlag("do_" + task, 'sstate-inputdirs', True) or "").split()
outputs = (d.getVarFlag("do_" + task, 'sstate-outputdirs', True) or "").split()
plaindirs = (d.getVarFlag("do_" + task, 'sstate-plaindirs', True) or "").split()
lockfiles = (d.getVarFlag("do_" + task, 'sstate-lockfile', True) or "").split()
lockfilesshared = (d.getVarFlag("do_" + task, 'sstate-lockfile-shared', True) or "").split()
interceptfuncs = (d.getVarFlag("do_" + task, 'sstate-interceptfuncs', True) or "").split()
if not name or len(inputs) != len(outputs):
bb.fatal("sstate variables not setup correctly?!")
ss = sstate_init(name, task, d)
for i in range(len(inputs)):
sstate_add(ss, inputs[i], outputs[i], d)
ss['lockfiles'] = lockfiles
ss['lockfiles-shared'] = lockfilesshared
ss['plaindirs'] = plaindirs
ss['interceptfuncs'] = interceptfuncs
return ss
}
python unsafe_references_skippable () {
def unsafe_references_skippable(path, name, d):
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d):
return True
if "-dbg" in name or "-dev" in name:
return True
# Other package names to skip:
if name.startswith("kernel-module-"):
return True
# Skip symlinks
if os.path.islink(path):
return True
# Skip unusual rootfs layouts which make these tests irrelevant
exec_prefix = d.getVar('exec_prefix', True)
if exec_prefix == "":
return True
pkgdest = d.getVar('PKGDEST', True)
pkgdest = pkgdest + "/" + name
pkgdest = os.path.abspath(pkgdest)
base_bindir = pkgdest + d.getVar('base_bindir', True)
base_sbindir = pkgdest + d.getVar('base_sbindir', True)
base_libdir = pkgdest + d.getVar('base_libdir', True)
bindir = pkgdest + d.getVar('bindir', True)
sbindir = pkgdest + d.getVar('sbindir', True)
libdir = pkgdest + d.getVar('libdir', True)
if base_bindir == bindir and base_sbindir == sbindir and base_libdir == libdir:
return True
# Skip files not in base_[bindir|sbindir|libdir]
path = os.path.abspath(path)
if not (base_bindir in path or base_sbindir in path or base_libdir in path):
return True
return False
}
python set_diskdata () {
def set_diskdata(var, dev, data):
data.setVar(var, get_diskstats(dev))
}
python do_package_write_rpm () {
bb.build.exec_func("read_subpackage_metadata", d)
bb.build.exec_func("do_package_rpm", d)
}
python get_bn () {
def get_bn(e):
file = open(e.data.getVar('BNFILE', True))
bn = file.readline()
file.close()
return bn
}
python check_app_exists () {
def check_app_exists(app, d):
from bb import which, data
app = data.expand(app, d)
path = data.getVar('PATH', d, 1)
return bool(which(path, app))
}
python fixup_perms () {
import os, pwd, grp
# init using a string with the same format as a line as documented in
# the fs-perms.txt file
# <path> <mode> <uid> <gid> <walk> <fmode> <fuid> <fgid>
# <path> link <link target>
#
# __str__ can be used to print out an entry in the input format
#
# if fs_perms_entry.path is None:
# an error occured
# if fs_perms_entry.link, you can retrieve:
# fs_perms_entry.path = path
# fs_perms_entry.link = target of link
# if not fs_perms_entry.link, you can retrieve:
# fs_perms_entry.path = path
# fs_perms_entry.mode = expected dir mode or None
# fs_perms_entry.uid = expected uid or -1
# fs_perms_entry.gid = expected gid or -1
# fs_perms_entry.walk = 'true' or something else
# fs_perms_entry.fmode = expected file mode or None
# fs_perms_entry.fuid = expected file uid or -1
# fs_perms_entry_fgid = expected file gid or -1
class fs_perms_entry():
def __init__(self, line):
lsplit = line.split()
if len(lsplit) == 3 and lsplit[1].lower() == "link":
self._setlink(lsplit[0], lsplit[2])
elif len(lsplit) == 8:
self._setdir(lsplit[0], lsplit[1], lsplit[2], lsplit[3], lsplit[4], lsplit[5], lsplit[6], lsplit[7])
else:
bb.error("Fixup Perms: invalid config line %s" % line)
self.path = None
self.link = None
def _setdir(self, path, mode, uid, gid, walk, fmode, fuid, fgid):
self.path = os.path.normpath(path)
self.link = None
self.mode = self._procmode(mode)
self.uid = self._procuid(uid)
self.gid = self._procgid(gid)
self.walk = walk.lower()
self.fmode = self._procmode(fmode)
self.fuid = self._procuid(fuid)
self.fgid = self._procgid(fgid)
def _setlink(self, path, link):
self.path = os.path.normpath(path)
self.link = link
def _procmode(self, mode):
if not mode or (mode and mode == "-"):
return None
else:
return int(mode,8)
# Note uid/gid -1 has special significance in os.lchown
def _procuid(self, uid):
if uid is None or uid == "-":
return -1
elif uid.isdigit():
return int(uid)
else:
return pwd.getpwnam(uid).pw_uid
def _procgid(self, gid):
if gid is None or gid == "-":
return -1
elif gid.isdigit():
return int(gid)
else:
return grp.getgrnam(gid).gr_gid
# Use for debugging the entries
def __str__(self):
if self.link:
return "%s link %s" % (self.path, self.link)
else:
mode = "-"
if self.mode:
mode = "0%o" % self.mode
fmode = "-"
if self.fmode:
fmode = "0%o" % self.fmode
uid = self._mapugid(self.uid)
gid = self._mapugid(self.gid)
fuid = self._mapugid(self.fuid)
fgid = self._mapugid(self.fgid)
return "%s %s %s %s %s %s %s %s" % (self.path, mode, uid, gid, self.walk, fmode, fuid, fgid)
def _mapugid(self, id):
if id is None or id == -1:
return "-"
else:
return "%d" % id
# Fix the permission, owner and group of path
def fix_perms(path, mode, uid, gid, dir):
if mode and not os.path.islink(path):
#bb.note("Fixup Perms: chmod 0%o %s" % (mode, dir))
os.chmod(path, mode)
# -1 is a special value that means don't change the uid/gid
# if they are BOTH -1, don't bother to lchown
if not (uid == -1 and gid == -1):
#bb.note("Fixup Perms: lchown %d:%d %s" % (uid, gid, dir))
os.lchown(path, uid, gid)
# Return a list of configuration files based on either the default
# files/fs-perms.txt or the contents of FILESYSTEM_PERMS_TABLES
# paths are resolved via BBPATH
def get_fs_perms_list(d):
str = ""
fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES', True)
if not fs_perms_tables:
fs_perms_tables = 'files/fs-perms.txt'
for conf_file in fs_perms_tables.split():
str += " %s" % bb.which(d.getVar('BBPATH', True), conf_file)
return str
dvar = d.getVar('PKGD', True)
fs_perms_table = {}
# By default all of the standard directories specified in
# bitbake.conf will get 0755 root:root.
target_path_vars = [ 'base_prefix',
'prefix',
'exec_prefix',
'base_bindir',
'base_sbindir',
'base_libdir',
'datadir',
'sysconfdir',
'servicedir',
'sharedstatedir',
'localstatedir',
'infodir',
'mandir',
'docdir',
'bindir',
'sbindir',
'libexecdir',
'libdir',
'includedir',
'oldincludedir' ]
for path in target_path_vars:
dir = d.getVar(path, True) or ""
if dir == "":
continue
fs_perms_table[dir] = fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir), d))
# Now we actually load from the configuration files
for conf in get_fs_perms_list(d).split():
if os.path.exists(conf):
f = open(conf)
for line in f:
if line.startswith('#'):
continue
lsplit = line.split()
if len(lsplit) == 0:
continue
if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"):
bb.error("Fixup perms: %s invalid line: %s" % (conf, line))
continue
entry = fs_perms_entry(d.expand(line))
if entry and entry.path:
fs_perms_table[entry.path] = entry
f.close()
# Debug -- list out in-memory table
#for dir in fs_perms_table:
# bb.note("Fixup Perms: %s: %s" % (dir, str(fs_perms_table[dir])))
# We process links first, so we can go back and fixup directory ownership
# for any newly created directories
for dir in fs_perms_table:
if not fs_perms_table[dir].link:
continue
origin = dvar + dir
if not (os.path.exists(origin) and os.path.isdir(origin) and not os.path.islink(origin)):
continue
link = fs_perms_table[dir].link
if link[0] == "/":
target = dvar + link
ptarget = link
else:
target = os.path.join(os.path.dirname(origin), link)
ptarget = os.path.join(os.path.dirname(dir), link)
if os.path.exists(target):
bb.error("Fixup Perms: Unable to correct directory link, target already exists: %s -> %s" % (dir, ptarget))
continue
# Create path to move directory to, move it, and then setup the symlink
bb.mkdirhier(os.path.dirname(target))
#bb.note("Fixup Perms: Rename %s -> %s" % (dir, ptarget))
os.rename(origin, target)
#bb.note("Fixup Perms: Link %s -> %s" % (dir, link))
os.symlink(link, origin)
for dir in fs_perms_table:
if fs_perms_table[dir].link:
continue
origin = dvar + dir
if not (os.path.exists(origin) and os.path.isdir(origin)):
continue
fix_perms(origin, fs_perms_table[dir].mode, fs_perms_table[dir].uid, fs_perms_table[dir].gid, dir)
if fs_perms_table[dir].walk == 'true':
for root, dirs, files in os.walk(origin):
for dr in dirs:
each_dir = os.path.join(root, dr)
fix_perms(each_dir, fs_perms_table[dir].mode, fs_perms_table[dir].uid, fs_perms_table[dir].gid, dir)
for f in files:
each_file = os.path.join(root, f)
fix_perms(each_file, fs_perms_table[dir].fmode, fs_perms_table[dir].fuid, fs_perms_table[dir].fgid, dir)
}
python base_conditional () {
def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d)
}
python sstate_clean_manifest () {
def sstate_clean_manifest(manifest, d):
import oe.path
mfile = open(manifest)
entries = mfile.readlines()
mfile.close()
for entry in entries:
entry = entry.strip()
bb.debug(2, "Removing manifest: %s" % entry)
# We can race against another package populating directories as we're removing them
# so we ignore errors here.
try:
if entry.endswith("/"):
if os.path.islink(entry[:-1]):
os.remove(entry[:-1])
elif os.path.exists(entry) and len(os.listdir(entry)) == 0:
os.rmdir(entry[:-1])
else:
oe.path.remove(entry)
except OSError:
pass
oe.path.remove(manifest)
}
python base_path_join () {
def base_path_join(a, *p):
return oe.path.join(a, *p)
}
python base_get_metadata_svn_revision () {
def base_get_metadata_svn_revision(path, d):
revision = "<unknown>"
try:
revision = file( "%s/.svn/entries" % path ).readlines()[3].strip()
except IOError:
pass
return revision
}
python sstate_install () {
def sstate_install(ss, d):
import oe.path
sharedfiles = []
shareddirs = []
bb.mkdirhier(d.expand("/tool/yocto/poky/build/tmp/sstate-control"))
manifest = d.expand("/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-linux-xilinx.%s" % ss['name'])
if os.access(manifest, os.R_OK):
bb.fatal("Package already staged (%s)?!" % manifest)
locks = []
for lock in ss['lockfiles-shared']:
locks.append(bb.utils.lockfile(lock, True))
for lock in ss['lockfiles']:
locks.append(bb.utils.lockfile(lock))
for state in ss['dirs']:
oe.path.copytree(state[1], state[2])
for walkroot, dirs, files in os.walk(state[1]):
bb.debug(2, "Staging files from %s to %s" % (state[1], state[2]))
for file in files:
srcpath = os.path.join(walkroot, file)
dstpath = srcpath.replace(state[1], state[2])
#bb.debug(2, "Staging %s to %s" % (srcpath, dstpath))
sharedfiles.append(dstpath)
for dir in dirs:
srcdir = os.path.join(walkroot, dir)
dstdir = srcdir.replace(state[1], state[2])
#bb.debug(2, "Staging %s to %s" % (srcdir, dstdir))
if not dstdir.endswith("/"):
dstdir = dstdir + "/"
shareddirs.append(dstdir)
f = open(manifest, "w")
for file in sharedfiles:
f.write(file + "\n")
# We want to ensure that directories appear at the end of the manifest
# so that when we test to see if they should be deleted any contents
# added by the task will have been removed first.
dirs = sorted(shareddirs, key=len)
# Must remove children first, which will have a longer path than the parent
for di in reversed(dirs):
f.write(di + "\n")
f.close()
for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
bb.build.exec_func(postinst, d)
for lock in locks:
bb.utils.unlockfile(lock)
}
python base_get_metadata_monotone_branch () {
def base_get_metadata_monotone_branch(path, d):
monotone_branch = "<unknown>"
try:
monotone_branch = file( "%s/_MTN/options" % path ).read().strip()
if monotone_branch.startswith( "database" ):
monotone_branch_words = monotone_branch.split()
monotone_branch = monotone_branch_words[ monotone_branch_words.index( "branch" )+1][1:-1]
except:
pass
return monotone_branch
}
python package_qa_check_staticdev () {
def package_qa_check_staticdev(path, name, d, elf, messages):
"""
Check for ".a" library in non-staticdev packages
There are a number of exceptions to this rule, -pic packages can contain
static libraries, the _nonshared.a belong with their -dev packages and
libgcc.a, libgcov.a will be skipped in their packages
"""
if not name.endswith("-pic") and not name.endswith("-staticdev") and path.endswith(".a") and not path.endswith("_nonshared.a"):
messages.append("non -staticdev package contains static .a library: %s path '%s'" % \
(name, package_qa_clean_path(path,d)))
}
python get_process_cputime () {
def get_process_cputime(pid):
fields = open("/proc/%d/stat" % pid, "r").readline().rstrip().split()
# 13: utime, 14: stime, 15: cutime, 16: cstime
return sum(int(field) for field in fields[13:16])
}
python package_do_split_locales () {
if (d.getVar('PACKAGE_NO_LOCALE', True) == '1'):
bb.debug(1, "package requested not splitting locales")
return
packages = (d.getVar('PACKAGES', True) or "").split()
datadir = d.getVar('datadir', True)
if not datadir:
bb.note("datadir not defined")
return
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
if pn + '-locale' in packages:
packages.remove(pn + '-locale')
localedir = os.path.join(dvar + datadir, 'locale')
if not os.path.isdir(localedir):
bb.debug(1, "No locale files in this package")
return
locales = os.listdir(localedir)
summary = d.getVar('SUMMARY', True) or pn
description = d.getVar('DESCRIPTION', True) or ""
locale_section = d.getVar('LOCALE_SECTION', True)
mlprefix = d.getVar('MLPREFIX', True) or ""
for l in sorted(locales):
ln = legitimize_package_name(l)
pkg = pn + '-locale-' + ln
packages.append(pkg)
d.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l))
d.setVar('RDEPENDS_' + pkg, '%s %svirtual-locale-%s' % (pn, mlprefix, ln))
d.setVar('RPROVIDES_' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln))
d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l))
d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
if locale_section:
d.setVar('SECTION_' + pkg, locale_section)
d.setVar('PACKAGES', ' '.join(packages))
# Disabled by RP 18/06/07
# Wildcards aren't supported in debian
# They break with ipkg since glibc-locale* will mean that
# glibc-localedata-translit* won't install as a dependency
# for some other package which breaks meta-toolchain
# Probably breaks since virtual-locale- isn't provided anywhere
#rdep = (d.getVar('RDEPENDS_%s' % pn, True) or d.getVar('RDEPENDS', True) or "").split()
#rdep.append('%s-locale*' % pn)
#d.setVar('RDEPENDS_%s' % pn, ' '.join(rdep))
}
python check_pseudo_wrapper () {
def check_pseudo_wrapper():
import sys
if not sys.argv[0].endswith('/bitbake'):
return ""
import subprocess as sub
# Check if bitbake wrapper is being used
pseudo_build = os.environ.get( 'PSEUDO_BUILD' )
if not pseudo_build:
bb.warn("Bitbake has not been run using the bitbake wrapper (scripts/bitbake); this is likely because your PATH has been altered from that normally set up by the oe-init-build-env script. Not using the wrapper may result in failures during package installation, so it is highly recommended that you set your PATH back so that the wrapper script is being executed.")
if (not pseudo_build) or pseudo_build == '2':
# pseudo ought to be working, let's see if it is...
p = sub.Popen(['sh', '-c', 'PSEUDO_DISABLED=0 id -u'],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
if out.rstrip() != '0':
msg = "Pseudo is not functioning correctly, which will cause failures during package installation. Please check your configuration."
if pseudo_build == '2':
return msg
else:
bb.warn(msg)
return ""
}
python do_qa_staging () {
bb.note("QA checking staging")
if not package_qa_check_staged(d.expand('/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir///tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib'), d):
bb.fatal("QA staging was broken by the package built above")
}
python sstate_add () {
def sstate_add(ss, source, dest, d):
srcbase = os.path.basename(source)
ss['dirs'].append([srcbase, source, dest])
return ss
}
python do_qa_configure () {
import subprocess
configs = []
workdir = d.getVar('WORKDIR', True)
bb.note("Checking autotools environment for common misconfiguration")
for root, dirs, files in os.walk(workdir):
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \
os.path.join(root,"config.log")
if "config.log" in files:
if subprocess.call(statement, shell=True) == 0:
bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
Rerun configure task after fixing this. The path was '%s'""" % root)
if "configure.ac" in files:
configs.append(os.path.join(root,"configure.ac"))
if "configure.in" in files:
configs.append(os.path.join(root, "configure.in"))
cnf = d.getVar('EXTRA_OECONF', True) or ""
if "gettext" not in d.getVar('P', True) and "gcc-runtime" not in d.getVar('P', True) and "--disable-nls" not in cnf:
ml = d.getVar("MLPREFIX", True) or ""
if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
gt = "gettext-native"
elif bb.data.inherits_class('cross-canadian', d):
gt = "gettext-nativesdk"
else:
gt = "virtual/" + ml + "gettext"
deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "")
if gt not in deps:
for config in configs:
gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
if subprocess.call(gnu, shell=True) == 0:
bb.fatal("""%s required but not in DEPENDS for file %s.
Missing inherit gettext?""" % (gt, config))
if not package_qa_check_license(workdir, d):
bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")
}
python should_apply () {
def should_apply(parm, d):
"""Determine if we should apply the given patch"""
if "mindate" in parm or "maxdate" in parm:
pn = d.getVar('PN', True)
srcdate = d.getVar('SRCDATE_%s' % pn, True)
if not srcdate:
srcdate = d.getVar('SRCDATE', True)
if srcdate == "now":
srcdate = d.getVar('DATE', True)
if "maxdate" in parm and parm["maxdate"] < srcdate:
return False, 'is outdated'
if "mindate" in parm and parm["mindate"] > srcdate:
return False, 'is predated'
if "minrev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and srcrev < parm["minrev"]:
return False, 'applies to later revisions'
if "maxrev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and srcrev > parm["maxrev"]:
return False, 'applies to earlier revisions'
if "rev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and parm["rev"] not in srcrev:
return False, "doesn't apply to revision"
if "notrev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and parm["notrev"] in srcrev:
return False, "doesn't apply to revision"
return True, None
}
python check_supported_distro () {
def check_supported_distro(sanity_data):
tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
if not tested_distros:
return
if os.path.exists("/etc/redhat-release"):
f = open("/etc/redhat-release", "r")
try:
distro = f.readline().strip()
finally:
f.close()
elif os.path.exists("/etc/SuSE-release"):
import re
f = open("/etc/SuSE-release", "r")
try:
distro = f.readline()
# Remove the architecture suffix e.g. (i586)
distro = re.sub(r' \([a-zA-Z0-9\-_]*\)$', '', distro).strip()
finally:
f.close()
else:
# Use LSB method
import subprocess as sub
try:
p = sub.Popen(['lsb_release','-d','-s'],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
distro = out.rstrip()
except Exception:
distro = None
if not distro:
if os.path.exists("/etc/lsb-release"):
f = open("/etc/lsb-release", "r")
try:
for line in f:
lns = line.split('=')
if lns[0] == "DISTRIB_DESCRIPTION":
distro = lns[1].strip('"\n')
break
finally:
f.close()
if distro:
if distro not in [x.strip() for x in tested_distros.split('\\n')]:
bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
else:
bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')
}
python preferred_ml_updates () {
def preferred_ml_updates(d):
# If any PREFERRED_PROVIDER or PREFERRED_VERSIONS are set,
# we need to mirror these variables in the multilib case
multilibs = d.getVar('MULTILIBS', True) or ""
if not multilibs:
return
prefixes = []
for ext in multilibs.split():
eext = ext.split(':')
if len(eext) > 1 and eext[0] == 'multilib':
prefixes.append(eext[1])
versions = []
providers = []
for v in d.keys():
if v.startswith("PREFERRED_VERSION_"):
versions.append(v)
if v.startswith("PREFERRED_PROVIDER_"):
providers.append(v)
for v in versions:
val = d.getVar(v, False)
pkg = v.replace("PREFERRED_VERSION_", "")
if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
continue
for p in prefixes:
newname = "PREFERRED_VERSION_" + p + "-" + pkg
if not d.getVar(newname, False):
d.setVar(newname, val)
for prov in providers:
val = d.getVar(prov, False)
pkg = prov.replace("PREFERRED_PROVIDER_", "")
if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
continue
virt = ""
if pkg.startswith("virtual/"):
pkg = pkg.replace("virtual/", "")
virt = "virtual/"
for p in prefixes:
newname = "PREFERRED_PROVIDER_" + virt + p + "-" + pkg
if pkg != "kernel":
val = p + "-" + val
if not d.getVar(newname, False):
d.setVar(newname, val)
mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
extramp = []
for p in mp:
if p.endswith("-native") or p.endswith("-nativesdk"):
continue
virt = ""
if p.startswith("virtual/"):
p = p.replace("virtual/", "")
virt = "virtual/"
for pref in prefixes:
extramp.append(virt + pref + "-" + p)
d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
}
python do_patch () {
bb.build.exec_func('base_do_patch', d)
}
python base_less_or_equal () {
def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
}
python check_sanity () {
def check_sanity(sanity_data):
from bb import note, error, data, __version__
import subprocess
try:
from distutils.version import LooseVersion
except ImportError:
def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
import commands
# Check the bitbake version meets minimum requirements
minversion = sanity_data.getVar('BB_MIN_VERSION', True)
if not minversion:
# Hack: BB_MIN_VERSION hasn't been parsed yet so return
# and wait for the next call
print "Foo %s" % minversion
return
if 0 == os.getuid():
raise_sanity_error("Do not use Bitbake as root.", sanity_data)
messages = ""
# Check the Python version, we now use Python 2.6 features in
# various classes
import sys
if sys.hexversion < 0x020600F0:
messages = messages + 'The system requires at least Python 2.6 to run. Please update your Python interpreter.\n'
if (LooseVersion(__version__) < LooseVersion(minversion)):
messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
# Check that the MACHINE is valid, if it is set
if sanity_data.getVar('MACHINE', True):
if not check_conf_exists("conf/machine/virtex5.conf", sanity_data):
messages = messages + 'Please set a valid MACHINE in your local.conf or environment\n'
else:
messages = messages + check_sanity_validmachine(sanity_data)
else:
messages = messages + 'Please set a MACHINE in your local.conf or environment\n'
# Check we are using a valid lacal.conf
current_conf = sanity_data.getVar('CONF_VERSION', True)
conf_version = sanity_data.getVar('LOCALCONF_VERSION', True)
if current_conf != conf_version:
messages = messages + "Your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes.\n"
# Check bblayers.conf is valid
current_lconf = sanity_data.getVar('LCONF_VERSION', True)
lconf_version = sanity_data.getVar('LAYER_CONF_VERSION', True)
if current_lconf != lconf_version:
messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
# If we have a site.conf, check it's valid
if check_conf_exists("conf/site.conf", sanity_data):
current_sconf = sanity_data.getVar('SCONF_VERSION', True)
sconf_version = sanity_data.getVar('SITE_CONF_VERSION', True)
if current_sconf != sconf_version:
messages = messages + "Your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf conf/site.conf.sample\" is a good way to visualise the changes.\n"
assume_provided = sanity_data.getVar('ASSUME_PROVIDED', True).split()
# Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
if "diffstat-native" not in assume_provided:
messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
# Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't
# set, since so much relies on it being set.
dldir = sanity_data.getVar('DL_DIR', True)
if not dldir:
messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
messages = messages + "DL_DIR: %s exists but you do not appear to have write access to it. \n" % dldir
# Check that the DISTRO is valid, if set
# need to take into account DISTRO renaming DISTRO
distro = sanity_data.getVar('DISTRO', True)
if distro:
if not ( check_conf_exists("conf/distro/poky.conf", sanity_data) or check_conf_exists("conf/distro/include/poky.inc", sanity_data) ):
messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % sanity_data.getVar("DISTRO", True )
missing = ""
if not check_app_exists("make", sanity_data):
missing = missing + "GNU make,"
if not check_app_exists('gcc', sanity_data):
missing = missing + "C Compiler (%sgcc)," % sanity_data.getVar("BUILD_PREFIX", True)
if not check_app_exists('g++', sanity_data):
missing = missing + "C++ Compiler (%sg++)," % sanity_data.getVar("BUILD_PREFIX", True)
required_utilities = sanity_data.getVar('SANITY_REQUIRED_UTILITIES', True)
if "qemu-native" in assume_provided:
if not check_app_exists("qemu-arm", sanity_data):
messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
paths = sanity_data.getVar('PATH', True).split(":")
if "." in paths or "" in paths:
messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
bbpaths = sanity_data.getVar('BBPATH', True).split(":")
if "." in bbpaths or "" in bbpaths:
# TODO: change the following message to fatal when all BBPATH issues
# are fixed
bb.warn("BBPATH references the current directory, either through " \
"an empty entry, or a '.'.\n\t This is unsafe and means your "\
"layer configuration is adding empty elements to BBPATH.\n\t "\
"Please check your layer.conf files and other BBPATH " \
"settings to remove the current working directory " \
"references.");
if sanity_data.getVar('TARGET_ARCH', True) == "arm":
# This path is no longer user-readable in modern (very recent) Linux
try:
if os.path.exists("/proc/sys/vm/mmap_min_addr"):
f = open("/proc/sys/vm/mmap_min_addr", "r")
try:
if (int(f.read().strip()) > 65536):
messages = messages + "/proc/sys/vm/mmap_min_addr is not <= 65536. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 65536 in /etc/sysctl.conf.\n"
finally:
f.close()
except:
pass
for util in required_utilities.split():
if not check_app_exists( util, sanity_data ):
missing = missing + "%s," % util
if missing != "":
missing = missing.rstrip(',')
messages = messages + "Please install the following missing utilities: %s\n" % missing
pseudo_msg = check_pseudo_wrapper()
if pseudo_msg != "":
messages = messages + pseudo_msg + '\n'
check_supported_distro(sanity_data)
toolchain_msg = check_toolchain(sanity_data)
if toolchain_msg != "":
messages = messages + toolchain_msg + '\n'
# Check if DISPLAY is set if IMAGETEST is set
if not sanity_data.getVar( 'DISPLAY', True ) and sanity_data.getVar( 'IMAGETEST', True ) == 'qemu':
messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
omask = os.umask(022)
if omask & 0755:
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
os.umask(omask)
oes_bb_conf = sanity_data.getVar( 'OES_BITBAKE_CONF', True)
if not oes_bb_conf:
messages = messages + 'You do not include the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
nolibs = sanity_data.getVar('NO32LIBS', True)
if not nolibs:
lib32path = '/lib'
if os.path.exists('/lib64') and ( os.path.islink('/lib64') or os.path.islink('/lib') ):
lib32path = '/lib32'
if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
messages = messages + "You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n"
tmpdir = sanity_data.getVar('TMPDIR', True)
sstate_dir = sanity_data.getVar('SSTATE_DIR', True)
# Check saved sanity info
last_sanity_version = 0
last_tmpdir = ""
last_sstate_dir = ""
sanityverfile = 'conf/sanity_info'
if os.path.exists(sanityverfile):
f = file(sanityverfile, 'r')
for line in f:
if line.startswith('SANITY_VERSION'):
last_sanity_version = int(line.split()[1])
if line.startswith('TMPDIR'):
last_tmpdir = line.split()[1]
if line.startswith('SSTATE_DIR'):
last_sstate_dir = line.split()[1]
sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1)
if last_sanity_version < sanity_version:
messages = messages + check_sanity_version_change(sanity_data)
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
else:
if last_tmpdir != tmpdir:
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
if last_sstate_dir != sstate_dir:
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
if os.path.exists("conf") and not messages:
f = file(sanityverfile, 'w')
f.write("SANITY_VERSION %s\n" % sanity_version)
f.write("TMPDIR %s\n" % tmpdir)
f.write("SSTATE_DIR %s\n" % sstate_dir)
#
# Check that TMPDIR hasn't changed location since the last time we were run
#
checkfile = os.path.join(tmpdir, "saved_tmpdir")
if os.path.exists(checkfile):
f = file(checkfile, "r")
saved_tmpdir = f.read().strip()
if (saved_tmpdir != tmpdir):
messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir
else:
f = file(checkfile, "w")
f.write(tmpdir)
f.close()
#
# Check the 'ABI' of TMPDIR
#
current_abi = sanity_data.getVar('OELAYOUT_ABI', True)
abifile = sanity_data.getVar('SANITY_ABIFILE', True)
if os.path.exists(abifile):
f = file(abifile, "r")
abi = f.read().strip()
if not abi.isdigit():
f = file(abifile, "w")
f.write(current_abi)
elif abi == "2" and current_abi == "3":
bb.note("Converting staging from layout version 2 to layout version 3")
subprocess.call(sanity_data.expand("mv /tool/yocto/poky/build/tmp/staging /tool/yocto/poky/build/tmp/sysroots"), shell=True)
subprocess.call(sanity_data.expand("ln -s sysroots /tool/yocto/poky/build/tmp/staging"), shell=True)
subprocess.call(sanity_data.expand("cd /tool/yocto/poky/build/tmp/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"), shell=True)
f = file(abifile, "w")
f.write(current_abi)
elif abi == "3" and current_abi == "4":
bb.note("Converting staging layout from version 3 to layout version 4")
if os.path.exists(sanity_data.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/virtex5-poky-linux")):
subprocess.call(sanity_data.expand("mv /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/virtex5-poky-linux /tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts"), shell=True)
subprocess.call(sanity_data.expand("ln -s /tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/virtex5-poky-linux"), shell=True)
f = file(abifile, "w")
f.write(current_abi)
elif abi == "4":
messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
elif abi == "5" and current_abi == "6":
bb.note("Converting staging layout from version 5 to layout version 6")
subprocess.call(sanity_data.expand("mv /tool/yocto/poky/build/tmp/pstagelogs /tool/yocto/poky/build/tmp/sstate-control"), shell=True)
f = file(abifile, "w")
f.write(current_abi)
elif abi == "7" and current_abi == "8":
messages = messages + "Your configuration is using stamp files including the sstate hash but your build directory was built with stamp files that do not include this.\nTo continue, either rebuild or switch back to the OEBasic signature handler with BB_SIGNATURE_HANDLER = 'OEBasic'.\n"
elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
messages = messages + "Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
else:
f = file(abifile, "w")
f.write(current_abi)
f.close()
oeroot = sanity_data.getVar('COREBASE')
if oeroot.find ('+') != -1:
messages = messages + "Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include a +."
elif oeroot.find (' ') != -1:
messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space."
if messages != "":
raise_sanity_error(messages, sanity_data)
}
python check_sanity_tmpdir_change () {
def check_sanity_tmpdir_change(tmpdir, data):
# Sanity checks to be done when the value of TMPDIR changes
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
testmsg = check_create_long_filename(tmpdir, "TMPDIR")
# Check that we can fetch from various network transports
testmsg = testmsg + check_connectivity(data)
return testmsg
}
python sstate_hardcode_path () {
def sstate_hardcode_path(d):
import subprocess
# Need to remove hardcoded paths and fix these when we install the
# staging packages.
#
# Note: the logic in this function needs to match the reverse logic
# in sstate_installpkg(ss, d)
staging = d.getVar('STAGING_DIR', True)
staging_target = d.getVar('STAGING_DIR_TARGET', True)
staging_host = d.getVar('STAGING_DIR_HOST', True)
sstate_builddir = d.getVar('SSTATE_BUILDDIR', True)
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
sstate_grep_cmd = "grep -l -e '%s'" % (staging)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging)
elif bb.data.inherits_class('cross', d):
sstate_grep_cmd = "grep -l -e '(%s|%s)'" % (staging_target, staging)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging)
else:
sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
fixmefn = sstate_builddir + "fixmepath"
sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
sstate_filelist_cmd = "tee %s" % (fixmefn)
# fixmepath file needs relative paths, drop sstate_builddir prefix
sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn)
# Limit the fixpaths and sed operations based on the initial grep search
# This has the side effect of making sure the vfs cache is hot
sstate_hardcode_cmd = "%s | xargs %s | %s | xargs --no-run-if-empty %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd)
print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)
subprocess.call(sstate_hardcode_cmd, shell=True)
# If the fixmefn is empty, remove it..
if os.stat(fixmefn).st_size == 0:
os.remove(fixmefn)
else:
print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)
subprocess.call(sstate_filelist_relative_cmd, shell=True)
}
python splitfile () {
def splitfile(file, debugfile, debugsrcdir, d):
# Function to split a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
# is split and the split off portions go to debugfile.
#
# The debug information is then processed for src references. These
# references are copied to debugsrcdir, if defined.
import commands, stat, subprocess
dvar = d.getVar('PKGD', True)
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
objcopy = d.getVar("OBJCOPY", True)
debugedit = d.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR", True)
workparentdir = os.path.dirname(workdir)
sourcefile = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/debugsources.list")
# We ignore kernel modules, we don't generate debug info files.
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
return 1
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
origmode = os.stat(file)[stat.ST_MODE]
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
# We need to extract the debug src information here...
if debugsrcdir:
subprocess.call("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True)
bb.mkdirhier(os.path.dirname(debugfile))
subprocess.call("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile), shell=True)
# Set the debuglink to have the view of the file path on the target
subprocess.call("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file), shell=True)
if newmode:
os.chmod(file, origmode)
return 0
}
python do_listtasks () {
import sys
# emit variables and shell functions
#bb.data.emit_env(sys.__stdout__, d)
# emit the metadata which isnt valid shell
for e in d.keys():
if d.getVarFlag(e, 'task'):
bb.plain("%s" % e)
}
python package_qa_clean_path () {
def package_qa_clean_path(path,d):
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
return path.replace(d.getVar('TMPDIR',True),"")
}
python machine_paths () {
def machine_paths(d):
"""List any existing machine specific filespath directories"""
machine = d.getVar("MACHINE", True)
filespathpkg = d.getVar("FILESPATHPKG", True).split(":")
for basepath in d.getVar("FILESPATHBASE", True).split(":"):
for pkgpath in filespathpkg:
machinepath = os.path.join(basepath, pkgpath, machine)
if os.path.isdir(machinepath):
yield machinepath
}
python package_qa_check_buildpaths () {
def package_qa_check_buildpaths(path, name, d, elf, messages):
"""
Check for build paths inside target files and error if not found in the whitelist
"""
# Ignore .debug files, not interesting
if path.find(".debug") != -1:
return
# Ignore symlinks
if os.path.islink(path):
return
tmpdir = d.getVar('TMPDIR', True)
file_content = open(path).read()
if tmpdir in file_content:
messages.append("File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
}
python incompatible_license () {
def incompatible_license(d, dont_want_license, package=""):
"""
This function checks if a recipe has only incompatible licenses. It also take into consideration 'or'
operand.
"""
import re
import oe.license
from fnmatch import fnmatchcase as fnmatch
pn = d.getVar('PN', True)
dont_want_licenses = []
dont_want_licenses.append(d.getVar('INCOMPATIBLE_LICENSE', True))
recipe_license = d.getVar('LICENSE', True)
if package != "":
if d.getVar('LICENSE_' + pn + '-' + package, True):
license = d.getVar('LICENSE_' + pn + '-' + package, True)
else:
license = recipe_license
else:
license = recipe_license
spdx_license = return_spdx(d, dont_want_license)
dont_want_licenses.append(spdx_license)
def include_license(license):
if any(fnmatch(license, pattern) for pattern in dont_want_licenses):
return False
else:
return True
def choose_licenses(a, b):
if all(include_license(lic) for lic in a):
return a
else:
return b
"""
If you want to exlude license named generically 'X', we surely want to exlude 'X+' as well.
In consequence, we will exclude the '+' character from LICENSE in case INCOMPATIBLE_LICENSE
is not a 'X+' license.
"""
if not re.search(r'[+]',dont_want_license):
licenses=oe.license.flattened_licenses(re.sub(r'[+]', '', license), choose_licenses)
else:
licenses=oe.license.flattened_licenses(license, choose_licenses)
for onelicense in licenses:
if not include_license(onelicense):
return True
return False
}
python do_package_setscene () {
sstate_setscene(d)
}
python base_dep_prepend () {
None}
python legitimize_package_name () {
def legitimize_package_name(s):
"""
Make sure package names are legitimate strings
"""
import re
def fixutf(m):
cp = m.group(1)
if cp:
return ('\u%s' % cp).decode('unicode_escape').encode('utf-8')
# Handle unicode codepoints encoded as <U0123>, as in glibc locale files.
s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s)
# Remaining package name validity fixes
return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
}
python check_create_long_filename () {
def check_create_long_filename(filepath, pathname):
testfile = os.path.join(filepath, ''.join([`num`[-1] for num in xrange(1,200)]))
try:
if not os.path.exists(filepath):
bb.utils.mkdirhier(filepath)
f = file(testfile, "w")
f.close()
os.remove(testfile)
except IOError as (errno, strerror):
if errno == 36: # ENAMETOOLONG
return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
else:
return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
except OSError as (errno, strerror):
return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror)
return ""
}
python do_populate_lic_setscene () {
sstate_setscene(d)
}
python check_toolchain () {
def check_toolchain(data):
tune_error_set = []
deftune = data.getVar("DEFAULTTUNE", True)
tune_errors = check_toolchain_tune(data, deftune, 'default')
if tune_errors:
tune_error_set.append(tune_errors)
multilibs = (data.getVar("MULTILIB_VARIANTS", True) or "").split()
if multilibs:
seen_libs = []
seen_tunes = []
for lib in multilibs:
if lib in seen_libs:
tune_error_set.append("The multilib '%s' appears more than once." % lib)
else:
seen_libs.append(lib)
tune = data.getVar("DEFAULTTUNE_virtclass-multilib-%s" % lib, True)
if tune in seen_tunes:
tune_error_set.append("The tuning '%s' appears in more than one multilib." % tune)
else:
seen_libs.append(tune)
if tune == deftune:
tune_error_set.append("Multilib '%s' (%s) is also the default tuning." % (lib, deftune))
else:
tune_errors = check_toolchain_tune(data, tune, lib)
if tune_errors:
tune_error_set.append(tune_errors)
if tune_error_set:
return "Toolchain tunings invalid:\n" + '\n'.join(tune_error_set)
return ""
}
python pstaging_fetch () {
def pstaging_fetch(sstatepkg, d):
import bb.fetch2
# Only try and fetch if the user has configured a mirror
mirrors = d.getVar('SSTATE_MIRRORS', True)
if not mirrors:
return
# Copy the data object and override DL_DIR and SRC_URI
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
dldir = localdata.expand("/tool/yocto/poky/build/sstate-cache")
srcuri = "file://" + os.path.basename(sstatepkg)
bb.mkdirhier(dldir)
localdata.setVar('DL_DIR', dldir)
localdata.setVar('PREMIRRORS', mirrors)
localdata.setVar('SRC_URI', srcuri)
# Try a fetch from the sstate mirror, if it fails just return and
# we will build the package
try:
fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
fetcher.download()
# Need to optimise this, if using file:// urls, the fetcher just changes the local path
# For now work around by symlinking
localpath = bb.data.expand(fetcher.localpath(srcuri), localdata)
if localpath != sstatepkg and os.path.exists(localpath) and not os.path.exists(sstatepkg):
os.symlink(localpath, sstatepkg)
except bb.fetch2.BBFetchException:
pass
}
python package_qa_check_dev () {
def package_qa_check_dev(path, name, d, elf, messages):
"""
Check for ".so" library symlinks in non-dev packages
"""
if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-nativesdk") and path.endswith(".so") and os.path.islink(path):
messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
(name, package_qa_clean_path(path,d)))
}
python prserv_get_pr_auto () {
def prserv_get_pr_auto(d):
import oe.prservice
if d.getVar('USE_PR_SERV', True) != "1":
bb.warn("Not using network based PR service")
return None
version = d.getVar("PRAUTOINX", True)
pkgarch = d.getVar("PACKAGE_ARCH", True)
checksum = d.getVar("BB_TASKHASH", True)
if d.getVar('PRSERV_LOCKDOWN', True):
auto_rev = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
else:
conn = d.getVar("__PRSERV_CONN", True)
if conn is None:
conn = oe.prservice.prserv_make_conn(d)
if conn is None:
return None
auto_rev = conn.getPR(version, pkgarch, checksum)
return auto_rev}
python do_fetch () {
bb.build.exec_func('base_do_fetch', d)
}
python write_specfile () {
import textwrap
import oe.packagedata
# append information for logs and patches to %prep
def add_prep(d,spec_files_bottom):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) )
spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"")
spec_files_bottom.append('')
# get the name of tarball for sources, patches and logs
def get_tarballs(d):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
return get_package(d)
# append the name of tarball to key word 'SOURCE' in xxx.spec.
def tail_source(d,source_list=[],patch_list=None):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
source_number = 0
patch_number = 0
for source in source_list:
spec_preamble_top.append('Source' + str(source_number) + ': %s' % source)
source_number += 1
if patch_list:
for patch in patch_list:
print_deps(patch, "Patch" + str(patch_number), spec_preamble_top, d)
patch_number += 1
# We need a simple way to remove the MLPREFIX from the package name,
# and dependency information...
def strip_multilib(name, d):
multilibs = d.getVar('MULTILIBS', True) or ""
for ext in multilibs.split():
eext = ext.split(':')
if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
name = "".join(name.split(eext[1] + '-'))
return name
# ml = d.getVar("MLPREFIX", True)
# if ml and name and len(ml) != 0 and name.find(ml) == 0:
# return ml.join(name.split(ml, 1)[1:])
# return name
# In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
# This format is similar to OE, however there are restrictions on the
# characters that can be in a field. In the Version field, "-"
# characters are not allowed. "-" is allowed in the Release field.
#
# We translate the "-" in the version to a "+", by loading the PKGV
# from the dependent recipe, replacing the - with a +, and then using
# that value to do a replace inside of this recipe's dependencies.
# This preserves the "-" separator between the version and release, as
# well as any "-" characters inside of the release field.
#
# All of this has to happen BEFORE the mapping_rename_hook as
# after renaming we cannot look up the dependencies in the packagedata
# store.
def translate_vers(varname, d):
depends = d.getVar(varname, True)
if depends:
depends_dict = bb.utils.explode_dep_versions(depends)
newdeps_dict = {}
for dep in depends_dict:
ver = depends_dict[dep]
if dep and ver:
if '-' in ver:
subd = oe.packagedata.read_subpkgdata_dict(dep, d)
if 'PKGV' in subd:
pv = subd['PKGV']
reppv = pv.replace('-', '+')
ver = ver.replace(pv, reppv)
newdeps_dict[dep] = ver
depends = bb.utils.join_deps(newdeps_dict)
d.setVar(varname, depends.strip())
# We need to change the style the dependency from BB to RPM
# This needs to happen AFTER the mapping_rename_hook
def print_deps(variable, tag, array, d):
depends = variable
if depends:
depends_dict = bb.utils.explode_dep_versions(depends)
for dep in depends_dict:
ver = depends_dict[dep]
if dep and ver:
ver = ver.replace('(', '')
ver = ver.replace(')', '')
array.append("%s: %s %s" % (tag, dep, ver))
else:
array.append("%s: %s" % (tag, dep))
def walk_files(walkpath, target, conffiles):
import os
for rootpath, dirs, files in os.walk(walkpath):
path = rootpath.replace(walkpath, "")
for dir in dirs:
# All packages own the directories their files are in...
target.append('%dir "' + path + '/' + dir + '"')
for file in files:
if conffiles.count(path + '/' + file):
target.append('%config "' + path + '/' + file + '"')
else:
target.append('"' + path + '/' + file + '"')
# Prevent the prerm/postrm scripts from being run during an upgrade
def wrap_uninstall(scriptvar):
scr = scriptvar.strip()
if scr.startswith("#!"):
pos = scr.find("\n") + 1
else:
pos = 0
scr = scr[:pos] + 'if [ "$1" = "0" ] ; then\n' + scr[pos:] + '\nfi'
return scr
packages = d.getVar('PACKAGES', True)
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
pkgdest = d.getVar('PKGDEST', True)
if not pkgdest:
bb.fatal("No PKGDEST")
return
outspecfile = d.getVar('OUTSPECFILE', True)
if not outspecfile:
bb.fatal("No OUTSPECFILE")
return
# Construct the SPEC file...
srcname = strip_multilib(d.getVar('PN', True), d)
srcsummary = (d.getVar('SUMMARY', True) or d.getVar('DESCRIPTION', True) or ".")
srcversion = d.getVar('PKGV', True).replace('-', '+')
srcrelease = d.getVar('PKGR', True)
srcepoch = (d.getVar('PKGE', True) or "")
srclicense = d.getVar('LICENSE', True)
srcsection = d.getVar('SECTION', True)
srcmaintainer = d.getVar('MAINTAINER', True)
srchomepage = d.getVar('HOMEPAGE', True)
srcdescription = d.getVar('DESCRIPTION', True) or "."
srcdepends = strip_multilib(d.getVar('DEPENDS', True), d)
srcrdepends = []
srcrrecommends = []
srcrsuggests = []
srcrprovides = []
srcrreplaces = []
srcrconflicts = []
srcrobsoletes = []
srcpreinst = []
srcpostinst = []
srcprerm = []
srcpostrm = []
spec_preamble_top = []
spec_preamble_bottom = []
spec_scriptlets_top = []
spec_scriptlets_bottom = []
spec_files_top = []
spec_files_bottom = []
for pkg in packages.split():
localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg)
lf = bb.utils.lockfile(root + ".lock")
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
pkgname = localdata.getVar('PKG_%s' % pkg, True)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', pkg)
bb.data.update_data(localdata)
conffiles = (localdata.getVar('CONFFILES', True) or "").split()
splitname = strip_multilib(pkgname, d)
splitsummary = (localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or ".")
splitversion = (localdata.getVar('PKGV', True) or "").replace('-', '+')
splitrelease = (localdata.getVar('PKGR', True) or "")
splitepoch = (localdata.getVar('PKGE', True) or "")
splitlicense = (localdata.getVar('LICENSE', True) or "")
splitsection = (localdata.getVar('SECTION', True) or "")
splitdescription = (localdata.getVar('DESCRIPTION', True) or ".")
translate_vers('RDEPENDS', localdata)
translate_vers('RRECOMMENDS', localdata)
translate_vers('RSUGGESTS', localdata)
translate_vers('RPROVIDES', localdata)
translate_vers('RREPLACES', localdata)
translate_vers('RCONFLICTS', localdata)
# Map the dependencies into their final form
mapping_rename_hook(localdata)
splitrdepends = strip_multilib(localdata.getVar('RDEPENDS', True), d) or ""
splitrrecommends = strip_multilib(localdata.getVar('RRECOMMENDS', True), d) or ""
splitrsuggests = strip_multilib(localdata.getVar('RSUGGESTS', True), d) or ""
splitrprovides = strip_multilib(localdata.getVar('RPROVIDES', True), d) or ""
splitrreplaces = strip_multilib(localdata.getVar('RREPLACES', True), d) or ""
splitrconflicts = strip_multilib(localdata.getVar('RCONFLICTS', True), d) or ""
splitrobsoletes = []
# Gather special src/first package data
if srcname == splitname:
srcrdepends = splitrdepends
srcrrecommends = splitrrecommends
srcrsuggests = splitrsuggests
srcrprovides = splitrprovides
srcrreplaces = splitrreplaces
srcrconflicts = splitrconflicts
srcpreinst = localdata.getVar('pkg_preinst', True)
srcpostinst = localdata.getVar('pkg_postinst', True)
srcprerm = localdata.getVar('pkg_prerm', True)
srcpostrm = localdata.getVar('pkg_postrm', True)
file_list = []
walk_files(root, file_list, conffiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.append('%files')
spec_files_top.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.extend(file_list)
else:
bb.note("Creating EMPTY RPM Package for %s" % splitname)
spec_files_top.append('')
bb.utils.unlockfile(lf)
continue
# Process subpackage data
spec_preamble_bottom.append('%%package -n %s' % splitname)
spec_preamble_bottom.append('Summary: %s' % splitsummary)
if srcversion != splitversion:
spec_preamble_bottom.append('Version: %s' % splitversion)
if srcrelease != splitrelease:
spec_preamble_bottom.append('Release: %s' % splitrelease)
if srcepoch != splitepoch:
spec_preamble_bottom.append('Epoch: %s' % splitepoch)
if srclicense != splitlicense:
spec_preamble_bottom.append('License: %s' % splitlicense)
spec_preamble_bottom.append('Group: %s' % splitsection)
# Replaces == Obsoletes && Provides
if splitrreplaces and splitrreplaces.strip() != "":
for dep in splitrreplaces.split(','):
if splitrprovides:
splitrprovides = splitrprovides + ", " + dep
else:
splitrprovides = dep
if splitrobsoletes:
splitrobsoletes = splitrobsoletes + ", " + dep
else:
splitrobsoletes = dep
print_deps(splitrdepends, "Requires", spec_preamble_bottom, d)
# Suggests in RPM are like recommends in OE-core!
print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
# While there is no analog for suggests... (So call them recommends for now)
print_deps(splitrsuggests, "Recommends", spec_preamble_bottom, d)
print_deps(splitrprovides, "Provides", spec_preamble_bottom, d)
print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
# conflicts can not be in a provide! We will need to filter it.
if splitrconflicts:
depends_dict = bb.utils.explode_dep_versions(splitrconflicts)
newdeps_dict = {}
for dep in depends_dict:
if dep not in splitrprovides:
newdeps_dict[dep] = depends_dict[dep]
if newdeps_dict:
splitrconflicts = bb.utils.join_deps(newdeps_dict)
else:
splitrconflicts = ""
print_deps(splitrconflicts, "Conflicts", spec_preamble_bottom, d)
spec_preamble_bottom.append('')
spec_preamble_bottom.append('%%description -n %s' % splitname)
dedent_text = textwrap.dedent(splitdescription).strip()
spec_preamble_bottom.append('%s' % textwrap.fill(dedent_text, width=75))
spec_preamble_bottom.append('')
# Now process scriptlets
for script in ["preinst", "postinst", "prerm", "postrm"]:
scriptvar = localdata.getVar('pkg_%s' % script, True)
if not scriptvar:
continue
if script == 'preinst':
spec_scriptlets_bottom.append('%%pre -n %s' % splitname)
elif script == 'postinst':
spec_scriptlets_bottom.append('%%post -n %s' % splitname)
elif script == 'prerm':
spec_scriptlets_bottom.append('%%preun -n %s' % splitname)
scriptvar = wrap_uninstall(scriptvar)
elif script == 'postrm':
spec_scriptlets_bottom.append('%%postun -n %s' % splitname)
scriptvar = wrap_uninstall(scriptvar)
spec_scriptlets_bottom.append('# %s - %s' % (splitname, script))
spec_scriptlets_bottom.append(scriptvar)
spec_scriptlets_bottom.append('')
# Now process files
file_list = []
walk_files(root, file_list, conffiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
spec_files_bottom.append('%%files -n %s' % splitname)
spec_files_bottom.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
spec_files_bottom.extend(file_list)
else:
bb.note("Creating EMPTY RPM Package for %s" % splitname)
spec_files_bottom.append('')
del localdata
bb.utils.unlockfile(lf)
add_prep(d,spec_files_bottom)
spec_preamble_top.append('Summary: %s' % srcsummary)
spec_preamble_top.append('Name: %s' % srcname)
spec_preamble_top.append('Version: %s' % srcversion)
spec_preamble_top.append('Release: %s' % srcrelease)
if srcepoch and srcepoch.strip() != "":
spec_preamble_top.append('Epoch: %s' % srcepoch)
spec_preamble_top.append('License: %s' % srclicense)
spec_preamble_top.append('Group: %s' % srcsection)
spec_preamble_top.append('Packager: %s' % srcmaintainer)
spec_preamble_top.append('URL: %s' % srchomepage)
source_list = get_tarballs(d)
tail_source(d,source_list,None)
# Replaces == Obsoletes && Provides
if srcrreplaces and srcrreplaces.strip() != "":
for dep in srcrreplaces.split(','):
if srcrprovides:
srcrprovides = srcrprovides + ", " + dep
else:
srcrprovides = dep
if srcrobsoletes:
srcrobsoletes = srcrobsoletes + ", " + dep
else:
srcrobsoletes = dep
print_deps(srcdepends, "BuildRequires", spec_preamble_top, d)
print_deps(srcrdepends, "Requires", spec_preamble_top, d)
# Suggests in RPM are like recommends in OE-core!
print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
# While there is no analog for suggests... (So call them recommends for now)
print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
print_deps(srcrprovides, "Provides", spec_preamble_top, d)
print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
# conflicts can not be in a provide! We will need to filter it.
if srcrconflicts:
depends_dict = bb.utils.explode_dep_versions(srcrconflicts)
newdeps_dict = {}
for dep in depends_dict:
if dep not in srcrprovides:
newdeps_dict[dep] = depends_dict[dep]
if newdeps_dict:
srcrconflicts = bb.utils.join_deps(newdeps_dict)
else:
srcrconflicts = ""
print_deps(srcrconflicts, "Conflicts", spec_preamble_top, d)
spec_preamble_top.append('')
spec_preamble_top.append('%description')
dedent_text = textwrap.dedent(srcdescription).strip()
spec_preamble_top.append('%s' % textwrap.fill(dedent_text, width=75))
spec_preamble_top.append('')
if srcpreinst:
spec_scriptlets_top.append('%pre')
spec_scriptlets_top.append('# %s - preinst' % srcname)
spec_scriptlets_top.append(srcpreinst)
spec_scriptlets_top.append('')
if srcpostinst:
spec_scriptlets_top.append('%post')
spec_scriptlets_top.append('# %s - postinst' % srcname)
spec_scriptlets_top.append(srcpostinst)
spec_scriptlets_top.append('')
if srcprerm:
spec_scriptlets_top.append('%preun')
spec_scriptlets_top.append('# %s - prerm' % srcname)
scriptvar = wrap_uninstall(srcprerm)
spec_scriptlets_top.append(scriptvar)
spec_scriptlets_top.append('')
if srcpostrm:
spec_scriptlets_top.append('%postun')
spec_scriptlets_top.append('# %s - postrm' % srcname)
scriptvar = wrap_uninstall(srcpostrm)
spec_scriptlets_top.append(scriptvar)
spec_scriptlets_top.append('')
# Write the SPEC file
try:
from __builtin__ import file
specfile = file(outspecfile, 'w')
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
# RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
# of the generated spec file
external_preamble = d.getVar("RPMSPEC_PREAMBLE", True)
if external_preamble:
specfile.write(external_preamble + "\n")
for line in spec_preamble_top:
specfile.write(line + "\n")
for line in spec_preamble_bottom:
specfile.write(line + "\n")
for line in spec_scriptlets_top:
specfile.write(line + "\n")
for line in spec_scriptlets_bottom:
specfile.write(line + "\n")
for line in spec_files_top:
specfile.write(line + "\n")
for line in spec_files_bottom:
specfile.write(line + "\n")
specfile.close()
}
python base_get_metadata_git_branch () {
def base_get_metadata_git_branch(path, d):
branch = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path).read()
if len(branch) != 0:
return branch
return "<unknown>"
}
python check_sanity_eventhandler () {
if bb.event.getName(e) == "BuildStarted" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
sanity_data = copy_data(e)
check_sanity(sanity_data)
elif bb.event.getName(e) == "SanityCheck":
sanity_data = copy_data(e)
sanity_data.setVar("SANITY_USE_EVENTS", "1")
check_sanity(sanity_data)
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
return
}
python oe_filter () {
def oe_filter(f, str, d):
return oe.utils.str_filter(f, str, d)
}
python sstate_cleanall () {
import fnmatch
bb.note("Removing shared state for package %s" % d.getVar('PN', True))
manifest_dir = d.getVar('SSTATE_MANIFESTS', True)
manifest_prefix = d.getVar("SSTATE_MANFILEPREFIX", True)
manifest_pattern = os.path.basename(manifest_prefix) + ".*"
if not os.path.exists(manifest_dir):
return
for manifest in (os.listdir(manifest_dir)):
if fnmatch.fnmatch(manifest, manifest_pattern):
name = manifest.replace(manifest_pattern[:-1], "")
namemap = d.getVar('SSTATETASKNAMES', True).split()
tasks = d.getVar('SSTATETASKS', True).split()
if name not in namemap:
continue
taskname = tasks[namemap.index(name)]
shared_state = sstate_state_fromvars(d, taskname[3:])
sstate_clean(shared_state, d)
}
python do_checkuri () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.checkstatus()
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python is_machine_specific () {
def is_machine_specific(d):
"""Determine whether the current recipe is machine specific"""
machinepaths = set(machine_paths(d))
srcuri = d.getVar("SRC_URI", True).split()
for url in srcuri:
fetcher = bb.fetch2.Fetch([srcuri], d)
if url.startswith("file://"):
if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths):
return True
}
python package_qa_check_useless_rpaths () {
def package_qa_check_useless_rpaths(file, name, d, elf, messages):
"""
Check for RPATHs that are useless but not dangerous
"""
if not elf:
return
objdump = d.getVar('OBJDUMP', True)
env_path = d.getVar('PATH', True)
libdir = d.getVar("libdir", True)
base_libdir = d.getVar("base_libdir", True)
import re
rpath_re = re.compile("\s+RPATH\s+(.*)")
for line in os.popen("LC_ALL=C PATH=%s %s -p '%s' 2> /dev/null" % (env_path, objdump, file), "r"):
m = rpath_re.match(line)
if m:
rpath = m.group(1)
if rpath == libdir or rpath == base_libdir:
# The dynamic linker searches both these places anyway. There is no point in
# looking there again.
messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
}
python oe_filter_out () {
def oe_filter_out(f, str, d):
return oe.utils.str_filter_out(f, str, d)
}
python oe_terminal () {
def oe_terminal(command, title, d):
import oe.data
import oe.terminal
for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
value = d.getVar(export, True)
if value is not None:
os.environ[export] = str(value)
terminal = oe.data.typed_value('OE_TERMINAL', d).lower()
if terminal == 'none':
bb.fatal('Devshell usage disabled with OE_TERMINAL')
elif terminal != 'auto':
try:
oe.terminal.spawn(terminal, command, title)
return
except oe.terminal.UnsupportedTerminal:
bb.warn('Unsupported terminal "%s", defaulting to "auto"' %
terminal)
except oe.terminal.ExecutionError as exc:
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))
try:
oe.terminal.spawn_preferred(command, title)
except oe.terminal.NoSupportedTerminals:
bb.fatal('No valid terminal found, unable to open devshell')
except oe.terminal.ExecutionError as exc:
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))}
python package_qa_get_machine_dict () {
def package_qa_get_machine_dict():
return {
"darwin9" : {
"arm" : (40, 0, 0, True, 32),
},
"linux" : {
"arm" : (40, 97, 0, True, 32),
"armeb": (40, 97, 0, False, 32),
"powerpc": (20, 0, 0, False, 32),
"powerpc64": (21, 0, 0, False, 64),
"i386": ( 3, 0, 0, True, 32),
"i486": ( 3, 0, 0, True, 32),
"i586": ( 3, 0, 0, True, 32),
"i686": ( 3, 0, 0, True, 32),
"x86_64": (62, 0, 0, True, 64),
"ia64": (50, 0, 0, True, 64),
"alpha": (36902, 0, 0, True, 64),
"hppa": (15, 3, 0, False, 32),
"m68k": ( 4, 0, 0, False, 32),
"mips": ( 8, 0, 0, False, 32),
"mipsel": ( 8, 0, 0, True, 32),
"mips64": ( 8, 0, 0, False, 64),
"mips64el": ( 8, 0, 0, True, 64),
"s390": (22, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
"sparc": ( 2, 0, 0, False, 32),
},
"linux-uclibc" : {
"arm" : ( 40, 97, 0, True, 32),
"armeb": ( 40, 97, 0, False, 32),
"powerpc": ( 20, 0, 0, False, 32),
"i386": ( 3, 0, 0, True, 32),
"i486": ( 3, 0, 0, True, 32),
"i586": ( 3, 0, 0, True, 32),
"i686": ( 3, 0, 0, True, 32),
"x86_64": ( 62, 0, 0, True, 64),
"mips": ( 8, 0, 0, False, 32),
"mipsel": ( 8, 0, 0, True, 32),
"mips64": ( 8, 0, 0, False, 64),
"mips64el": ( 8, 0, 0, True, 64),
"avr32": (6317, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
},
"uclinux-uclibc" : {
"bfin": ( 106, 0, 0, True, 32),
},
"linux-gnueabi" : {
"arm" : (40, 0, 0, True, 32),
"armeb" : (40, 0, 0, False, 32),
},
"linux-uclibceabi" : {
"arm" : (40, 0, 0, True, 32),
"armeb" : (40, 0, 0, False, 32),
},
"linux-gnu" : {
"powerpc": (20, 0, 0, False, 32),
},
"linux-gnuspe" : {
"powerpc": (20, 0, 0, False, 32),
},
"linux-uclibcspe" : {
"powerpc": (20, 0, 0, False, 32),
},
"linux-gnu" : {
"microblaze": (47787, 0, 0, False, 32),
"microblazeel": (47787, 0, 0, True, 32),
},
"linux-gnux32" : {
"x86_64": (62, 0, 0, True, 32),
},
}
}
python base_detect_revision () {
def base_detect_revision(d):
path = base_get_scmbasepath(d)
scms = [base_get_metadata_git_revision, \
base_get_metadata_svn_revision]
for scm in scms:
rev = scm(path, d)
if rev <> "<unknown>":
return rev
return "<unknown>"
}
python read_shlibdeps () {
packages = d.getVar('PACKAGES', True).split()
for pkg in packages:
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
depsfile = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/packages-split/" + pkg + extension)
if os.access(depsfile, os.R_OK):
fd = file(depsfile)
lines = fd.readlines()
fd.close()
for l in lines:
rdepends[l.rstrip()] = ""
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
python sstate_installpkg () {
def sstate_installpkg(ss, d):
import oe.path
import subprocess
def prepdir(dir):
# remove dir if it exists, ensure any parent directories do exist
if os.path.exists(dir):
oe.path.remove(dir)
bb.mkdirhier(dir)
oe.path.remove(dir)
sstateinst = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sstate-install-%s/" % ss['name'])
sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz"
if not os.path.exists(sstatepkg):
pstaging_fetch(sstatepkg, d)
if not os.path.isfile(sstatepkg):
bb.note("Staging package %s does not exist" % sstatepkg)
return False
sstate_clean(ss, d)
d.setVar('SSTATE_INSTDIR', sstateinst)
d.setVar('SSTATE_PKG', sstatepkg)
for preinst in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split():
bb.build.exec_func(preinst, d)
bb.build.exec_func('sstate_unpack_package', d)
# Fixup hardcoded paths
#
# Note: The logic below must match the reverse logic in
# sstate_hardcode_path(d)
fixmefn = sstateinst + "fixmepath"
if os.path.isfile(fixmefn):
staging = d.getVar('STAGING_DIR', True)
staging_target = d.getVar('STAGING_DIR_TARGET', True)
staging_host = d.getVar('STAGING_DIR_HOST', True)
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIR:%s:g'" % (staging)
elif bb.data.inherits_class('cross', d):
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIR:%s:g'" % (staging_target, staging)
else:
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
# Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
print "Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd)
subprocess.call(sstate_hardcode_cmd, shell=True)
# Need to remove this or we'd copy it into the target directory and may
# conflict with another writer
os.remove(fixmefn)
for state in ss['dirs']:
prepdir(state[1])
os.rename(sstateinst + state[0], state[1])
sstate_install(ss, d)
for plain in ss['plaindirs']:
workdir = d.getVar('WORKDIR', True)
src = sstateinst + "/" + plain.replace(workdir, '')
dest = plain
bb.mkdirhier(src)
prepdir(dest)
os.rename(src, dest)
return True
}
python sstate_clean_cachefile () {
def sstate_clean_cachefile(ss, d):
import oe.path
sstatepkgdir = d.getVar('SSTATE_DIR', True)
sstatepkgfile = sstatepkgdir + '/' + d.getVar('SSTATE_PKGSPEC', True) + "*_" + ss['name'] + ".tgz*"
bb.note("Removing %s" % sstatepkgfile)
oe.path.remove(sstatepkgfile)
}
python base_read_file () {
def base_read_file(filename):
return oe.utils.read_file(filename)
}
python set_bn () {
def set_bn(e):
bn = e.getPkgs()[0] + "-" + e.data.getVar('MACHINE', True)
try:
os.remove(e.data.getVar('BNFILE', True))
except:
pass
file = open(e.data.getVar('BNFILE', True), "w")
file.write(os.path.join(bn, e.data.getVar('BUILDNAME', True)))
file.close()
}
python do_clean () {
"""clear the build and temp directories"""
dir = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0")
bb.note("Removing " + dir)
oe.path.remove(dir)
dir = "%s.*" % bb.data.expand(d.getVar('STAMP'), d)
bb.note("Removing " + dir)
oe.path.remove(dir)
for f in (d.getVar('CLEANFUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
python do_package_write_rpm_setscene () {
sstate_setscene(d)
}
python package_qa_write_error () {
def package_qa_write_error(error, d):
logfile = d.getVar('QA_LOGFILE', True)
if logfile:
p = d.getVar('P', True)
f = file( logfile, "a+")
print >> f, "%s: %s" % (p, error)
f.close()
}
python write_task_data () {
def write_task_data(status, logfile, dev, e):
bn = get_bn(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
file = open(os.path.join(logfile), "a")
timedata = get_timedata("__timedata_task", e.data)
if timedata:
elapsedtime, cpu = timedata
file.write(bb.data.expand("linux-xilinx-3.3.0-r0: %s: Elapsed time: %0.2f seconds \n" %
(e.task, elapsedtime), e.data))
if cpu:
file.write("CPU usage: %0.1f%% \n" % cpu)
############################################################################
# Here we gather up disk data. In an effort to avoid lying with stats
# I do a bare minimum of analysis of collected data.
# The simple fact is, doing disk io collection on a per process basis
# without effecting build time would be difficult.
# For the best information, running things with BB_TOTAL_THREADS = "1"
# would return accurate per task results.
############################################################################
if dev != "NoLogicalDevice":
diskdata = get_diskdata("__diskdata_task", dev, e.data)
if diskdata:
for key in sorted(diskdata.iterkeys()):
file.write(key + ": " + diskdata[key] + "\n")
if status is "passed":
file.write("Status: PASSED \n")
else:
file.write("Status: FAILED \n")
file.write("Ended: %0.2f \n" % time.time())
file.close()
}
python device_tree () {
def device_tree(a, d):
# Device tree helper function
import re
board = bb.data.getVar('XILINX_BOARD', d, 1)
cpu = bb.data.getVar('TARGET_CPU', d, 1)
if re.match('powerpc', a):
target = cpu + '-' + board
dts = 'arch/' + a + '/boot/dts/virtex' + target + '.dts'
else:
target = 'system'
dts = 'arch/' + a + '/boot/dts/' + target + '.dts'
bb.data.setVar('KERNEL_TARGET', target, d)
return dts
}
python package_qa_check_staged () {
def package_qa_check_staged(path,d):
"""
Check staged la and pc files for sanity
-e.g. installed being false
As this is run after every stage we should be able
to find the one responsible for the errors easily even
if we look at every .pc and .la file
"""
sane = True
tmpdir = d.getVar('TMPDIR', True)
workdir = os.path.join(tmpdir, "work")
installed = "installed=yes"
if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d):
pkgconfigcheck = workdir
else:
pkgconfigcheck = tmpdir
# find all .la and .pc files
# read the content
# and check for stuff that looks wrong
for root, dirs, files in os.walk(path):
for file in files:
path = os.path.join(root,file)
if file.endswith(".la"):
file_content = open(path).read()
if workdir in file_content:
error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
sane = package_qa_handle_error("la", error_msg, d)
elif file.endswith(".pc"):
file_content = open(path).read()
if pkgconfigcheck in file_content:
error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root)
sane = package_qa_handle_error("pkgconfig", error_msg, d)
return sane
}
python base_both_contain () {
def base_both_contain(variable1, variable2, checkvalue, d):
return oe.utils.both_contain(variable1, variable2, checkvalue, d)
}
python sysroot_cleansstate () {
ss = sstate_state_fromvars(d, "populate_sysroot")
sstate_clean(ss, d)
}
python read_subpackage_metadata () {
import oe.packagedata
data = oe.packagedata.read_pkgdata(d.getVar('PN', True), d)
for key in data.keys():
d.setVar(key, data[key])
for pkg in d.getVar('PACKAGES', True).split():
sdata = oe.packagedata.read_subpkgdata(pkg, d)
for key in sdata.keys():
d.setVar(key, sdata[key])
}
python sstate_checkhashes () {
def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
ret = []
# This needs to go away, FIXME
mapping = {
"do_populate_sysroot" : "populate-sysroot",
"do_populate_lic" : "populate-lic",
"do_package_write_ipk" : "deploy-ipk",
"do_package_write_deb" : "deploy-deb",
"do_package_write_rpm" : "deploy-rpm",
"do_package" : "package",
"do_deploy" : "deploy",
}
for task in range(len(sq_fn)):
sstatefile = d.expand("/tool/yocto/poky/build/sstate-cache/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz")
sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task])
if os.path.exists(sstatefile):
bb.debug(2, "SState: Found valid sstate file %s" % sstatefile)
ret.append(task)
continue
else:
bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile)
mirrors = d.getVar("SSTATE_MIRRORS", True)
if mirrors:
# Copy the data object and override DL_DIR and SRC_URI
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
dldir = localdata.expand("/tool/yocto/poky/build/sstate-cache")
localdata.setVar('DL_DIR', dldir)
localdata.setVar('PREMIRRORS', mirrors)
bb.debug(2, "SState using premirror of: %s" % mirrors)
for task in range(len(sq_fn)):
if task in ret:
continue
sstatefile = d.expand("/tool/yocto/poky/build/sstate-cache/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz")
sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task])
srcuri = "file://" + os.path.basename(sstatefile)
localdata.setVar('SRC_URI', srcuri)
bb.debug(2, "SState: Attempting to fetch %s" % srcuri)
try:
fetcher = bb.fetch2.Fetch(srcuri.split(), localdata)
fetcher.checkstatus()
bb.debug(2, "SState: Successful fetch test for %s" % srcuri)
ret.append(task)
except:
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
pass
return ret
}
python __anonymous () {
None}
python base_prune_suffix () {
def base_prune_suffix(var, suffixes, d):
return oe.utils.prune_suffix(var, suffixes, d)
}
python base_ifelse () {
def base_ifelse(condition, iftrue = True, iffalse = False):
return oe.utils.ifelse(condition, iftrue, iffalse)
}
python package_qa_check_arch () {
def package_qa_check_arch(path,name,d, elf, messages):
"""
Check if archs are compatible
"""
if not elf:
return
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
provides = d.getVar('PROVIDES', d, True)
bpn = d.getVar('BPN', True)
# FIXME: Cross package confuse this check, so just skip them
for s in ['cross', 'nativesdk', 'cross-canadian']:
if bb.data.inherits_class(s, d):
return
# avoid following links to /usr/bin (e.g. on udev builds)
# we will check the files pointed to anyway...
if os.path.islink(path):
return
#if this will throw an exception, then fix the dict above
(machine, osabi, abiversion, littleendian, bits) \
= package_qa_get_machine_dict()[target_os][target_arch]
# Check the architecture and endiannes of the binary
if not ((machine == elf.machine()) or \
("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
messages.append("Architecture did not match (%d to %d) on %s" % \
(machine, elf.machine(), package_qa_clean_path(path,d)))
elif not ((bits == elf.abiSize()) or \
("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
messages.append("Bit size did not match (%d to %d) %s on %s" % \
(bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
elif not littleendian == elf.isLittleEndian():
messages.append("Endiannes did not match (%d to %d) on %s" % \
(littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
}
python package_qa_check_license () {
def package_qa_check_license(workdir, d):
"""
Check for changes in the license files
"""
import tempfile
sane = True
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
lic = d.getVar('LICENSE', True)
pn = d.getVar('PN', True)
if lic == "CLOSED":
return True
if not lic_files:
# just throw a warning now. Once licensing data in entered for enough of the recipes,
# this will be converted into error and False will be returned.
bb.error(pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)")
return False
srcdir = d.getVar('S', True)
for url in lic_files.split():
(type, host, path, user, pswd, parm) = bb.decodeurl(url)
srclicfile = os.path.join(srcdir, path)
if not os.path.isfile(srclicfile):
raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
if 'md5' not in parm:
bb.error(pn + ": md5 checksum is not specified for ", url)
return False
beginline, endline = 0, 0
if 'beginline' in parm:
beginline = int(parm['beginline'])
if 'endline' in parm:
endline = int(parm['endline'])
if (not beginline) and (not endline):
md5chksum = bb.utils.md5_file(srclicfile)
else:
fi = open(srclicfile, 'r')
fo = tempfile.NamedTemporaryFile(mode='wb', prefix='poky.', suffix='.tmp', delete=False)
tmplicfile = fo.name;
lineno = 0
linesout = 0
for line in fi:
lineno += 1
if (lineno >= beginline):
if ((lineno <= endline) or not endline):
fo.write(line)
linesout += 1
else:
break
fo.flush()
fo.close()
fi.close()
md5chksum = bb.utils.md5_file(tmplicfile)
os.unlink(tmplicfile)
if parm['md5'] == md5chksum:
bb.note (pn + ": md5 checksum matched for ", url)
else:
bb.error (pn + ": md5 data is not matching for ", url)
bb.error (pn + ": The new md5 checksum is ", md5chksum)
bb.error (pn + ": Check if the license information has changed in")
sane = False
return sane
}
python do_package_qa () {
import subprocess
bb.note("DO PACKAGE QA")
logdir = d.getVar('T', True)
pkg = d.getVar('PN', True)
# Check the compile log for host contamination
compilelog = os.path.join(logdir,"log.do_compile")
if os.path.exists(compilelog):
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog
if subprocess.call(statement, shell=True) == 0:
bb.warn("%s: The compile log indicates that host include and/or library paths were used.\n \
Please check the log '%s' for more information." % (pkg, compilelog))
# Check the install log for host contamination
installlog = os.path.join(logdir,"log.do_install")
if os.path.exists(installlog):
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog
if subprocess.call(statement, shell=True) == 0:
bb.warn("%s: The install log indicates that host include and/or library paths were used.\n \
Please check the log '%s' for more information." % (pkg, installlog))
# Scan the packages...
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
# no packages should be scanned
if not packages:
return
testmatrix = d.getVarFlags("QAPATHTEST")
g = globals()
walk_sane = True
rdepends_sane = True
for package in packages.split():
skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
if skip:
bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
warnchecks = []
for w in (d.getVar("WARN_QA", True) or "").split():
if w in skip:
continue
if w in testmatrix and testmatrix[w] in g:
warnchecks.append(g[testmatrix[w]])
errorchecks = []
for e in (d.getVar("ERROR_QA", True) or "").split():
if e in skip:
continue
if e in testmatrix and testmatrix[e] in g:
errorchecks.append(g[testmatrix[e]])
bb.note("Checking Package: %s" % package)
path = "%s/%s" % (pkgdest, package)
if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
walk_sane = False
if not package_qa_check_rdepends(package, pkgdest, skip, d):
rdepends_sane = False
if not walk_sane or not rdepends_sane:
bb.fatal("QA run found fatal errors. Please consider fixing them.")
bb.note("DONE with PACKAGE QA")
}
python do_package_rpm () {
import os
def creat_srpm_dir(d):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
clean_licenses = get_licenses(d)
pkgwritesrpmdir = bb.data.expand('/tool/yocto/poky/build/tmp/deploy/sources/deploy-srpm/${PACKAGE_ARCH_EXTEND}', d)
pkgwritesrpmdir = pkgwritesrpmdir + '/' + clean_licenses
bb.mkdirhier(pkgwritesrpmdir)
os.chmod(pkgwritesrpmdir, 0755)
return pkgwritesrpmdir
# We need a simple way to remove the MLPREFIX from the package name,
# and dependency information...
def strip_multilib(name, d):
ml = d.getVar("MLPREFIX", True)
if ml and name and len(ml) != 0 and name.find(ml) >= 0:
return "".join(name.split(ml))
return name
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR_IPK', True)
tmpdir = d.getVar('TMPDIR', True)
pkgd = d.getVar('PKGD', True)
pkgdest = d.getVar('PKGDEST', True)
if not workdir or not outdir or not pkgd or not tmpdir:
bb.error("Variables incorrectly set, unable to package")
return
packages = d.getVar('PACKAGES', True)
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
# Construct the spec file...
srcname = strip_multilib(d.getVar('PN', True), d)
outspecfile = workdir + "/" + srcname + ".spec"
d.setVar('OUTSPECFILE', outspecfile)
bb.build.exec_func('write_specfile', d)
# Construct per file dependencies file
def dump_filerdeps(varname, outfile, d):
outfile.write("#!/usr/bin/env python\n\n")
outfile.write("# Dependency table\n")
outfile.write('deps = {\n')
for pkg in packages.split():
dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
dependsflist = (d.getVar(dependsflist_key, True) or "")
for dfile in dependsflist.split():
key = "FILE" + varname + "_" + dfile + "_" + pkg
depends_dict = bb.utils.explode_dep_versions(d.getVar(key, True) or "")
file = dfile.replace("@underscore@", "_")
file = file.replace("@closebrace@", "]")
file = file.replace("@openbrace@", "[")
file = file.replace("@tab@", "\t")
file = file.replace("@space@", " ")
file = file.replace("@at@", "@")
outfile.write('"' + pkgd + file + '" : "')
for dep in depends_dict:
ver = depends_dict[dep]
if dep and ver:
ver = ver.replace("(","")
ver = ver.replace(")","")
outfile.write(dep + " " + ver + " ")
else:
outfile.write(dep + " ")
outfile.write('",\n')
outfile.write('}\n\n')
outfile.write("import sys\n")
outfile.write("while 1:\n")
outfile.write("\tline = sys.stdin.readline().strip()\n")
outfile.write("\tif not line:\n")
outfile.write("\t\tsys.exit(0)\n")
outfile.write("\tif line in deps:\n")
outfile.write("\t\tprint(deps[line] + '\\n')\n")
# OE-core dependencies a.k.a. RPM requires
outdepends = workdir + "/" + srcname + ".requires"
try:
from __builtin__ import file
dependsfile = file(outdepends, 'w')
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
dump_filerdeps('RDEPENDS', dependsfile, d)
dependsfile.close()
os.chmod(outdepends, 0755)
# OE-core / RPM Provides
outprovides = workdir + "/" + srcname + ".provides"
try:
from __builtin__ import file
providesfile = file(outprovides, 'w')
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
dump_filerdeps('RPROVIDES', providesfile, d)
providesfile.close()
os.chmod(outprovides, 0755)
# Setup the rpmbuild arguments...
rpmbuild = d.getVar('RPMBUILD', True)
targetsys = d.getVar('TARGET_SYS', True)
targetvendor = d.getVar('TARGET_VENDOR', True)
package_arch = d.getVar('PACKAGE_ARCH', True) or ""
if package_arch not in "all any noarch".split():
ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_")
d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
else:
d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
pkgwritedir = d.expand('/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-rpms/${PACKAGE_ARCH_EXTEND}')
pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}-poky-linux')
magicfile = d.expand('/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share/misc/magic.mgc')
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
cmd = rpmbuild
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
cmd = cmd + " --define '__find_requires " + outdepends + "'"
cmd = cmd + " --define '__find_provides " + outprovides + "'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " --define '_tmppath " + workdir + "'"
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
cmdsrpm = cmd + " --define '_sourcedir " + workdir + "' --define '_srcrpmdir " + creat_srpm_dir(d) + "'"
cmdsrpm = 'fakeroot ' + cmdsrpm + " -bs " + outspecfile
cmd = cmd + " -bb " + outspecfile
# Build the source rpm package !
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
d.setVar('SBUILDSPEC', cmdsrpm + "\n")
d.setVarFlag('SBUILDSPEC', 'func', '1')
bb.build.exec_func('SBUILDSPEC', d)
# Build the rpm package!
d.setVar('BUILDSPEC', cmd + "\n")
d.setVarFlag('BUILDSPEC', 'func', '1')
bb.build.exec_func('BUILDSPEC', d)
}
python map_uboot_arch () {
def map_uboot_arch(a, d):
import re
if re.match('p(pc|owerpc)(|64)', a): return 'ppc'
elif re.match('i.86$', a): return 'x86'
return a
}
python buildcfg_neededvars () {
def buildcfg_neededvars(d):
needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
pesteruser = []
for v in needed_vars:
val = d.getVar(v, True)
if not val or val == 'INVALID':
pesteruser.append(v)
if pesteruser:
bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
}
python get_timedata () {
def get_timedata(var, data):
import time
timedata = data.getVar(var, False)
if timedata is None:
return
oldtime, oldcpu, oldproc = timedata
procdiff = get_process_cputime(os.getpid()) - oldproc
cpudiff = get_cputime() - oldcpu
timediff = time.time() - oldtime
if cpudiff > 0:
cpuperc = float(procdiff) * 100 / cpudiff
else:
cpuperc = None
return timediff, cpuperc
}
python do_package () {
# Change the following version to cause sstate to invalidate the package
# cache. This is useful if an item this class depends on changes in a
# way that the output of this class changes. rpmdeps is a good example
# as any change to rpmdeps requires this to be rerun.
# PACKAGE_BBCLASS_VERSION = "1"
packages = (d.getVar('PACKAGES', True) or "").split()
if len(packages) < 1:
bb.debug(1, "No packages to build, skipping do_package")
return
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR', True)
dest = d.getVar('D', True)
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
if not workdir or not outdir or not dest or not dvar or not pn or not packages:
bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
return
for f in (d.getVar('PACKAGEFUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
python package_do_shlibs () {
import re, pipes
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
if exclude_shlibs:
bb.note("not generating shlibs")
return
lib_re = re.compile("^.*\.so")
libdir_re = re.compile(".*/lib$")
packages = d.getVar('PACKAGES', True)
targetos = d.getVar('TARGET_OS', True)
workdir = d.getVar('WORKDIR', True)
ver = d.getVar('PKGV', True)
if not ver:
bb.error("PKGV not defined")
return
pkgdest = d.getVar('PKGDEST', True)
shlibs_dir = d.getVar('SHLIBSDIR', True)
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("/tool/yocto/poky/build/tmp/sysroots/package-output.lock"))
def linux_so(root, path, file):
needs_ldconfig = False
cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
for l in lines:
m = re.match("\s+NEEDED\s+([^\s]*)", l)
if m:
if m.group(1) not in needed[pkg]:
needed[pkg].append(m.group(1))
m = re.match("\s+SONAME\s+([^\s]*)", l)
if m:
this_soname = m.group(1)
if not this_soname in sonames:
# if library is private (only used by package) then do not build shlib for it
if not private_libs or -1 == private_libs.find(this_soname):
sonames.append(this_soname)
if libdir_re.match(root):
needs_ldconfig = True
if snap_symlinks and (file != this_soname):
renames.append((os.path.join(root, file), os.path.join(root, this_soname)))
return needs_ldconfig
def darwin_so(root, path, file):
fullpath = os.path.join(root, file)
if not os.path.exists(fullpath):
return
def get_combinations(base):
#
# Given a base library name, find all combinations of this split by "." and "-"
#
combos = []
options = base.split(".")
for i in range(1, len(options) + 1):
combos.append(".".join(options[0:i]))
options = base.split("-")
for i in range(1, len(options) + 1):
combos.append("-".join(options[0:i]))
return combos
if (file.endswith('.dylib') or file.endswith('.so')) and not pkg.endswith('-dev') and not pkg.endswith('-dbg'):
# Drop suffix
name = file.rsplit(".",1)[0]
# Find all combinations
combos = get_combinations(name)
for combo in combos:
if not combo in sonames:
sonames.append(combo)
if file.endswith('.dylib') or file.endswith('.so'):
lafile = fullpath.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
# Drop suffix
lafile = lafile.rsplit(".",1)[0]
lapath = os.path.dirname(lafile)
lafile = os.path.basename(lafile)
# Find all combinations
combos = get_combinations(lafile)
for combo in combos:
if os.path.exists(lapath + '/' + combo + '.la'):
break
lafile = lapath + '/' + combo + '.la'
#bb.note("Foo2: %s" % lafile)
#bb.note("Foo %s %s" % (file, fullpath))
if os.path.exists(lafile):
fd = open(lafile, 'r')
lines = fd.readlines()
fd.close()
for l in lines:
m = re.match("\s*dependency_libs=\s*'(.*)'", l)
if m:
deps = m.group(1).split(" ")
for dep in deps:
#bb.note("Trying %s for %s" % (dep, pkg))
name = None
if dep.endswith(".la"):
name = os.path.basename(dep).replace(".la", "")
elif dep.startswith("-l"):
name = dep.replace("-l", "lib")
if pkg not in needed:
needed[pkg] = []
if name and name not in needed[pkg]:
needed[pkg].append(name)
#bb.note("Adding %s for %s" % (name, pkg))
if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
snap_symlinks = True
else:
snap_symlinks = False
if (d.getVar('USE_LDCONFIG', True) or "1") == "1":
use_ldconfig = True
else:
use_ldconfig = False
needed = {}
shlib_provider = {}
for pkg in packages.split():
private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True)
needs_ldconfig = False
bb.debug(2, "calculating shlib provides for %s" % pkg)
pkgver = d.getVar('PKGV_' + pkg, True)
if not pkgver:
pkgver = d.getVar('PV_' + pkg, True)
if not pkgver:
pkgver = ver
needed[pkg] = []
sonames = list()
renames = list()
top = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(top):
for file in files:
soname = None
path = os.path.join(root, file)
if os.path.islink(path):
continue
if targetos == "darwin" or targetos == "darwin8":
darwin_so(root, dirs, file)
elif os.access(path, os.X_OK) or lib_re.match(file):
ldconfig = linux_so(root, dirs, file)
needs_ldconfig = needs_ldconfig or ldconfig
for (old, new) in renames:
bb.note("Renaming %s to %s" % (old, new))
os.rename(old, new)
shlibs_file = os.path.join(shlibswork_dir, pkg + ".list")
shver_file = os.path.join(shlibswork_dir, pkg + ".ver")
if len(sonames):
fd = open(shlibs_file, 'w')
for s in sonames:
fd.write(s + '\n')
shlib_provider[s] = (pkg, pkgver)
fd.close()
fd = open(shver_file, 'w')
fd.write(pkgver + '\n')
fd.close()
if needs_ldconfig and use_ldconfig:
bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
if not postinst:
postinst = '#!/bin/sh\n'
postinst += d.getVar('ldconfig_postinst_fragment', True)
d.setVar('pkg_postinst_%s' % pkg, postinst)
list_re = re.compile('^(.*)\.list$')
for dir in [shlibs_dir]:
if not os.path.exists(dir):
continue
for file in os.listdir(dir):
m = list_re.match(file)
if m:
dep_pkg = m.group(1)
fd = open(os.path.join(dir, file))
lines = fd.readlines()
fd.close()
ver_file = os.path.join(dir, dep_pkg + '.ver')
lib_ver = None
if os.path.exists(ver_file):
fd = open(ver_file)
lib_ver = fd.readline().rstrip()
fd.close()
for l in lines:
shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
bb.utils.unlockfile(lf)
assumed_libs = d.getVar('ASSUME_SHLIBS', True)
if assumed_libs:
for e in assumed_libs.split():
l, dep_pkg = e.split(":")
lib_ver = None
dep_pkg = dep_pkg.rsplit("_", 1)
if len(dep_pkg) == 2:
lib_ver = dep_pkg[1]
dep_pkg = dep_pkg[0]
shlib_provider[l] = (dep_pkg, lib_ver)
for pkg in packages.split():
bb.debug(2, "calculating shlib requirements for %s" % pkg)
deps = list()
for n in needed[pkg]:
if n in shlib_provider.keys():
(dep_pkg, ver_needed) = shlib_provider[n]
bb.debug(2, '%s: Dependency %s requires package %s' % (pkg, n, dep_pkg))
if dep_pkg == pkg:
continue
if ver_needed:
dep = "%s (>= %s)" % (dep_pkg, ver_needed)
else:
dep = dep_pkg
if not dep in deps:
deps.append(dep)
else:
bb.note("Couldn't find shared library provider for %s" % n)
deps_file = os.path.join(pkgdest, pkg + ".shlibdeps")
if os.path.exists(deps_file):
os.remove(deps_file)
if len(deps):
fd = open(deps_file, 'w')
for dep in deps:
fd.write(dep + '\n')
fd.close()
}
python base_contains () {
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
return oe.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
}
python package_qa_check_perm () {
def package_qa_check_perm(path,name,d, elf, messages):
"""
Check the permission of files
"""
return
}
python oe_import () {
def oe_import(d):
import os, sys
bbpath = d.getVar("BBPATH", True).split(":")
sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
def inject(name, value):
"""Make a python object accessible from the metadata"""
if hasattr(bb.utils, "_context"):
bb.utils._context[name] = value
else:
__builtins__[name] = value
import oe.data
for toimport in oe.data.typed_value("OE_IMPORTS", d):
imported = __import__(toimport)
inject(toimport.split(".", 1)[0], imported)
}
python package_qa_walk () {
def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
import oe.qa
#if this will throw an exception, then fix the dict above
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
warnings = []
errors = []
for root, dirs, files in os.walk(path):
for file in files:
path = os.path.join(root,file)
elf = oe.qa.ELFFile(path)
try:
elf.open()
except:
elf = None
for func in warnfuncs:
func(path, package, d, elf, warnings)
for func in errorfuncs:
func(path, package, d, elf, errors)
for w in warnings:
bb.warn("QA Issue: %s" % w)
package_qa_write_error(w, d)
for e in errors:
bb.error("QA Issue: %s" % e)
package_qa_write_error(e, d)
return len(errors) == 0
}
python do_unpack () {
bb.build.exec_func('base_do_unpack', d)
}
python runstrip () {
def runstrip(file, elftype, d):
# Function to strip a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
#
# The elftype is a bit pattern (explained in split_and_strip_files) to tell
# us what type of file we're processing...
# 4 - executable
# 8 - shared library
import commands, stat, subprocess
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
strip = d.getVar("STRIP", True)
# Handle kernel modules specifically - .debug directories here are pointless
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
return subprocess.call("%s'%s' --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates '%s'" % (pathprefix, strip, file), shell=True)
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
origmode = os.stat(file)[stat.ST_MODE]
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
extraflags = ""
# .so and shared library
if ".so" in file and elftype & 8:
extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
# shared or executable:
elif elftype & 8 or elftype & 4:
extraflags = "--remove-section=.comment --remove-section=.note"
stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
bb.debug(1, "runstrip: %s" % stripcmd)
ret = subprocess.call("%s%s" % (pathprefix, stripcmd), shell=True)
if newmode:
os.chmod(file, origmode)
if ret:
bb.error("runstrip: '%s' strip command failed" % stripcmd)
return 0
}
python check_sanity_validmachine () {
def check_sanity_validmachine(sanity_data):
from bb import data
messages = ""
# Check TUNE_ARCH is set
if sanity_data.getVar('TUNE_ARCH', True) == 'INVALID':
messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
# Check TARGET_OS is set
if sanity_data.getVar('TARGET_OS', True) == 'INVALID':
messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
# Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
pkgarchs = sanity_data.getVar('PACKAGE_ARCHS', True)
tunepkg = sanity_data.getVar('TUNE_PKGARCH', True)
tunefound = False
seen = {}
dups = []
for pa in pkgarchs.split():
if seen.get(pa, 0) == 1:
dups.append(pa)
else:
seen[pa] = 1
if pa == tunepkg:
tunefound = True
if len(dups):
messages = messages + "Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: %s" % " ".join(dups)
if tunefound == False:
messages = messages + "Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH (%s)." % tunepkg
return messages
}
python package_qa_check_desktop () {
def package_qa_check_desktop(path, name, d, elf, messages):
"""
Run all desktop files through desktop-file-validate.
"""
if path.endswith(".desktop"):
desktop_file_validate = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'desktop-file-validate')
output = os.popen("%s %s" % (desktop_file_validate, path))
# This only produces output on errors
for l in output:
messages.append("Desktop file issue: " + l.strip())
}
python get_diskstats () {
def get_diskstats(dev):
import itertools
############################################################################
# For info on what these are, see kernel doc file iostats.txt
############################################################################
DSTAT_KEYS = ['ReadsComp', 'ReadsMerged', 'SectRead', 'TimeReads', 'WritesComp', 'SectWrite', 'TimeWrite', 'IOinProgress', 'TimeIO', 'WTimeIO']
try:
for x in open("/proc/diskstats", "r"):
if dev in x:
diskstats_val = x.rstrip().split()[4:]
except IOError as e:
return
diskstats = dict(itertools.izip(DSTAT_KEYS, diskstats_val))
return diskstats
}
python do_menuconfig () {
try:
mtime = os.path.getmtime(".config")
except OSError:
mtime = 0
oe_terminal("/bin/bash -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", 'linux-xilinx Configuration', d)
# FIXME this check can be removed when the minimum bitbake version has been bumped
if hasattr(bb.build, 'write_taint'):
try:
newmtime = os.path.getmtime(".config")
except OSError:
newmtime = 0
if newmtime > mtime:
bb.note("Configuration changed, recompile will be forced")
bb.build.write_taint('do_compile', d)
}
python src_patches () {
def src_patches(d, all = False ):
workdir = d.getVar('WORKDIR', True)
fetch = bb.fetch2.Fetch([], d)
patches = []
sources = []
for url in fetch.urls:
local = patch_path(url, fetch, workdir)
if not local:
if all:
local = fetch.localpath(url)
sources.append(local)
continue
urldata = fetch.ud[url]
parm = urldata.parm
patchname = parm.get('pname') or os.path.basename(local)
apply, reason = should_apply(parm, d)
if not apply:
if reason:
bb.note("Patch %s %s" % (patchname, reason))
continue
patchparm = {'patchname': patchname}
if "striplevel" in parm:
striplevel = parm["striplevel"]
elif "pnum" in parm:
#bb.msg.warn(None, "Deprecated usage of 'pnum' url parameter in '%s', please use 'striplevel'" % url)
striplevel = parm["pnum"]
else:
striplevel = '1'
patchparm['striplevel'] = striplevel
patchdir = parm.get('patchdir')
if patchdir:
patchparm['patchdir'] = patchdir
localurl = bb.encodeurl(('file', '', local, '', '', patchparm))
patches.append(localurl)
if all:
return sources
return patches
}
python get_device () {
def get_device(e):
file = open(e.data.getVar('DEVFILE', True))
device = file.readline()
file.close()
return device
}
python check_conf_exists () {
def check_conf_exists(fn, data):
bbpath = []
fn = data.expand(fn)
vbbpath = data.getVar("BBPATH")
if vbbpath:
bbpath += vbbpath.split(":")
for p in bbpath:
currname = os.path.join(data.expand(p), fn)
if os.access(currname, os.R_OK):
return True
return False
}
python package_qa_hash_style () {
def package_qa_hash_style(path, name, d, elf, messages):
"""
Check if the binary has the right hash style...
"""
if not elf:
return
if os.path.islink(path):
return
gnu_hash = "--hash-style=gnu" in d.getVar('LDFLAGS', True)
if not gnu_hash:
gnu_hash = "--hash-style=both" in d.getVar('LDFLAGS', True)
if not gnu_hash:
return
objdump = d.getVar('OBJDUMP', True)
env_path = d.getVar('PATH', True)
sane = False
has_syms = False
# If this binary has symbols, we expect it to have GNU_HASH too.
for line in os.popen("LC_ALL=C PATH=%s %s -p '%s' 2> /dev/null" % (env_path, objdump, path), "r"):
if "SYMTAB" in line:
has_syms = True
if "GNU_HASH" in line:
sane = True
if "[mips32]" in line or "[mips64]" in line:
sane = True
if has_syms and not sane:
messages.append("No GNU_HASH in the elf binary: '%s'" % path)
}
python base_set_filespath () {
def base_set_filespath(path, d):
filespath = []
extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "")
# Don't prepend empty strings to the path list
if extrapaths != "":
path = extrapaths.split(":") + path
# The ":" ensures we have an 'empty' override
overrides = (d.getVar("OVERRIDES", True) or "") + ":"
for p in path:
if p != "":
for o in overrides.split(":"):
filespath.append(os.path.join(p, o))
return ":".join(filespath)
}
python mapping_rename_hook () {
def mapping_rename_hook(d):
"""
Rewrite variables to account for package renaming in things
like debian.bbclass or manual PKG variable name changes
"""
runtime_mapping_rename("RDEPENDS", d)
runtime_mapping_rename("RRECOMMENDS", d)
runtime_mapping_rename("RSUGGESTS", d)
runtime_mapping_rename("RPROVIDES", d)
runtime_mapping_rename("RREPLACES", d)
runtime_mapping_rename("RCONFLICTS", d)
}
python linux_module_packages () {
def linux_module_packages(s, d):
suffix = ""
return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
}
python base_do_unpack () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
rootdir = localdata.getVar('WORKDIR', True)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.unpack(rootdir)
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python do_populate_sysroot_setscene () {
sstate_setscene(d)
}
python get_layers_branch_rev () {
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS", True) or "").split()
layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
base_get_metadata_git_revision(i, None)) \
for i in layers]
i = len(layers_branch_rev)-1
p1 = layers_branch_rev[i].find("=")
s1 = layers_branch_rev[i][p1:]
while i > 0:
p2 = layers_branch_rev[i-1].find("=")
s2= layers_branch_rev[i-1][p2:]
if s1 == s2:
layers_branch_rev[i-1] = layers_branch_rev[i-1][0:p2]
i -= 1
else:
i -= 1
p1 = layers_branch_rev[i].find("=")
s1= layers_branch_rev[i][p1:]
return layers_branch_rev
}
python base_get_scmbasepath () {
def base_get_scmbasepath(d):
return d.getVar( 'COREBASE', True)
}
python check_license_flags () {
def check_license_flags(d):
"""
This function checks if a recipe has any LICENSE_FLAGs that
aren't whitelisted.
If it does, it returns the first LICENSE_FLAG missing from the
whitelist, or all the LICENSE_FLAGs if there is no whitelist.
If everything is is properly whitelisted, it returns None.
"""
def license_flag_matches(flag, whitelist, pn):
"""
Return True if flag matches something in whitelist, None if not.
Before we test a flag against the whitelist, we append _linux-xilinx
to it. We then try to match that string against the
whitelist. This covers the normal case, where we expect
LICENSE_FLAGS to be a simple string like 'commercial', which
the user typically matches exactly in the whitelist by
explicitly appending the package name e.g 'commercial_foo'.
If we fail the match however, we then split the flag across
'_' and append each fragment and test until we either match or
run out of fragments.
"""
flag_pn = ("%s_%s" % (flag, pn))
for candidate in whitelist:
if flag_pn == candidate:
return True
flag_cur = ""
flagments = flag_pn.split("_")
flagments.pop() # we've already tested the full string
for flagment in flagments:
if flag_cur:
flag_cur += "_"
flag_cur += flagment
for candidate in whitelist:
if flag_cur == candidate:
return True
return False
def all_license_flags_match(license_flags, whitelist):
""" Return first unmatched flag, None if all flags match """
pn = d.getVar('PN', True)
split_whitelist = whitelist.split()
for flag in license_flags.split():
if not license_flag_matches(flag, split_whitelist, pn):
return flag
return None
license_flags = d.getVar('LICENSE_FLAGS', True)
if license_flags:
whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True)
if not whitelist:
return license_flags
unmatched_flag = all_license_flags_match(license_flags, whitelist)
if unmatched_flag:
return unmatched_flag
return None
}
python check_sanity_version_change () {
def check_sanity_version_change(data):
# Sanity checks to be done when SANITY_VERSION changes
return ""
}
python package_do_pkgconfig () {
import re
packages = d.getVar('PACKAGES', True)
workdir = d.getVar('WORKDIR', True)
pkgdest = d.getVar('PKGDEST', True)
shlibs_dir = d.getVar('SHLIBSDIR', True)
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
pc_re = re.compile('(.*)\.pc$')
var_re = re.compile('(.*)=(.*)')
field_re = re.compile('(.*): (.*)')
pkgconfig_provided = {}
pkgconfig_needed = {}
for pkg in packages.split():
pkgconfig_provided[pkg] = []
pkgconfig_needed[pkg] = []
top = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(top):
for file in files:
m = pc_re.match(file)
if m:
pd = bb.data.init()
name = m.group(1)
pkgconfig_provided[pkg].append(name)
path = os.path.join(root, file)
if not os.access(path, os.R_OK):
continue
f = open(path, 'r')
lines = f.readlines()
f.close()
for l in lines:
m = var_re.match(l)
if m:
name = m.group(1)
val = m.group(2)
pd.setVar(name, pd.expand(val))
continue
m = field_re.match(l)
if m:
hdr = m.group(1)
exp = bb.data.expand(m.group(2), pd)
if hdr == 'Requires':
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("/tool/yocto/poky/build/tmp/sysroots/package-output.lock"))
for pkg in packages.split():
pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
if pkgconfig_provided[pkg] != []:
f = open(pkgs_file, 'w')
for p in pkgconfig_provided[pkg]:
f.write('%s\n' % p)
f.close()
for dir in [shlibs_dir]:
if not os.path.exists(dir):
continue
for file in os.listdir(dir):
m = re.match('^(.*)\.pclist$', file)
if m:
pkg = m.group(1)
fd = open(os.path.join(dir, file))
lines = fd.readlines()
fd.close()
pkgconfig_provided[pkg] = []
for l in lines:
pkgconfig_provided[pkg].append(l.rstrip())
for pkg in packages.split():
deps = []
for n in pkgconfig_needed[pkg]:
found = False
for k in pkgconfig_provided.keys():
if n in pkgconfig_provided[k]:
if k != pkg and not (k in deps):
deps.append(k)
found = True
if found == False:
bb.note("couldn't find pkgconfig module '%s' in any package" % n)
deps_file = os.path.join(pkgdest, pkg + ".pcdeps")
if len(deps):
fd = open(deps_file, 'w')
for dep in deps:
fd.write(dep + '\n')
fd.close()
bb.utils.unlockfile(lf)
}
python base_eventhandler () {
if isinstance(e, bb.event.ConfigParsed):
e.data.setVar('BB_VERSION', bb.__version__)
generate_git_config(e)
pkgarch_mapping(e.data)
preferred_ml_updates(e.data)
if isinstance(e, bb.event.BuildStarted):
statuslines = []
for func in oe.data.typed_value('BUILDCFG_FUNCS', e.data):
g = globals()
if func not in g:
bb.warn("Build configuration function '%s' does not exist" % func)
else:
flines = g[func](e.data)
if flines:
statuslines.extend(flines)
statusheader = e.data.getVar('BUILDCFG_HEADER', True)
bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
}
python sstate_init () {
def sstate_init(name, task, d):
ss = {}
ss['task'] = task
ss['name'] = name
ss['dirs'] = []
ss['plaindirs'] = []
ss['lockfiles'] = []
ss['lockfiles-shared'] = []
return ss
}
python sstate_clean () {
def sstate_clean(ss, d):
import oe.path
manifest = d.expand("/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-linux-xilinx.%s" % ss['name'])
if os.path.exists(manifest):
locks = []
for lock in ss['lockfiles-shared']:
locks.append(bb.utils.lockfile(lock))
for lock in ss['lockfiles']:
locks.append(bb.utils.lockfile(lock))
sstate_clean_manifest(manifest, d)
for lock in locks:
bb.utils.unlockfile(lock)
stfile = d.getVar("STAMP", True) + ".do_" + ss['task']
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
oe.path.remove(stfile)
oe.path.remove(stfile + "_setscene")
if extrainf:
oe.path.remove(stfile + ".*" + extrainf)
oe.path.remove(stfile + "_setscene" + ".*" + extrainf)
else:
oe.path.remove(stfile + ".*")
oe.path.remove(stfile + "_setscene" + ".*")
}
python emit_pkgdata () {
from glob import glob
def write_if_exists(f, pkg, var):
def encode(str):
import codecs
c = codecs.getencoder("string_escape")
return c(str)[0]
val = d.getVar('%s_%s' % (var, pkg), True)
if val:
f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
return
val = d.getVar('%s' % (var), True)
if val:
f.write('%s: %s\n' % (var, encode(val)))
return
def get_directory_size(dir):
if os.listdir(dir):
size = int(os.popen('du -sk %s' % dir).readlines()[0].split('\t')[0])
else:
size = 0
return size
packages = d.getVar('PACKAGES', True)
pkgdest = d.getVar('PKGDEST', True)
pkgdatadir = d.getVar('PKGDESTWORK', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("/tool/yocto/poky/build/tmp/sysroots/package-output.lock"), True)
data_file = pkgdatadir + d.expand("/linux-xilinx" )
f = open(data_file, 'w')
f.write("PACKAGES: %s\n" % packages)
f.close()
workdir = d.getVar('WORKDIR', True)
for pkg in packages.split():
subdata_file = pkgdatadir + "/runtime/%s" % pkg
sf = open(subdata_file, 'w')
write_if_exists(sf, pkg, 'PN')
write_if_exists(sf, pkg, 'PV')
write_if_exists(sf, pkg, 'PR')
write_if_exists(sf, pkg, 'PKGV')
write_if_exists(sf, pkg, 'PKGR')
write_if_exists(sf, pkg, 'LICENSE')
write_if_exists(sf, pkg, 'DESCRIPTION')
write_if_exists(sf, pkg, 'SUMMARY')
write_if_exists(sf, pkg, 'RDEPENDS')
write_if_exists(sf, pkg, 'RPROVIDES')
write_if_exists(sf, pkg, 'RRECOMMENDS')
write_if_exists(sf, pkg, 'RSUGGESTS')
write_if_exists(sf, pkg, 'RREPLACES')
write_if_exists(sf, pkg, 'RCONFLICTS')
write_if_exists(sf, pkg, 'SECTION')
write_if_exists(sf, pkg, 'PKG')
write_if_exists(sf, pkg, 'ALLOW_EMPTY')
write_if_exists(sf, pkg, 'FILES')
write_if_exists(sf, pkg, 'pkg_postinst')
write_if_exists(sf, pkg, 'pkg_postrm')
write_if_exists(sf, pkg, 'pkg_preinst')
write_if_exists(sf, pkg, 'pkg_prerm')
write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or "").split():
write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg, True) or "").split():
write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
sf.write('%s_%s: %s\n' % ('PKGSIZE', pkg, get_directory_size(pkgdest + "/%s" % pkg)))
sf.close()
allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True)
if not allow_empty:
allow_empty = d.getVar('ALLOW_EMPTY', True)
root = "%s/%s" % (pkgdest, pkg)
os.chdir(root)
g = glob('*')
if g or allow_empty == "1":
packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg
file(packagedfile, 'w').close()
bb.utils.unlockfile(lf)
}
python package_qa_check_dbg () {
def package_qa_check_dbg(path, name, d, elf, messages):
"""
Check for ".debug" files or directories outside of the dbg package
"""
if not "-dbg" in name:
if '.debug' in path.split(os.path.sep):
messages.append("non debug package contains .debug directory: %s path %s" % \
(name, package_qa_clean_path(path,d)))
}
python package_do_filedeps () {
import re
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
rpmdeps = d.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/rpmdeps-oecore --macros /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/macros --define '_rpmfc_magic_path /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share/misc/magic.mgc' --rpmpopt /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/rpmpopt")
r = re.compile(r'[<>=]+ +[^ ]*')
def file_translate(file):
ft = file.replace("@", "@at@")
ft = ft.replace(" ", "@space@")
ft = ft.replace("\t", "@tab@")
ft = ft.replace("[", "@openbrace@")
ft = ft.replace("]", "@closebrace@")
ft = ft.replace("_", "@underscore@")
return ft
# Quick routine to process the results of the rpmdeps call...
def process_deps(pipe, pkg, provides_files, requires_files):
provides = {}
requires = {}
for line in pipe:
f = line.split(" ", 1)[0].strip()
line = line.split(" ", 1)[1].strip()
if line.startswith("Requires:"):
i = requires
elif line.startswith("Provides:"):
i = provides
else:
continue
file = f.replace(pkgdest + "/" + pkg, "")
file = file_translate(file)
value = line.split(":", 1)[1].strip()
value = r.sub(r'(\g<0>)', value)
if value.startswith("rpmlib("):
continue
if value == "python":
continue
if file not in i:
i[file] = []
i[file].append(value)
for file in provides:
provides_files.append(file)
key = "FILERPROVIDES_" + file + "_" + pkg
d.setVar(key, " ".join(provides[file]))
for file in requires:
requires_files.append(file)
key = "FILERDEPENDS_" + file + "_" + pkg
d.setVar(key, " ".join(requires[file]))
def chunks(files, n):
return [files[i:i+n] for i in range(0, len(files), n)]
# Determine dependencies
for pkg in packages.split():
if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
continue
provides_files = []
requires_files = []
rpfiles = []
for root, dirs, files in os.walk(pkgdest + "/" + pkg):
for file in files:
rpfiles.append(os.path.join(root, file))
for files in chunks(rpfiles, 100):
dep_pipe = os.popen(rpmdeps + " " + " ".join(files))
process_deps(dep_pipe, pkg, provides_files, requires_files)
d.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files))
d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files))
}
python copy_data () {
def copy_data(e):
sanity_data = bb.data.createCopy(e.data)
sanity_data.finalize()
return sanity_data
}
python raise_sanity_error () {
def raise_sanity_error(msg, d):
if d.getVar("SANITY_USE_EVENTS", True) == "1":
# FIXME: handle when BitBake version is too old to support bb.event.SanityCheckFailed
# We can just fire the event directly once the minimum version is bumped beyond 1.15.1
try:
bb.event.fire(bb.event.SanityCheckFailed(msg), d)
return
except AttributeError:
pass
bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
%s""" % msg)
}
python base_detect_branch () {
def base_detect_branch(d):
path = base_get_scmbasepath(d)
scms = [base_get_metadata_git_branch]
for scm in scms:
rev = scm(path, d)
if rev <> "<unknown>":
return rev.strip()
return "<unknown>"
}
python debian_package_name_hook () {
import glob, copy, stat, errno, re
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$")
lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$")
so_re = re.compile("lib.*\.so")
def socrunch(s):
s = s.lower().replace('_', '-')
m = re.match("^(.*)(.)\.so\.(.*)$", s)
if m is None:
return None
if m.group(2) in '0123456789':
bin = '%s%s-%s' % (m.group(1), m.group(2), m.group(3))
else:
bin = m.group(1) + m.group(2) + m.group(3)
dev = m.group(1) + m.group(2)
return (bin, dev)
def isexec(path):
try:
s = os.stat(path)
except (os.error, AttributeError):
return 0
return (s[stat.ST_MODE] & stat.S_IEXEC)
def auto_libname(packages, orig_pkg):
sonames = []
has_bins = 0
has_libs = 0
pkg_dir = os.path.join(pkgdest, orig_pkg)
for root, dirs, files in os.walk(pkg_dir):
if bin_re.match(root) and files:
has_bins = 1
if lib_re.match(root) and files:
has_libs = 1
for f in files:
if so_re.match(f):
fp = os.path.join(root, f)
cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null"
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
for l in lines:
m = re.match("\s+SONAME\s+([^\s]*)", l)
if m and not m.group(1) in sonames:
sonames.append(m.group(1))
bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
soname = None
if len(sonames) == 1:
soname = sonames[0]
elif len(sonames) > 1:
lead = d.getVar('LEAD_SONAME', True)
if lead:
r = re.compile(lead)
filtered = []
for s in sonames:
if r.match(s):
filtered.append(s)
if len(filtered) == 1:
soname = filtered[0]
elif len(filtered) > 1:
bb.note("Multiple matches (%s) for LEAD_SONAME '%s'" % (", ".join(filtered), lead))
else:
bb.note("Multiple libraries (%s) found, but LEAD_SONAME '%s' doesn't match any of them" % (", ".join(sonames), lead))
else:
bb.note("Multiple libraries (%s) found and LEAD_SONAME not defined" % ", ".join(sonames))
if has_libs and not has_bins and soname:
soname_result = socrunch(soname)
if soname_result:
(pkgname, devname) = soname_result
for pkg in packages.split():
if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
continue
debian_pn = d.getVar('DEBIANNAME_' + pkg)
if debian_pn:
newpkg = debian_pn
elif pkg == orig_pkg:
newpkg = pkgname
else:
newpkg = pkg.replace(orig_pkg, devname, 1)
mlpre=d.getVar('MLPREFIX', True)
if mlpre:
if not newpkg.find(mlpre) == 0:
newpkg = mlpre + newpkg
if newpkg != pkg:
d.setVar('PKG_' + pkg, newpkg)
# reversed sort is needed when some package is substring of another
# ie in ncurses we get without reverse sort:
# DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libtic orig_pkg ncurses-libtic debian_pn None newpkg libtic5
# and later
# DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw
# so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5
for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', True) or "").split(), reverse=True):
auto_libname(packages, pkg)
}
python check_toolchain_tune () {
def check_toolchain_tune(data, tune, multilib):
tune_errors = []
if not tune:
return "No tuning found for %s multilib." % multilib
bb.debug(2, "Sanity-checking tuning '%s' (%s) features:" % (tune, multilib))
features = (data.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
if not features:
return "Tuning '%s' has no defined features, and cannot be used." % tune
valid_tunes = data.getVarFlags('TUNEVALID') or {}
conflicts = data.getVarFlags('TUNECONFLICTS') or {}
# [doc] is the documentation for the variable, not a real feature
if 'doc' in valid_tunes:
del valid_tunes['doc']
if 'doc' in conflicts:
del conflicts['doc']
for feature in features:
if feature in conflicts:
for conflict in conflicts[feature].split():
if conflict in features:
tune_errors.append("Feature '%s' conflicts with '%s'." %
(feature, conflict))
if feature in valid_tunes:
bb.debug(2, " %s: %s" % (feature, valid_tunes[feature]))
else:
tune_errors.append("Feature '%s' is not defined." % feature)
whitelist = data.getVar("TUNEABI_WHITELIST", True) or ''
override = data.getVar("TUNEABI_OVERRIDE", True) or ''
if whitelist:
tuneabi = data.getVar("TUNEABI_tune-%s" % tune, True) or ''
if not tuneabi:
tuneabi = tune
if True not in [x in whitelist.split() for x in tuneabi.split()]:
tune_errors.append("Tuning '%s' (%s) cannot be used with any supported tuning/ABI." %
(tune, tuneabi))
if tune_errors:
return "Tuning '%s' has the following errors:\n" + '\n'.join(tune_errors)
}
python get_diskdata () {
def get_diskdata(var, dev, data):
olddiskdata = data.getVar(var, False)
diskdata = {}
if olddiskdata is None:
return
newdiskdata = get_diskstats(dev)
for key in olddiskdata.iterkeys():
diskdata["Start"+key] = str(int(olddiskdata[key]))
diskdata["End"+key] = str(int(newdiskdata[key]))
return diskdata
}
python base_get_metadata_git_revision () {
def base_get_metadata_git_revision(path, d):
f = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>&1" % path)
data = f.read()
if f.close() is None:
rev = data.split(" ")[0]
if len(rev) != 0:
return rev
return "<unknown>"
}
python package_rpm_install () {
bb.fatal("package_rpm_install not implemented!")
}
[-- Attachment #3: SRCREV.txt --]
[-- Type: text/plain, Size: 379346 bytes --]
Loading cache...done.
Loaded 1529 entries from dependency cache.
Parsing recipes...done.
Parsing of 1193 .bb files complete (1191 cached, 2 parsed). 1529 targets, 40 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
# STAGING_INCDIR_NATIVE=${STAGING_DIR_NATIVE}${includedir_native}
STAGING_INCDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include"
# KERNEL_IMAGEDEST=boot
KERNEL_IMAGEDEST="boot"
# prefix=/usr
export prefix="/usr"
# FREESMARTPHONE_GIT=git://git.freesmartphone.org
FREESMARTPHONE_GIT="git://git.freesmartphone.org"
# INHERIT_INSANE=insane
INHERIT_INSANE="insane"
# CVSDIR=${CO_DIR}/cvs
CVSDIR="/tool/yocto/poky/build/downloads/cvs"
# SVNDIR=${CO_DIR}/svn
SVNDIR="/tool/yocto/poky/build/downloads/svn"
# PREFERRED_VERSION_gcc-cross-intermediate=${GCCVERSION}
PREFERRED_VERSION_gcc-cross-intermediate="4.7%"
# bindir_cross=/bin
bindir_cross="/bin"
# BASEDEPENDS=${@base_dep_prepend(d)}
# PREFERRED_PROVIDER_libgcc-nativesdk=libgcc-nativesdk
PREFERRED_PROVIDER_libgcc-nativesdk="libgcc-nativesdk"
# BB_CONSOLELOG=${TMPDIR}/cooker.log.${DATETIME}
BB_CONSOLELOG="/tool/yocto/poky/build/tmp/cooker.log.20120623074715"
# STRIP=${HOST_PREFIX}strip
export STRIP="powerpc-poky-linux-strip"
# STAGING_DATADIR=${STAGING_DIR_HOST}${datadir}
STAGING_DATADIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/share"
# target_datadir=/usr/share
target_datadir="/usr/share"
# PKG_kernel-base=kernel-${@legitimize_package_name('${KERNEL_VERSION}')}
PKG_kernel-base="kernel-3.3.0-14.2-build1"
# FETCHCOMMAND_cvs=/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}
FETCHCOMMAND_cvs="/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
# base_bindir_native=/bin
base_bindir_native="/bin"
# localstatedir=${base_prefix}/var
export localstatedir="/var"
# SECTION_${PN}-dbg=None
# DATETIME=${DATE}${TIME}
DATETIME="20120623074715"
# BUILDCFG_VARS=BB_VERSION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU
BUILDCFG_VARS="BB_VERSION TARGET_ARCH TARGET_OS MACHINE DISTRO DISTRO_VERSION TUNE_FEATURES TARGET_FPU"
# BUILD_CC=${CCACHE}${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}
export BUILD_CC="gcc"
# IMAGE_FEATURES= ${EXTRA_IMAGE_FEATURES}
IMAGE_FEATURES="debug-tweaks"
# DESCRIPTION_linux-xilinx-staticdev=${DESCRIPTION} This package contains static libraries for software development.
DESCRIPTION_linux-xilinx-staticdev="Linux kernel for Xilinx platforms This package contains static libraries for software development."
# SEPPUKU_AUTOBUILD=None
# INITRAMFS_FSTYPES=cpio.gz
INITRAMFS_FSTYPES="cpio.gz"
# PREFERRED_VERSION_cross-localedef-native=${EGLIBCVERSION}
PREFERRED_VERSION_cross-localedef-native="2.15"
# INHIBIT_DEFAULT_DEPS=1
INHIBIT_DEFAULT_DEPS="1"
# INITRAMFS_TASK=
# SOLIBSDEV_darwin8=.dylib
SOLIBSDEV_darwin8=".dylib"
# SOLIBSDEV_darwin9=.dylib
SOLIBSDEV_darwin9=".dylib"
# USER=elvis
export USER="elvis"
# OES_BITBAKE_CONF=1
OES_BITBAKE_CONF="1"
# QADEPENDS_virtclass-nativesdk=
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc=None
# SUMMARY_linux-xilinx-doc=${SUMMARY} - Documentation files
SUMMARY_linux-xilinx-doc="linux-xilinx version 3.3.0-r0 - Documentation files"
# UPDATECOMMAND=ERROR, this must be a BitBake bug
UPDATECOMMAND="ERROR, this must be a BitBake bug"
# EXTENDPE=${@['','${PE\x7d_'][d.getVar('PE',1) > 0]}
# ALLOW_EMPTY_linux-xilinx-dbg=1
ALLOW_EMPTY_linux-xilinx-dbg="1"
# PREFERRED_VERSION_gcc-cross-initial=${GCCVERSION}
PREFERRED_VERSION_gcc-cross-initial="4.7%"
# KERNEL_PRIORITY=${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}
KERNEL_PRIORITY="30300"
# BBINCLUDED=/tool/yocto/poky/meta/classes/kernel-arch.bbclass /tool/yocto/poky/meta/classes/utility-tasks.bbclass /tool/yocto/meta-xilinx/conf/distro/include/xilinx-default-revisions.inc /tool/yocto/poky/meta/conf/distro/include/world-broken.inc /tool/yocto/poky/meta/recipes-kernel/linux/linux-dtb.inc /tool/yocto/poky/meta/classes/patch.bbclass /tool/yocto/poky/meta/conf/distro/include/as-needed.inc /tool/yocto/meta-xilinx/conf/machine/include/tune-ppc440.inc /tool/yocto/poky/meta/conf/layer.conf /tool/yocto/poky/meta-yocto/conf/distro/poky.conf /tool/yocto/poky/meta/conf/documentation.conf /tool/yocto/poky/meta/classes/mirrors.bbclass /tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx.inc /tool/yocto/meta-openembedded/meta-oe/conf/layer.conf /tool/yocto/poky/meta/classes/utils.bbclass /tool/yocto/poky/meta/classes/insane.bbclass /tool/yocto/poky/meta/classes/devshell.bbclass /tool/yocto/poky/meta/classes/image-mklibs.bbclass /tool/yocto/poky/meta/classes/debian.bbclass /tool/yocto/poky/meta/conf/abi_version.conf /tool/yocto/poky/meta/conf/distro/include/default-versions.inc /tool/yocto/poky/meta/classes/staging.bbclass /tool/yocto/poky/meta/classes/logging.bbclass /tool/yocto/poky/meta/classes/module_strip.bbclass /tool/yocto/poky/meta/conf/bitbake.conf /tool/yocto/poky/meta/conf/sanity.conf /tool/yocto/poky/meta/classes/buildstats.bbclass /tool/yocto/poky/meta/classes/package.bbclass /tool/yocto/poky/meta/classes/terminal.bbclass /tool/yocto/poky/build/conf/local.conf /tool/yocto/poky/meta/classes/package_rpm.bbclass /tool/yocto/poky/build/conf/bblayers.conf /tool/yocto/poky/meta/conf/distro/include/tclibc-eglibc.inc /tool/yocto/poky/meta/classes/license.bbclass /tool/yocto/poky/meta/classes/sstate.bbclass /tool/yocto/meta-xilinx/classes/xilinx-utils.bbclass /tool/yocto/poky/meta-yocto/conf/layer.conf /tool/yocto/poky/meta/classes/linux-kernel-base.bbclass /tool/yocto/poky/meta/classes/kernel.bbclass /tool/yocto/poky/meta/classes/prserv.bbclass /tool/yocto/poky/meta/classes/image-prelink.bbclass /tool/yocto/meta-xilinx/classes/xilinx-kernel.bbclass /tool/yocto/meta-xilinx/conf/layer.conf /tool/yocto/poky/meta/conf/distro/include/tcmode-default.inc /tool/yocto/poky/meta/classes/cml1.bbclass /tool/yocto/poky/meta/classes/base.bbclass /tool/yocto/poky/meta/conf/distro/include/default-distrovars.inc /tool/yocto/poky/meta/conf/machine/include/powerpc/arch-powerpc.inc /tool/yocto/poky/meta/classes/packagedata.bbclass /tool/yocto/poky/meta/classes/deploy.bbclass /tool/yocto/poky/meta/conf/distro/include/default-providers.inc /tool/yocto/poky/meta/conf/distro/defaultsetup.conf /tool/yocto/poky/meta/classes/sanity.bbclass /tool/yocto/meta-xilinx/conf/machine/virtex5.conf /tool/yocto/poky/meta/classes/metadata_scm.bbclass
BBINCLUDED="/tool/yocto/poky/meta/classes/kernel-arch.bbclass /tool/yocto/poky/meta/classes/utility-tasks.bbclass /tool/yocto/meta-xilinx/conf/distro/include/xilinx-default-revisions.inc /tool/yocto/poky/meta/conf/distro/include/world-broken.inc /tool/yocto/poky/meta/recipes-kernel/linux/linux-dtb.inc /tool/yocto/poky/meta/classes/patch.bbclass /tool/yocto/poky/meta/conf/distro/include/as-needed.inc /tool/yocto/meta-xilinx/conf/machine/include/tune-ppc440.inc /tool/yocto/poky/meta/conf/layer.conf /tool/yocto/poky/meta-yocto/conf/distro/poky.conf /tool/yocto/poky/meta/conf/documentation.conf /tool/yocto/poky/meta/classes/mirrors.bbclass /tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx.inc /tool/yocto/meta-openembedded/meta-oe/conf/layer.conf /tool/yocto/poky/meta/classes/utils.bbclass /tool/yocto/poky/meta/classes/insane.bbclass /tool/yocto/poky/meta/classes/devshell.bbclass /tool/yocto/poky/meta/classes/image-mklibs.bbclass /tool/yocto/poky/meta/classes/debian.bbclass /tool/yocto/poky/meta/conf/abi_version.conf /tool/yocto/poky/meta/conf/distro/include/default-versions.inc /tool/yocto/poky/meta/classes/staging.bbclass /tool/yocto/poky/meta/classes/logging.bbclass /tool/yocto/poky/meta/classes/module_strip.bbclass /tool/yocto/poky/meta/conf/bitbake.conf /tool/yocto/poky/meta/conf/sanity.conf /tool/yocto/poky/meta/classes/buildstats.bbclass /tool/yocto/poky/meta/classes/package.bbclass /tool/yocto/poky/meta/classes/terminal.bbclass /tool/yocto/poky/build/conf/local.conf /tool/yocto/poky/meta/classes/package_rpm.bbclass /tool/yocto/poky/build/conf/bblayers.conf /tool/yocto/poky/meta/conf/distro/include/tclibc-eglibc.inc /tool/yocto/poky/meta/classes/license.bbclass /tool/yocto/poky/meta/classes/sstate.bbclass /tool/yocto/meta-xilinx/classes/xilinx-utils.bbclass /tool/yocto/poky/meta-yocto/conf/layer.conf /tool/yocto/poky/meta/classes/linux-kernel-base.bbclass /tool/yocto/poky/meta/classes/kernel.bbclass /tool/yocto/poky/meta/classes/prserv.bbclass /tool/yocto/poky/meta/classes/image-prelink.bbclass /tool/yocto/meta-xilinx/classes/xilinx-kernel.bbclass /tool/yocto/meta-xilinx/conf/layer.conf /tool/yocto/poky/meta/conf/distro/include/tcmode-default.inc /tool/yocto/poky/meta/classes/cml1.bbclass /tool/yocto/poky/meta/classes/base.bbclass /tool/yocto/poky/meta/conf/distro/include/default-distrovars.inc /tool/yocto/poky/meta/conf/machine/include/powerpc/arch-powerpc.inc /tool/yocto/poky/meta/classes/packagedata.bbclass /tool/yocto/poky/meta/classes/deploy.bbclass /tool/yocto/poky/meta/conf/distro/include/default-providers.inc /tool/yocto/poky/meta/conf/distro/defaultsetup.conf /tool/yocto/poky/meta/classes/sanity.bbclass /tool/yocto/meta-xilinx/conf/machine/virtex5.conf /tool/yocto/poky/meta/classes/metadata_scm.bbclass"
# SDK_NAME=${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}
SDK_NAME="poky-eglibc-x86_64-powerpc"
# BB_HASHCONFIG_WHITELIST=${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD
BB_HASHCONFIG_WHITELIST="TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD"
# TMPDIR=/tool/yocto/poky/build/tmp
TMPDIR="/tool/yocto/poky/build/tmp"
# HOST_CC_ARCH=${TARGET_CC_ARCH}
HOST_CC_ARCH="-m32 -msoft-float -mcpu=440"
# ALLOW_EMPTY_linux-xilinx-dev=1
ALLOW_EMPTY_linux-xilinx-dev="1"
# CMDLINE_CONSOLE=console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}
export CMDLINE_CONSOLE="console=ttyS0"
# HOST_LD_KERNEL_ARCH=${TARGET_LD_KERNEL_ARCH}
# QEMU_OPTIONS_iwmmxt=-cpu pxa270-c5
QEMU_OPTIONS_iwmmxt="-cpu pxa270-c5"
# TUNE_PKGARCH_tune-powerpc=powerpc
TUNE_PKGARCH_tune-powerpc="powerpc"
# libexecdir=${exec_prefix}/libexec
export libexecdir="/usr/libexec"
# UBOOT_MACHINE=ml507_config
UBOOT_MACHINE="ml507_config"
# BB_BASEHASH_task-do_cleansstate=f63482664cc1b8cf3e9c7d4c5f4259d6
BB_BASEHASH_task-do_cleansstate="f63482664cc1b8cf3e9c7d4c5f4259d6"
# IMAGE_ROOTFS_SIZE=65536
IMAGE_ROOTFS_SIZE="65536"
# BB_MIN_VERSION=1.15.1
BB_MIN_VERSION="1.15.1"
# datadir_native=${prefix_native}/share
datadir_native="/usr/share"
# SDK_OS=${BUILD_OS}
SDK_OS="linux"
# GIT_CONFIG=${GIT_CONFIG_PATH}/gitconfig
GIT_CONFIG="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc/gitconfig"
# OE_TERMINAL_EXPORTS=XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES
OE_TERMINAL_EXPORTS="XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR HOST_EXTRACFLAGS HOSTLDFLAGS HOST_LOADLIBES"
# datadir=${prefix}/share
export datadir="/usr/share"
# KERNEL_CONSOLE=ttyS0
KERNEL_CONSOLE="ttyS0"
# STAGING_ETCDIR_NATIVE=${STAGING_DIR_NATIVE}${sysconfdir_native}
STAGING_ETCDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc"
# KERNEL_LD=${HOST_PREFIX}ld${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}
KERNEL_LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# HOST_EXEEXT=
# PREFERRED_VERSION_eglibc-nativesdk=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-nativesdk="2.15"
# FILES_kernel-vmlinux=/boot/vmlinux*
FILES_kernel-vmlinux="/boot/vmlinux*"
# SUMMARY=${PN} version ${PV}-${PR}
SUMMARY="linux-xilinx version 3.3.0-r0"
# BB_BASEHASH_task-do_buildall=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_buildall="fdc376fd264c2fc126ec182f0a53ca8a"
# GPEPHONE_MIRROR=http://gpephone.linuxtogo.org/download/gpephone
GPEPHONE_MIRROR="http://gpephone.linuxtogo.org/download/gpephone"
# GPEPHONE_SVN=svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=${PN}
GPEPHONE_SVN="svn://projects.linuxtogo.org/svn/gpephone/trunk/source;module=linux-xilinx"
# BB_BASEHASH_task-do_cleanall=3ff415d56d194d5bcce15077948400a7
BB_BASEHASH_task-do_cleanall="3ff415d56d194d5bcce15077948400a7"
# ASSUME_PROVIDED=bzip2-native grep-native diffstat-native patch-native perl-native-runtime python-native-runtime subversion-native tar-native virtual/libintl-native
ASSUME_PROVIDED="bzip2-native grep-native diffstat-native patch-native perl-native-runtime python-native-runtime subversion-native tar-native virtual/libintl-native"
# LICSSTATEDIR=${WORKDIR}/license-destdir/
LICSSTATEDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/license-destdir/"
# ALL_MULTILIB_PACKAGE_ARCHS=${@all_multilib_tune_values(d, 'PACKAGE_ARCHS')}
ALL_MULTILIB_PACKAGE_ARCHS="all any noarch powerpc-nf ppc440 virtex5"
# BUILD_CXX=${CCACHE}${BUILD_PREFIX}g++ ${BUILD_CC_ARCH}
export BUILD_CXX="g++"
# CPU_FEATURES=
# UPDATECOMMAND_cvs=/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}
UPDATECOMMAND_cvs="/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
# IMAGE_ROOTFS=${WORKDIR}/rootfs
IMAGE_ROOTFS="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs"
# MKTEMPCMD=mktemp -q ${TMPBASE}
MKTEMPCMD="mktemp -q ${TMPBASE}"
# DATE=20120623
DATE="20120623"
# APACHE_MIRROR=http://www.apache.org/dist
APACHE_MIRROR="http://www.apache.org/dist"
# do_rootfs=None
# LD=${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}
export LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# HOST_VENDOR=${TARGET_VENDOR}
HOST_VENDOR="-poky"
# ARCH=${@map_kernel_arch(d.getVar('TARGET_ARCH', True), d)}
export ARCH="powerpc"
# PREFERRED_PROVIDER_gdk-pixbuf=gdk-pixbuf
PREFERRED_PROVIDER_gdk-pixbuf="gdk-pixbuf"
# SSTATE_MANFILEBASE=${SSTATE_MANIFESTS}/manifest-${SSTATE_MANMACH}-
SSTATE_MANFILEBASE="/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-"
# MACHINE_TASK_PROVIDER=${DEFAULT_TASK_PROVIDER}
MACHINE_TASK_PROVIDER="task-base"
# EXTRA_OEMAKE=
# HOSTLDFLAGS=${BUILD_LDFLAGS}
HOSTLDFLAGS="-L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
# LDFLAGS=${TARGET_LDFLAGS}
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
# HOST_NONSYSV=None
# bindir=${exec_prefix}/bin
export bindir="/usr/bin"
# SUMMARY_${PN}-dbg=None
# BUILDSTATS_BASE=${TMPDIR}/buildstats/
BUILDSTATS_BASE="/tool/yocto/poky/build/tmp/buildstats/"
# SYSVINIT_ENABLED_GETTYS=None
# TARGET_CXXFLAGS=${TARGET_CFLAGS} -fpermissive
export TARGET_CXXFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -fpermissive"
# BUILD_ARCH=${@os.uname()[4]}
BUILD_ARCH="x86_64"
# module_autoload_ipsec=ipsec
module_autoload_ipsec="ipsec"
# MAKE=make
export MAKE="make"
# KERNEL_CCSUFFIX=
# includedir=${exec_prefix}/include
export includedir="/usr/include"
# PREFERRED_VERSION_gcc=${GCCVERSION}
PREFERRED_VERSION_gcc="4.7%"
# BBFILE_PRIORITY_openembedded-layer=6
BBFILE_PRIORITY_openembedded-layer="6"
# RDEPENDS_kernel=kernel-base
RDEPENDS_kernel="kernel-base"
# FILES_${PN}-doc=None
# PRIORITY=optional
PRIORITY="optional"
# PARALLEL_MAKEINST=${PARALLEL_MAKE}
PARALLEL_MAKEINST="-j 6"
# SEPPUKU_QUERY=None
# BB_SETSCENE_VERIFY_FUNCTION=sysroot_checkhashes
BB_SETSCENE_VERIFY_FUNCTION="sysroot_checkhashes"
# SECTION=kernel
SECTION="kernel"
# SDK_CC_ARCH=${BUILD_CC_ARCH}
# MAINTAINER=Poky <poky@yoctoproject.org>
MAINTAINER="Poky <poky@yoctoproject.org>"
# do_package_write_ipk=None
# LIBCOVERRIDE=:libc-glibc
LIBCOVERRIDE=":libc-glibc"
# BUILD_LDFLAGS=-L${STAGING_LIBDIR_NATIVE} -L${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-O1
export BUILD_LDFLAGS="-L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
# STAGING_LIBDIR=${STAGING_DIR_HOST}${libdir}
STAGING_LIBDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib"
# TARGET_ARCH=${TUNE_ARCH}
unset TARGET_ARCH
# BBINCLUDELOGS_LINES=None
# BUILD_F77=${CCACHE}${BUILD_PREFIX}g77 ${BUILD_CC_ARCH}
export BUILD_F77="g77"
# module_conf_rfcomm=alias bt-proto-3 rfcomm
module_conf_rfcomm="alias bt-proto-3 rfcomm"
# LIBCEXTENSION=${@['', '-gnu'][(d.getVar('ABIEXTENSION', True) or '') != '']}
# ALLOW_EMPTY_${PN}-dbg=None
# QUILTRCFILE=${STAGING_ETCDIR_NATIVE}/quiltrc
QUILTRCFILE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc/quiltrc"
# BBLAYERS= /tool/yocto/poky/meta /tool/yocto/poky/meta-yocto /tool/yocto/meta-openembedded/meta-oe /tool/yocto/meta-xilinx
BBLAYERS="/tool/yocto/poky/meta /tool/yocto/poky/meta-yocto /tool/yocto/meta-openembedded/meta-oe /tool/yocto/meta-xilinx"
# BOOTSTRAP_EXTRA_RDEPENDS=
# PREFERRED_VERSION_linux-libc-headers-nativesdk=${LINUXLIBCVERSION}
PREFERRED_VERSION_linux-libc-headers-nativesdk="3.4"
# BUILD_LD=${BUILD_PREFIX}ld ${BUILD_LD_ARCH}
export BUILD_LD="ld"
# BUILD_SYS=${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}
BUILD_SYS="x86_64-linux"
# PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-for-gcc-nativesdk=None
# module_conf_hci_uart=alias tty-ldisc-15 hci_uart
module_conf_hci_uart="alias tty-ldisc-15 hci_uart"
# QADEPENDS_virtclass-native=
# PREFERRED_PROVIDER_opkg-native=opkg-native
PREFERRED_PROVIDER_opkg-native="opkg-native"
# BB_BASEHASH_task-do_unpack=8c60b94fc30a2c885b22cc462347523a
BB_BASEHASH_task-do_unpack="8c60b94fc30a2c885b22cc462347523a"
# MACHINE_ESSENTIAL_EXTRA_RDEPENDS=
# PATCHDEPENDENCY=${PATCHTOOL}-native:do_populate_sysroot
PATCHDEPENDENCY="quilt-native:do_populate_sysroot"
# EXTRAOPKGCONFIG=poky-feed-config-opkg
EXTRAOPKGCONFIG="poky-feed-config-opkg"
# KERNEL_IMAGE_BASE_NAME=${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}
KERNEL_IMAGE_BASE_NAME="uImage-3.3.0-r0-virtex5-20120623074715"
# OEINCLUDELOGS=yes
OEINCLUDELOGS="yes"
# TUNEABI=None
# module_autoload_ircomm-tty=ircomm-tty
module_autoload_ircomm-tty="ircomm-tty"
# PREFERRED_PROVIDER_virtual/gettext=gettext
PREFERRED_PROVIDER_virtual/gettext="gettext"
# GPE_EXTRA_SVN=svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=${PN}
GPE_EXTRA_SVN="svn://projects.linuxtogo.org/svn/gpe/trunk/extra;module=linux-xilinx"
# oldincludedir=${exec_prefix}/include
export oldincludedir="/usr/include"
# TUNEVALID=None
# TUNECONFLICTS=None
# SERIAL_CONSOLE=115200 ttyUL0
SERIAL_CONSOLE="115200 ttyUL0"
# TIME=074715
TIME="074715"
# localstatedir_nativesdk=/var
localstatedir_nativesdk="/var"
# UPDATECOMMAND_svn=/usr/bin/env svn update ${SVNCOOPTS}
UPDATECOMMAND_svn="/usr/bin/env svn update ${SVNCOOPTS}"
# RRECOMMENDS_${PN}-dbg=None
# SEPPUKU_USER=None
# FEED_DEPLOYDIR_BASE_URI=None
# module_autoload_ipv6=ipv6
module_autoload_ipv6="ipv6"
# LIMIT_BUILT_LOCALES=POSIX en_US en_GB
LIMIT_BUILT_LOCALES="POSIX en_US en_GB"
# DESCRIPTION_${PN}-dbg=None
# EXTENDPRAUTO=${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO',1) is None]}
# LANG=en_US.UTF-8
LANG="en_US.UTF-8"
# TUNE_FEATURES_tune-powerpc-nf=m32 fpu-soft
TUNE_FEATURES_tune-powerpc-nf="m32 fpu-soft"
# BUILD_CCLD=${BUILD_PREFIX}gcc ${BUILD_CC_ARCH}
export BUILD_CCLD="gcc"
# SUMMARY_linux-xilinx-dev=${SUMMARY} - Development files
SUMMARY_linux-xilinx-dev="linux-xilinx version 3.3.0-r0 - Development files"
# DEBUG_FLAGS=-g -feliminate-unused-debug-types
DEBUG_FLAGS="-g -feliminate-unused-debug-types"
# B=${S}
B="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git"
# GROUP_fetcher=None
# SDK_NAME_PREFIX=oecore
SDK_NAME_PREFIX="oecore"
# BBPATH=/tool/yocto/poky/meta-yocto::/tool/yocto/poky/meta:/tool/yocto/meta-openembedded/meta-oe:/tool/yocto/meta-xilinx
BBPATH="/tool/yocto/poky/meta-yocto::/tool/yocto/poky/meta:/tool/yocto/meta-openembedded/meta-oe:/tool/yocto/meta-xilinx"
# RDEPENDS_${PN}-staticdev=None
# RPMCONF_HOST_BASE=${DEPLOY_DIR_RPM}/solvedb-sdk
RPMCONF_HOST_BASE="/tool/yocto/poky/build/tmp/deploy/rpm/solvedb-sdk"
# HOST_LD_ARCH=${TARGET_LD_ARCH}
# GROUP_dependencies=None
# BB_BASEHASH_task-do_populate_lic=d7189a1ecb6f83fc3182dcc0cdc435ed
BB_BASEHASH_task-do_populate_lic="d7189a1ecb6f83fc3182dcc0cdc435ed"
# BB_STRICT_CHECKSUM=1
BB_STRICT_CHECKSUM="1"
# PREMIRRORS=bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n
PREMIRRORS="bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
# BASE_LIB_tune-powerpc-nf=lib
BASE_LIB_tune-powerpc-nf="lib"
# RDEPENDS=
# PACKAGES=kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc kernel-devicetree
PACKAGES="kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc kernel-devicetree"
# EXCLUDE_FROM_WORLD_pn-clutter-box2d=1
EXCLUDE_FROM_WORLD_pn-clutter-box2d="1"
# TUNE_PKGARCH_tune-ppc440=ppc440
TUNE_PKGARCH_tune-ppc440="ppc440"
# BUILD_CPP=${BUILD_PREFIX}cpp ${BUILD_CC_ARCH}
export BUILD_CPP="cpp"
# HOMEPAGE=unknown
HOMEPAGE="unknown"
# SANITY_VERSION=1
SANITY_VERSION="1"
# DEPLOY_DIR_TOOLS=${DEPLOY_DIR}/tools
DEPLOY_DIR_TOOLS="/tool/yocto/poky/build/tmp/deploy/tools"
# LIC_FILES_CHKSUM=file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7
LIC_FILES_CHKSUM="file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
# LINKER_HASH_STYLE_mips=sysv
LINKER_HASH_STYLE_mips="sysv"
# ASNEEDED_pn-rpm=
# PKGWRITEDIRRPM=${WORKDIR}/deploy-rpms
PKGWRITEDIRRPM="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-rpms"
# STAGING_DATADIR_NATIVE=${STAGING_DIR_NATIVE}${datadir_native}
STAGING_DATADIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share"
# CPU_FEATURES_arm=vfp
CPU_FEATURES_arm="vfp"
# RESUMECOMMAND_wget=/usr/bin/env wget -c -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'
RESUMECOMMAND_wget="/usr/bin/env wget -c -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /tool/yocto/poky/build/downloads '${URI}'"
# TRANSLATED_TARGET_ARCH=${@d.getVar('TARGET_ARCH', True).replace("_", "-")}
TRANSLATED_TARGET_ARCH="powerpc"
# GPE_MIRROR=http://gpe.linuxtogo.org/download/source
GPE_MIRROR="http://gpe.linuxtogo.org/download/source"
# SRCREV_pn-linux-xilinx=None
# prefix_nativesdk=/usr
prefix_nativesdk="/usr"
# SSTATE_SCAN_CMD=find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f
SSTATE_SCAN_CMD="find ${SSTATE_BUILDDIR} \( -name \"*.la\" -o -name \"*-config\" -o -name \"*_config\" \) -type f"
# HANDHELDS_CVS=cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs
HANDHELDS_CVS="cvs://anoncvs:anoncvs@anoncvs.handhelds.org/cvs"
# STAGING_BASE_LIBDIR_NATIVE=${STAGING_DIR_NATIVE}${base_libdir_native}
STAGING_BASE_LIBDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib"
# HOST_CC_KERNEL_ARCH=${TARGET_CC_KERNEL_ARCH}
# SSTATE_MANFILEPREFIX=${SSTATE_MANFILEBASE}${PN}
SSTATE_MANFILEPREFIX="/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-linux-xilinx"
# BOOTSTRAP_EXTRA_RRECOMMENDS=
# PREFERRED_VERSION_binutils-cross-canadian-powerpc=${BINUVERSION}
PREFERRED_VERSION_binutils-cross-canadian-powerpc="2.22"
# PREFERRED_VERSION_gzip-native=1.4
PREFERRED_VERSION_gzip-native="1.4"
# BB_BASEHASH_task-do_sizecheck=f6062040b95ca2a9c00e9fb8a7348a26
BB_BASEHASH_task-do_sizecheck="f6062040b95ca2a9c00e9fb8a7348a26"
# TOPDIR=/tool/yocto/poky/build
TOPDIR="/tool/yocto/poky/build"
# valid_archs=alpha cris ia64 i386 x86 m68knommu m68k ppc powerpc powerpc64 ppc64 sparc sparc64 arm arm26 m32r mips sh sh64 um h8300 parisc s390 v850 avr32 blackfin microblaze
valid_archs="alpha cris ia64 i386 x86 m68knommu m68k ppc powerpc powerpc64 ppc64 sparc sparc64 arm arm26 m32r mips sh sh64 um h8300 parisc s390 v850 avr32 blackfin microblaze"
# STAGING_BINDIR=${STAGING_DIR_HOST}${bindir}
STAGING_BINDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin"
# ALLOWED_FLAGS=-O -mcpu -march -pipe
ALLOWED_FLAGS="-O -mcpu -march -pipe"
# PREFERRED_PROVIDER_dbus-glib-native=dbus-glib-native
PREFERRED_PROVIDER_dbus-glib-native="dbus-glib-native"
# module_autoload_sa1100-rtc=sa1100-rtc
module_autoload_sa1100-rtc="sa1100-rtc"
# SUMMARY_${PN}-dev=None
# DEPLOYDIR=${WORKDIR}/deploy-${PN}
DEPLOYDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx"
# TUNEABI_OVERRIDE=None
# FILE_DIRNAME=${@os.path.dirname(d.getVar('FILE'))}
FILE_DIRNAME="/tool/yocto/meta-xilinx/recipes-kernel/linux"
# SOURCEFORGE_MIRROR=http://downloads.sourceforge.net
SOURCEFORGE_MIRROR="http://downloads.sourceforge.net"
# DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-jDSKXc3TDe,guid=cb2f323eeab607aa04a9cd2f00000066
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-jDSKXc3TDe,guid=cb2f323eeab607aa04a9cd2f00000066"
# DEFAULTTUNE=ppc440
DEFAULTTUNE="ppc440"
# GLIBC_EXTRA_OECONF= ${@bb.utils.contains("TUNE_FEATURES", "ppc440", "-with-cpu=440", "", d)}
GLIBC_EXTRA_OECONF="-with-cpu=440"
# STAGING_EXECPREFIXDIR=${STAGING_DIR_HOST}${exec_prefix}
STAGING_EXECPREFIXDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial=None
# BUILD_CFLAGS=${BUILD_CPPFLAGS} ${BUILD_OPTIMIZATION}
export BUILD_CFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-for-gcc=${TCLIBC}
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-for-gcc="eglibc"
# PSEUDO_LOCALSTATEDIR=${WORKDIR}/pseudo/
PSEUDO_LOCALSTATEDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pseudo/"
# EGLIBCVERSION=2.15
EGLIBCVERSION="2.15"
# OLDEST_KERNEL=2.6.16
OLDEST_KERNEL="2.6.16"
# PREFERRED_VERSION_python-native=2.7.3
PREFERRED_VERSION_python-native="2.7.3"
# SECTION_${PN}-doc=None
# XAUTHORITY=/home/elvis/.Xauthority
XAUTHORITY="/home/elvis/.Xauthority"
# AUTHOR=None
# BUILDSDK_LDFLAGS=-L${STAGING_LIBDIR} -Wl,-rpath-link,${STAGING_LIBDIR} -Wl,-rpath,${libdir} -Wl,-O1 -L${STAGING_DIR_HOST}${base_libdir} -Wl,-rpath-link,${STAGING_DIR_HOST}${base_libdir} -Wl,-rpath,${base_libdir} -Wl,-O1
BUILDSDK_LDFLAGS="-L/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib -Wl,-rpath,/usr/lib -Wl,-O1 -L/tool/yocto/poky/build/tmp/sysroots/virtex5/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/virtex5/lib -Wl,-rpath,/lib -Wl,-O1"
# FETCHCMD_wget=/usr/bin/env wget -t 2 -T 30 -nv --no-check-certificate
FETCHCMD_wget="/usr/bin/env wget -t 2 -T 30 -nv --no-check-certificate"
# GPG_AGENT_INFO=/tmp/keyring-MhCyXy/gpg:0:1
GPG_AGENT_INFO="/tmp/keyring-MhCyXy/gpg:0:1"
# POKY_DEFAULT_EXTRA_RDEPENDS=task-core-boot
POKY_DEFAULT_EXTRA_RDEPENDS="task-core-boot"
# CLASSOVERRIDE=class-target
CLASSOVERRIDE="class-target"
# SOLIBSDEV=.so
SOLIBSDEV=".so"
# FILES_${PN}-dev=None
# SEPPUKU_PRODUCT=None
# SHELL=/bin/bash
export SHELL="/bin/bash"
# USER_CLASSES=buildstats image-mklibs image-prelink
USER_CLASSES="buildstats image-mklibs image-prelink"
# MKTEMPDIRCMD=mktemp -d -q ${TMPBASE}
MKTEMPDIRCMD="mktemp -d -q ${TMPBASE}"
# BB_HASHCHECK_FUNCTION=sstate_checkhashes
BB_HASHCHECK_FUNCTION="sstate_checkhashes"
# SEPPUKU_LOGIN=None
# EXCLUDE_FROM_WORLD_pn-eds-tools=1
EXCLUDE_FROM_WORLD_pn-eds-tools="1"
# BB_BASEHASH_task-do_package_write_rpm=ae82ad7cff637a08e19a3617a11982f1
BB_BASEHASH_task-do_package_write_rpm="ae82ad7cff637a08e19a3617a11982f1"
# SOLIBS=.so.*
SOLIBS=".so.*"
# PROVIDES=${P} ${PF} ${PN} virtual/kernel
PROVIDES="linux-xilinx-3.3.0 linux-xilinx-3.3.0-r0 linux-xilinx virtual/kernel"
# PYTHON_BASEVERSION=2.7
PYTHON_BASEVERSION="2.7"
# PACKAGE_PREPROCESS_FUNCS= kernel_package_preprocess
PACKAGE_PREPROCESS_FUNCS="kernel_package_preprocess"
# do_package_write_tar=None
# docdir=${datadir}/doc
export docdir="/usr/share/doc"
# DISTRO_FEATURES=alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ${DISTRO_FEATURES_LIBC} largefile opengl${@oe.utils.distro_features_backfill(d)}
DISTRO_FEATURES="alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io largefile opengl pulseaudio"
# BB_BASEHASH_task-do_uboot_mkimage=aebf065abf71177df3e3627ec8e09d31
BB_BASEHASH_task-do_uboot_mkimage="aebf065abf71177df3e3627ec8e09d31"
# RESUMECOMMAND=ERROR, this must be a BitBake bug
RESUMECOMMAND="ERROR, this must be a BitBake bug"
# TARGET_CPU=440
TARGET_CPU="440"
# infodir=${datadir}/info
export infodir="/usr/share/info"
# BUILDCFG_HEADER=Build Configuration:
BUILDCFG_HEADER="Build Configuration:"
# DISTROOVERRIDES=${@d.getVar('DISTRO', True) or ''}
DISTROOVERRIDES="poky"
# COMMERCIAL_QT=
# base_prefix=
# KERNEL_RELEASE=${KERNEL_VERSION}
KERNEL_RELEASE="3.3.0-14.2-build1"
# CC=${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export CC="powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# THISDIR=${@os.path.dirname(d.getVar('FILE', True))}
THISDIR="/tool/yocto/meta-xilinx/recipes-kernel/linux"
# HGDIR=${CO_DIR}/hg
HGDIR="/tool/yocto/poky/build/downloads/hg"
# KERNEL_DEVICETREE_microblazeel=${@device_tree(bb.data.getVar('TARGET_CPU', d, 1), d)}
KERNEL_DEVICETREE_microblazeel="arch/440/boot/dts/system.dts"
# PREFERRED_VERSION_gcc-cross=${GCCVERSION}
PREFERRED_VERSION_gcc-cross="4.7%"
# BUILD_OS=${@os.uname()[0].lower()}
BUILD_OS="linux"
# IMAGE_FSTYPES=tar.gz
IMAGE_FSTYPES="tar.gz"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-binutils=binutils-cross
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-binutils="binutils-cross"
# FAKEROOTENV=PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0
FAKEROOTENV="PSEUDO_PREFIX=/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr PSEUDO_LOCALSTATEDIR=/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pseudo/ PSEUDO_PASSWD=/tool/yocto/poky/build/tmp/sysroots/virtex5 PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
# STAGING_LOADER_DIR=${STAGING_DIR_HOST}/loader
STAGING_LOADER_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/loader"
# SSTATE_PKG=${SSTATE_DIR}/${SSTATE_PKGNAME}
SSTATE_PKG="/tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}"
# DISTRO_EXTRA_RDEPENDS= ${POKY_DEFAULT_EXTRA_RDEPENDS}
DISTRO_EXTRA_RDEPENDS="task-core-boot"
# ASNEEDED_pn-dialer=
# BBFILE_PATTERN_xilinx=^/tool/yocto/meta-xilinx/
BBFILE_PATTERN_xilinx="^/tool/yocto/meta-xilinx/"
# ASNEEDED_pn-console-tools=
# ASNEEDED_pn-pulseaudio=
# ASNEEDED_pn-distcc=
# HOST_OS=${TARGET_OS}
HOST_OS="linux"
# D=${WORKDIR}/image
D="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image"
# TERM=xterm
export TERM="xterm"
# LAYER_CONF_VERSION=4
LAYER_CONF_VERSION="4"
# MULTIMACH_HOST_SYS=${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}
MULTIMACH_HOST_SYS="virtex5-poky-linux"
# TARGET_FPU=${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}
TARGET_FPU="soft"
# STAGING_DIR_NATIVE=${STAGING_DIR}/${BUILD_SYS}
STAGING_DIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux"
# GNU_MIRROR=ftp://ftp.gnu.org/gnu
GNU_MIRROR="ftp://ftp.gnu.org/gnu"
# DEPLOY_DIR=${TMPDIR}/deploy
DEPLOY_DIR="/tool/yocto/poky/build/tmp/deploy"
# DESCRIPTION_${PN}-staticdev=None
# ROOTFS_POSTINSTALL_COMMAND= license_create_manifest;
ROOTFS_POSTINSTALL_COMMAND="license_create_manifest;"
# MACHINE_EXTRA_RDEPENDS=
# MULTI_PROVIDER_WHITELIST=virtual/libintl virtual/libintl-native virtual/libintl-nativesdk virtual/xserver virtual/update-alternatives-native virtual/update-alternatives
MULTI_PROVIDER_WHITELIST="virtual/libintl virtual/libintl-native virtual/libintl-nativesdk virtual/xserver virtual/update-alternatives-native virtual/update-alternatives"
# KERNEL_OUTPUT=arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
KERNEL_OUTPUT="arch/powerpc/boot/uImage"
# SECTION_${PN}-staticdev=None
# ASNEEDED_pn-puzzles=
# SIGGEN_EXCLUDERECIPES_ABISAFE= sysvinit-inittab shadow-securetty opkg-config-base netbase formfactor xserver-xf86-config pointercal base-files keymaps pointercal-xinput systemd-serialgetty mplayer-common task-x11-server fbset-modes
SIGGEN_EXCLUDERECIPES_ABISAFE="sysvinit-inittab shadow-securetty opkg-config-base netbase formfactor xserver-xf86-config pointercal base-files keymaps pointercal-xinput systemd-serialgetty mplayer-common task-x11-server fbset-modes"
# STAMP=${TMPDIR}/stamps/${MULTIMACH_TARGET_SYS}/${PF}
STAMP="/tool/yocto/poky/build/tmp/stamps/virtex5-poky-linux/linux-xilinx-3.3.0-r0"
# BBINCLUDELOGS=yes
BBINCLUDELOGS="yes"
# PREFERRED_PROVIDER_virtual/libintl=eglibc
PREFERRED_PROVIDER_virtual/libintl="eglibc"
# QA_LOGFILE=${TMPDIR}/qa.log
QA_LOGFILE="/tool/yocto/poky/build/tmp/qa.log"
# BUILDCFG_NEEDEDVARS=TARGET_ARCH TARGET_OS
BUILDCFG_NEEDEDVARS="TARGET_ARCH TARGET_OS"
# GCCVERSION=4.7%
GCCVERSION="4.7%"
# BASELIB_powerpc64=lib64
BASELIB_powerpc64="lib64"
# ERROR_QA=dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags
ERROR_QA="dev-so debug-deps dev-deps debug-files arch la2 pkgconfig la perms useless-rpaths rpaths staticdev ldflags"
# PREFERRED_PROVIDER_virtual/libgl=mesa-dri
PREFERRED_PROVIDER_virtual/libgl="mesa-dri"
# FILES_${PN}-staticdev=None
# CPPFLAGS=${TARGET_CPPFLAGS}
# QEMUIMAGETESTS=/tool/yocto/poky/scripts/qemuimage-tests
QEMUIMAGETESTS="/tool/yocto/poky/scripts/qemuimage-tests"
# VIRTUAL-RUNTIME_update-alternatives=update-alternatives-cworth
VIRTUAL-RUNTIME_update-alternatives="update-alternatives-cworth"
# SSTATE_MANMACH=virtex5
SSTATE_MANMACH="virtex5"
# PKGDATA_DIR=${TMPDIR}/pkgdata/${MULTIMACH_TARGET_SYS}
PKGDATA_DIR="/tool/yocto/poky/build/tmp/pkgdata/virtex5-poky-linux"
# sysconfdir_native=/etc
sysconfdir_native="/etc"
# XLIBS_MIRROR=http://xlibs.freedesktop.org/release
XLIBS_MIRROR="http://xlibs.freedesktop.org/release"
# SDK_ARCH=${BUILD_ARCH}
SDK_ARCH="x86_64"
# PREFERRED_PROVIDER_virtual/update-alternatives-native=opkg-native
PREFERRED_PROVIDER_virtual/update-alternatives-native="opkg-native"
# COREBASE=/tool/yocto/poky
COREBASE="/tool/yocto/poky"
# KERNEL_DEVICETREE=${@device_tree(bb.data.getVar('TARGET_ARCH', d, 1), d)}
KERNEL_DEVICETREE="arch/powerpc/boot/dts/virtex440-ml507.dts"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-intermediate=gcc-cross-intermediate
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-intermediate="gcc-cross-intermediate"
# DEPCHAIN_POST=-dev -dbg
DEPCHAIN_POST="-dev -dbg"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc=gcc-cross
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc="gcc-cross"
# KERNEL_VERSION=${@get_kernelversion('${B}')}
KERNEL_VERSION="3.3.0-14.2-build1"
# SSTATE_DIR=${TOPDIR}/sstate-cache
SSTATE_DIR="/tool/yocto/poky/build/sstate-cache"
# MACHINE_FEATURES=kernel26 apm ext2 vfat ethernet screen
MACHINE_FEATURES="kernel26 apm ext2 vfat ethernet screen"
# FILES_linux-xilinx-locale=${datadir}/locale
FILES_linux-xilinx-locale="/usr/share/locale"
# TCMODE=default
TCMODE="default"
# COMMON_LICENSE_DIR=${COREBASE}/meta/files/common-licenses
COMMON_LICENSE_DIR="/tool/yocto/poky/meta/files/common-licenses"
# RANLIB=${HOST_PREFIX}ranlib
export RANLIB="powerpc-poky-linux-ranlib"
# LOCALE_SECTION=
# RPMBUILD=rpmbuild
RPMBUILD="rpmbuild"
# LIBC_LOCALE_DEPENDENCIES= eglibc-localedata-i18n eglibc-gconv-ibm850 eglibc-gconv-cp1252 eglibc-gconv-iso8859-1 eglibc-gconv-iso8859-15
LIBC_LOCALE_DEPENDENCIES="eglibc-localedata-i18n eglibc-gconv-ibm850 eglibc-gconv-cp1252 eglibc-gconv-iso8859-1 eglibc-gconv-iso8859-15"
# LICENSE_DIRECTORY=${DEPLOY_DIR}/licenses
LICENSE_DIRECTORY="/tool/yocto/poky/build/tmp/deploy/licenses"
# RDEPENDS_kernel-base=kernel-image
RDEPENDS_kernel-base="kernel-image"
# STAGING_DIR_HOST=${STAGING_DIR}/${MACHINE}
STAGING_DIR_HOST="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# BB_BASEHASH_task-do_patch=307bf19075622210fb506374604e1be4
BB_BASEHASH_task-do_patch="307bf19075622210fb506374604e1be4"
# base_sbindir=${base_prefix}/sbin
export base_sbindir="/sbin"
# CXX=${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export CXX="powerpc-poky-linux-g++ -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# RPM=rpm
RPM="rpm"
# ASNEEDED_pn-icu=
# PREFERRED_PROVIDER_matchbox-panel=matchbox-panel-2
PREFERRED_PROVIDER_matchbox-panel="matchbox-panel-2"
# systemd_unitdir=${base_libdir}/systemd
export systemd_unitdir="/lib/systemd"
# OS=${TARGET_OS}
export OS="linux"
# MACHINE_ARCH=${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}
MACHINE_ARCH="virtex5"
# IMAGE_OVERHEAD_FACTOR=1.3
IMAGE_OVERHEAD_FACTOR="1.3"
# BINUVERSION=2.22
BINUVERSION="2.22"
# KBRANCH=master
KBRANCH="master"
# SDK_VENDOR=-pokysdk
SDK_VENDOR="-pokysdk"
# SDKPATHNATIVE=${SDKPATH}/sysroots/${SDK_SYS}
SDKPATHNATIVE="/opt/poky/1.2+snapshot/sysroots/x86_64-pokysdk-linux"
# PREFERRED_VERSION_eglibc-initial-nativesdk=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-initial-nativesdk="2.15"
# PREFERRED_PROVIDER_virtual/libiconv=eglibc
PREFERRED_PROVIDER_virtual/libiconv="eglibc"
# BB_BASEHASH_task-do_install=b6e539e9ffcf5d209e6994dd9eea199b
BB_BASEHASH_task-do_install="b6e539e9ffcf5d209e6994dd9eea199b"
# PREFERRED_VERSION_binutils-crosssdk=${BINUVERSION}
PREFERRED_VERSION_binutils-crosssdk="2.22"
# UBOOT_LOADADDRESS=0x00000000
UBOOT_LOADADDRESS="0x00000000"
# SDK_VERSION=1.2+snapshot
SDK_VERSION="1.2+snapshot"
# BUILD_VENDOR=
# KERNELORG_MIRROR=http://kernel.org/pub
KERNELORG_MIRROR="http://kernel.org/pub"
# WARN_QA=unsafe-references-in-binaries unsafe-references-in-scripts
WARN_QA="unsafe-references-in-binaries unsafe-references-in-scripts"
# PREFERRED_VERSION_gcc-runtime-nativesdk=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-runtime-nativesdk="4.7%"
# CONF_VERSION=1
CONF_VERSION="1"
# ALLOW_EMPTY_kernel=1
ALLOW_EMPTY_kernel="1"
# ASNEEDED=-Wl,--as-needed
ASNEEDED="-Wl,--as-needed"
# PKG_CONFIG_PATH=${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig
export PKG_CONFIG_PATH="/tool/yocto/poky/build/tmp/sysroots/virtex5//usr/lib/pkgconfig:/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/share/pkgconfig"
# PREFERRED_PROVIDER_gdb=gdb
PREFERRED_PROVIDER_gdb="gdb"
# BUILD_AS_ARCH=
# FILES=
# TCLIBC=eglibc
TCLIBC="eglibc"
# COLORTERM=gnome-terminal
COLORTERM="gnome-terminal"
# HOST_AS_ARCH=${TARGET_AS_ARCH}
# RRECOMMENDS_linux-xilinx-dbg=${PN} (= ${EXTENDPKGV})
RRECOMMENDS_linux-xilinx-dbg="linux-xilinx (= 3.3.0-r0)"
# RPMCONF_TARGET_BASE=${DEPLOY_DIR_RPM}/solvedb
RPMCONF_TARGET_BASE="/tool/yocto/poky/build/tmp/deploy/rpm/solvedb"
# BUILD_NM=${BUILD_PREFIX}nm
export BUILD_NM="nm"
# TARGET_VENDOR=-poky
TARGET_VENDOR="-poky"
# SANITY_TESTED_DISTROS= Yocto (Built by Poky 7.0) 1.2 \n Ubuntu 10.04.4 LTS \n Ubuntu 11.10 \n Ubuntu 12.04 LTS \n Fedora release 15 (Lovelock) \n Fedora release 16 (Verne) \n Fedora release 17 (Beefy Miracle) \n CentOS release 5.6 (Final) \n CentOS release 5.7 (Final) \n CentOS release 6.2 (Final) \n Debian GNU/Linux 6.0.4 (squeeze) \n openSUSE 11.4 \n openSUSE 12.1 \n
SANITY_TESTED_DISTROS="Yocto (Built by Poky 7.0) 1.2 \n Ubuntu 10.04.4 LTS \n Ubuntu 11.10 \n Ubuntu 12.04 LTS \n Fedora release 15 (Lovelock) \n Fedora release 16 (Verne) \n Fedora release 17 (Beefy Miracle) \n CentOS release 5.6 (Final) \n CentOS release 5.7 (Final) \n CentOS release 6.2 (Final) \n Debian GNU/Linux 6.0.4 (squeeze) \n openSUSE 11.4 \n openSUSE 12.1 \n"
# STAGING_BASELIBDIR=${STAGING_DIR_HOST}${base_libdir}
STAGING_BASELIBDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/lib"
# SUMMARY_linux-xilinx-staticdev=${SUMMARY} - Development files (Static Libraries)
SUMMARY_linux-xilinx-staticdev="linux-xilinx version 3.3.0-r0 - Development files (Static Libraries)"
# TUNE_FEATURES=${TUNE_FEATURES_tune-${DEFAULTTUNE}}
TUNE_FEATURES="m32 fpu-soft ppc440"
# POKYQEMUDEPS=${@base_contains("INCOMPATIBLE_LICENSE", "GPLv3", "", "qemu-config",d)}
POKYQEMUDEPS="qemu-config"
# POKY_DEFAULT_EXTRA_RRECOMMENDS=kernel-module-af-packet
POKY_DEFAULT_EXTRA_RRECOMMENDS="kernel-module-af-packet"
# PREFERRED_VERSION_gcc-crosssdk=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-crosssdk="4.7%"
# SOLIBSDEV_darwin=.dylib
SOLIBSDEV_darwin=".dylib"
# TUNE_PKGARCH=${TUNE_PKGARCH_tune-${DEFAULTTUNE}}
TUNE_PKGARCH="ppc440"
# FETCHCOMMAND_wget=/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'
FETCHCOMMAND_wget="/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P /tool/yocto/poky/build/downloads '${URI}'"
# PRINC=0
PRINC="0"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs=None
# TUNE_CCARGS= ${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)} ${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "", d)} ${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)} ${@bb.utils.contains("TUNE_FEATURES", "ppc440", "-mcpu=440", "", d)}
TUNE_CCARGS="-m32 -msoft-float -mcpu=440"
# module_conf_sco=alias bt-proto-2 sco
module_conf_sco="alias bt-proto-2 sco"
# IMAGE_LINK_NAME=${IMAGE_BASENAME}-${MACHINE}
IMAGE_LINK_NAME="linux-xilinx-virtex5"
# FETCHCMD_bzr=/usr/bin/env bzr
FETCHCMD_bzr="/usr/bin/env bzr"
# FILES_kernel-devicetree=/boot/devicetree*
FILES_kernel-devicetree="/boot/devicetree*"
# PREFERRED_PROVIDER_virtual/xserver-xf86=xserver-xorg
PREFERRED_PROVIDER_virtual/xserver-xf86="xserver-xorg"
# PKG_kernel-image=kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}
PKG_kernel-image="kernel-image-3.3.0-14.2-build1"
# BB_BASEHASH_task-do_deploy_setscene=129c9b0c76d09a14fa11cde93d07fd71
BB_BASEHASH_task-do_deploy_setscene="129c9b0c76d09a14fa11cde93d07fd71"
# QEMU_OPTIONS_armv7a=-cpu cortex-a8
QEMU_OPTIONS_armv7a="-cpu cortex-a8"
# SUMMARY_linux-xilinx-dbg=${SUMMARY} - Debugging files
SUMMARY_linux-xilinx-dbg="linux-xilinx version 3.3.0-r0 - Debugging files"
# MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS=
# PREFERRED_VERSION_eglibc=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc="2.15"
# PREFERRED_VERSION_gcc-cross-canadian-powerpc=${GCCVERSION}
PREFERRED_VERSION_gcc-cross-canadian-powerpc="4.7%"
# BB_BASEHASH_task-do_package=cc2d853fc6ecd45df98e0aa5abb80dbf
BB_BASEHASH_task-do_package="cc2d853fc6ecd45df98e0aa5abb80dbf"
# LOCALE_UTF8_ONLY=0
LOCALE_UTF8_ONLY="0"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-g++=gcc-cross
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-g++="gcc-cross"
# PREFERRED_PROVIDER_linux-libc-headers-nativesdk=linux-libc-headers-nativesdk
PREFERRED_PROVIDER_linux-libc-headers-nativesdk="linux-libc-headers-nativesdk"
# BB_BASEHASH_task-do_deploy=5937eb449d06c1447568dc43e5fa00c8
BB_BASEHASH_task-do_deploy="5937eb449d06c1447568dc43e5fa00c8"
# GNOME_MIRROR=http://ftp.gnome.org/pub/GNOME/sources
GNOME_MIRROR="http://ftp.gnome.org/pub/GNOME/sources"
# PREFERRED_VERSION_libgcc=${GCCVERSION}
PREFERRED_VERSION_libgcc="4.7%"
# SSTATE_PKGSPEC=sstate-${PN}-${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-
SSTATE_PKGSPEC="sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-"
# BB_BASEHASH_task-do_compile_kernelmodules=46adb5d9981936a7d500594b838e019c
BB_BASEHASH_task-do_compile_kernelmodules="46adb5d9981936a7d500594b838e019c"
# COMPATIBLE_HOST=None
# DEPLOY_DIR_IPK=${DEPLOY_DIR}/ipk
DEPLOY_DIR_IPK="/tool/yocto/poky/build/tmp/deploy/ipk"
# SSTATE_MANIFESTS=${TMPDIR}/sstate-control
SSTATE_MANIFESTS="/tool/yocto/poky/build/tmp/sstate-control"
# TUNE_PKGARCH_tune-powerpc-nf=powerpc-nf
TUNE_PKGARCH_tune-powerpc-nf="powerpc-nf"
# STAGING_FIRMWARE_DIR=${STAGING_DIR_HOST}/firmware
STAGING_FIRMWARE_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/firmware"
# BBFILES=/tool/yocto/poky/meta/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bbappend /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bb /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bbappend /tool/yocto/meta-xilinx/recipes-*/*/*.bb /tool/yocto/meta-xilinx/recipes-*/*/*.bbappend
BBFILES="/tool/yocto/poky/meta/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bb /tool/yocto/poky/meta-yocto/recipes-*/*/*.bbappend /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bb /tool/yocto/meta-openembedded/meta-oe/recipes-*/*/*.bbappend /tool/yocto/meta-xilinx/recipes-*/*/*.bb /tool/yocto/meta-xilinx/recipes-*/*/*.bbappend"
# AS=${HOST_PREFIX}as ${HOST_AS_ARCH}
export AS="powerpc-poky-linux-as"
# AR=${HOST_PREFIX}ar
export AR="powerpc-poky-linux-ar"
# PACKAGE_EXTRA_ARCHS_tune-powerpc=powerpc
PACKAGE_EXTRA_ARCHS_tune-powerpc="powerpc"
# PREFERRED_VERSION_linux-yocto=3.4%
PREFERRED_VERSION_linux-yocto="3.4%"
# BNFILE=${BUILDSTATS_BASE}/.buildname
BNFILE="/tool/yocto/poky/build/tmp/buildstats//.buildname"
# FILES_${PN}-locale=None
# bindir_nativesdk=${prefix_nativesdk}/bin
bindir_nativesdk="/usr/bin"
# PACKAGE_DEPENDS= rpm-native file-native pax-utils-native ${QADEPENDS}
PACKAGE_DEPENDS="rpm-native file-native pax-utils-native prelink-native"
# BUILD_CPPFLAGS=-isystem${STAGING_INCDIR_NATIVE}
export BUILD_CPPFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include"
# KERNEL_LOCALVERSION=
# PERSISTENT_DIR=${TMPDIR}/cache
PERSISTENT_DIR="/tool/yocto/poky/build/tmp/cache"
# QEMU_OPTIONS=
# do_package_write_deb=None
# ROOT_FLASH_SIZE=256
ROOT_FLASH_SIZE="256"
# RDEPENDS_linux-xilinx-staticdev=${PN}-dev (= ${EXTENDPKGV})
RDEPENDS_linux-xilinx-staticdev="linux-xilinx-dev (= 3.3.0-r0)"
# SDK_PACKAGE_ARCHS=all any noarch ${SDK_ARCH}-nativesdk
SDK_PACKAGE_ARCHS="all any noarch x86_64-nativesdk"
# CPP=${HOST_PREFIX}gcc -E${TOOLCHAIN_OPTIONS} ${HOST_CC_ARCH}
export CPP="powerpc-poky-linux-gcc -E --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5 -m32 -msoft-float -mcpu=440"
# BBFILE_COLLECTIONS= normal yocto openembedded-layer xilinx
BBFILE_COLLECTIONS="normal yocto openembedded-layer xilinx"
# mandir=${datadir}/man
export mandir="/usr/share/man"
# SECTION_linux-xilinx-doc=doc
SECTION_linux-xilinx-doc="doc"
# PREFERRED_PROVIDER_opkg-nativesdk=opkg-nativesdk
PREFERRED_PROVIDER_opkg-nativesdk="opkg-nativesdk"
# FAKEROOTDIRS=${PSEUDO_LOCALSTATEDIR}
FAKEROOTDIRS="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pseudo/"
# FILES_linux-xilinx-bin=${bindir}/* ${sbindir}/*
FILES_linux-xilinx-bin="/usr/bin/* /usr/sbin/*"
# USE_PR_SERV=${@[1,0][((not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True))) and (not d.getVar('PRSERV_LOCKDOWN', True))]}
USE_PR_SERV="0"
# CCACHE=
# BB_BASEHASH_task-do_package_write_rpm_setscene=a83a2743f2c19c469c2cb36ad96cebf5
BB_BASEHASH_task-do_package_write_rpm_setscene="a83a2743f2c19c469c2cb36ad96cebf5"
# sbindir_native=${prefix_native}/sbin
sbindir_native="/usr/sbin"
# P=${PN}-${PV}
P="linux-xilinx-3.3.0"
# PKG_CONFIG_SYSROOT_DIR=${STAGING_DIR_HOST}
export PKG_CONFIG_SYSROOT_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# XILINX_BOARD=ml507
XILINX_BOARD="ml507"
# FILESPATH=${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}
FILESPATH="/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0-r0/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx-3.3.0/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/files/:/tool/yocto/meta-xilinx/recipes-kernel/linux/linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/powerpc:/tool/yocto/meta-xilinx/recipes-kernel/linux/build-linux:/tool/yocto/meta-xilinx/recipes-kernel/linux/pn-linux-xilinx:/tool/yocto/meta-xilinx/recipes-kernel/linux/virtex5:/tool/yocto/meta-xilinx/recipes-kernel/linux/poky:/tool/yocto/meta-xilinx/recipes-kernel/linux/class-target:/tool/yocto/meta-xilinx/recipes-kernel/linux/forcevariable:/tool/yocto/meta-xilinx/recipes-kernel/linux/libc-glibc:/tool/yocto/meta-xilinx/recipes-kernel/linux/"
# TUNE_ARCH=${@bb.utils.contains("TUNE_FEATURES", "m32", "powerpc", "", d)}
TUNE_ARCH="powerpc"
# QADEPENDS=prelink-native
QADEPENDS="prelink-native"
# WHITELIST_GPLv3=less
WHITELIST_GPLv3="less"
# E_SVN=svn://svn.enlightenment.org/svn/e
E_SVN="svn://svn.enlightenment.org/svn/e"
# BUILD_CXXFLAGS=${BUILD_CFLAGS} -fpermissive
export BUILD_CXXFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -fpermissive"
# OBJCOPY=${HOST_PREFIX}objcopy
export OBJCOPY="powerpc-poky-linux-objcopy"
# BB_BASEHASH_task-do_menuconfig=df9a8ccdf29b0f24998ae21d20c4b1b6
BB_BASEHASH_task-do_menuconfig="df9a8ccdf29b0f24998ae21d20c4b1b6"
# PREFERRED_VERSION_linux-yocto_qemux86-64=3.4%
PREFERRED_VERSION_linux-yocto_qemux86-64="3.4%"
# LCONF_VERSION=4
LCONF_VERSION="4"
# SRC_URI=git://git.xilinx.com/linux-xlnx.git;protocol=git;branch=${KBRANCH} file://defconfig
SRC_URI="git://git.xilinx.com/linux-xlnx.git;protocol=git;branch=master file://defconfig"
# SSTATEPOSTINSTFUNCS=
# includedir_native=${prefix_native}/include
includedir_native="/usr/include"
# SESSION_MANAGER=local/eos:@/tmp/.ICE-unix/4305,unix/eos:/tmp/.ICE-unix/4305
SESSION_MANAGER="local/eos:@/tmp/.ICE-unix/4305,unix/eos:/tmp/.ICE-unix/4305"
# BB_BASEHASH_task-do_savedefconfig=966cb95e43b6f4fff66d7854044a55b3
BB_BASEHASH_task-do_savedefconfig="966cb95e43b6f4fff66d7854044a55b3"
# SUMMARY_${PN}-doc=None
# PACKAGE_EXTRA_ARCHS_tune-powerpc-nf=powerpc-nf
PACKAGE_EXTRA_ARCHS_tune-powerpc-nf="powerpc-nf"
# FETCHCMD_hg=/usr/bin/env hg
FETCHCMD_hg="/usr/bin/env hg"
# TUNE_FEATURES_tune-powerpc=m32 fpu-hard
TUNE_FEATURES_tune-powerpc="m32 fpu-hard"
# ASNEEDED_pn-minimo=
# FILESDIR=${@bb.which(d.getVar('FILESPATH', True), '.')}
FILESDIR="/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx/virtex5/."
# XILINX_BSP_PATH=/project/xilinx-ml507-workspace
XILINX_BSP_PATH="/project/xilinx-ml507-workspace"
# TUNE_FEATURES_tune-ppc440=m32 fpu-soft ppc440
TUNE_FEATURES_tune-ppc440="m32 fpu-soft ppc440"
# OELAYOUT_ABI=8
OELAYOUT_ABI="8"
# BBFILE_PRIORITY_xilinx=6
BBFILE_PRIORITY_xilinx="6"
# DISTRO_FEATURES_LIBC_DEFAULT=ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io
DISTRO_FEATURES_LIBC_DEFAULT="ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io"
# base_libdir_native=/lib
base_libdir_native="/lib"
# FETCHCOMMAND=ERROR, this must be a BitBake bug
FETCHCOMMAND="ERROR, this must be a BitBake bug"
# PKGR=${PR}${EXTENDPRAUTO}
PKGR="r0"
# XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
XDG_DATA_DIRS="/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/"
# includedir_nativesdk=${prefix_nativesdk}/include
includedir_nativesdk="/usr/include"
# LINKER_HASH_STYLE_mipsel=sysv
LINKER_HASH_STYLE_mipsel="sysv"
# IMAGE_PKGTYPE=rpm
IMAGE_PKGTYPE="rpm"
# FILES_${PN}-dbg=None
# servicedir=${base_prefix}/srv
export servicedir="/srv"
# INITRAMFS_IMAGE=
# bindir_native=${prefix_native}/bin
bindir_native="/usr/bin"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-compilerlibs=gcc-runtime
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-compilerlibs="gcc-runtime"
# BUILD_PREFIX=
# HOME=/home/elvis
export HOME="/home/elvis"
# SECTION_linux-xilinx-staticdev=devel
SECTION_linux-xilinx-staticdev="devel"
# SYSROOT_LOCK=${STAGING_DIR}/staging.lock
SYSROOT_LOCK="/tool/yocto/poky/build/tmp/sysroots/staging.lock"
# COMBINED_FEATURES=${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "alsa", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "bluetooth", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "ext2", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "vfat", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "irda", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pcmcia", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "pci", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbgadget", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "usbhost", d)} ${@base_both_contain("DISTRO_FEATURES", "MACHINE_FEATURES", "wifi", d)}
COMBINED_FEATURES="ext2"
# PKGDESTWORK=${WORKDIR}/pkgdata
PKGDESTWORK="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/pkgdata"
# BASE_LIB_tune-powerpc=lib
BASE_LIB_tune-powerpc="lib"
# SRCDATE=${DATE}
SRCDATE="20120623"
# SEPPUKU_PASS=None
# DEFAULT_PREFERENCE=1
DEFAULT_PREFERENCE="1"
# TARGET_CC_ARCH=${TUNE_CCARGS}
TARGET_CC_ARCH="-m32 -msoft-float -mcpu=440"
# QEMU_OPTIONS_armv6=-cpu arm1136
QEMU_OPTIONS_armv6="-cpu arm1136"
# HOST_ARCH=${TARGET_ARCH}
HOST_ARCH="powerpc"
# ENABLE_BINARY_LOCALE_GENERATION=1
ENABLE_BINARY_LOCALE_GENERATION="1"
# TARGET_OS=linux${LIBCEXTENSION}${ABIEXTENSION}
TARGET_OS="linux"
# SOURCE_MIRROR_URL=None
# SOLIBS_darwin8=.*.dylib
SOLIBS_darwin8=".*.dylib"
# SOLIBS_darwin9=.*.dylib
SOLIBS_darwin9=".*.dylib"
# PREFERRED_VERSION_u-boot=u-boot-xilinx
PREFERRED_VERSION_u-boot="u-boot-xilinx"
# CONNECTIVITY_CHECK_URIS=git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD https://eula-downloads.yoctoproject.org/index.php http://bugzilla.yoctoproject.org/report.cgi
CONNECTIVITY_CHECK_URIS="git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=HEAD https://eula-downloads.yoctoproject.org/index.php http://bugzilla.yoctoproject.org/report.cgi"
# ABIEXTENSION=
# TUNEABI_WHITELIST=None
# FULL_OPTIMIZATION=-O2 -pipe ${DEBUG_FLAGS}
FULL_OPTIMIZATION="-O2 -pipe -g -feliminate-unused-debug-types"
# TARGET_AS_ARCH=${TUNE_ASARGS}
# PREFERRED_VERSION_python=2.7.3
PREFERRED_VERSION_python="2.7.3"
# FILES_${PN}=None
# PREFERRED_VERSION_libgcc-nativesdk=${SDKGCCVERSION}
PREFERRED_VERSION_libgcc-nativesdk="4.7%"
# PATCHRESOLVE=noop
PATCHRESOLVE="noop"
# SSTATE_SCAN_FILES=*.la *-config *_config
SSTATE_SCAN_FILES="*.la *-config *_config"
# LGPLv2_WHITELIST_GPLv3=libassuan gnutls libtasn1 libidn libgcc gcc-runtime
LGPLv2_WHITELIST_GPLv3="libassuan gnutls libtasn1 libidn libgcc gcc-runtime"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial=None
# DISTRO_FEATURES_LIBC_virtclass-nativesdk=${DISTRO_FEATURES_LIBC_DEFAULT}
DISTRO_FEATURES_LIBC_virtclass-nativesdk="ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io"
# DISTRO_NAME=Yocto (Built by Poky 7.0)
DISTRO_NAME="Yocto (Built by Poky 7.0)"
# FREEBSD_MIRROR=ftp://ftp.freebsd.org/pub/FreeBSD/
FREEBSD_MIRROR="ftp://ftp.freebsd.org/pub/FreeBSD/"
# PREFERRED_VERSION_binutils-cross=${BINUVERSION}
PREFERRED_VERSION_binutils-cross="2.22"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils=None
# HOST_PREFIX=${TARGET_PREFIX}
HOST_PREFIX="powerpc-poky-linux-"
# module_autoload_hidp=hidp
module_autoload_hidp="hidp"
# LC_ALL=C
export LC_ALL="C"
# PKGD=${WORKDIR}/package
PKGD="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/package"
# PKGE=${@['','${PE\x7d'][d.getVar('PE',1) > 0]}
# HOST_SYS=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}
HOST_SYS="powerpc-poky-linux"
# SSTATETASKNAMES=deploy deploy-rpm populate-lic package populate-sysroot
SSTATETASKNAMES="deploy deploy-rpm populate-lic package populate-sysroot"
# PKGV=${PV}
PKGV="3.3.0"
# TARGET_CPPFLAGS=
# BBFILE_PATTERN_yocto=^/tool/yocto/poky/meta-yocto/
BBFILE_PATTERN_yocto="^/tool/yocto/poky/meta-yocto/"
# PCMCIA_MANAGER=pcmciautils
PCMCIA_MANAGER="pcmciautils"
# PREFERRED_PROVIDER_opkg=opkg
PREFERRED_PROVIDER_opkg="opkg"
# TUNE_ASARGS=
# FILE=/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx_3.3.0.bb
FILE="/tool/yocto/meta-xilinx/recipes-kernel/linux/linux-xilinx_3.3.0.bb"
# EXTENDPKGEVER=${@['','${PKGE\x7d:'][d.getVar('PKGE',1).strip() != '']}
# KERNEL_CC=${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}${TOOLCHAIN_OPTIONS}
KERNEL_CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# PREFERRED_PROVIDER_dbus-glib=dbus-glib
PREFERRED_PROVIDER_dbus-glib="dbus-glib"
# exec_prefix=/usr
export exec_prefix="/usr"
# bindir_crossscripts=${bindir}/crossscripts
bindir_crossscripts="/usr/bin/crossscripts"
# KERNEL_LDSUFFIX=
# IMAGE_DEVICE_TABLES=files/device_table-minimal.txt files/device_table_add-xsa.txt
IMAGE_DEVICE_TABLES="files/device_table-minimal.txt files/device_table_add-xsa.txt"
# PREFERRED_VERSION_binutils=${BINUVERSION}
PREFERRED_VERSION_binutils="2.22"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-initial=${TCLIBC}-initial
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-libc-initial="eglibc-initial"
# SDKPATH=/opt/${DISTRO}/${SDK_VERSION}
SDKPATH="/opt/poky/1.2+snapshot"
# GROUP_locale=None
# module_autoload_rfcomm=rfcomm
module_autoload_rfcomm="rfcomm"
# SSTATE_PKGNAME=${SSTATE_PKGSPEC}${BB_TASKHASH}
SSTATE_PKGNAME="sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}"
# STAGING_INCDIR=${STAGING_DIR_HOST}${includedir}
STAGING_INCDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/include"
# BUILD_RANLIB=${BUILD_PREFIX}ranlib
export BUILD_RANLIB="ranlib"
# FETCHCMD_cvs=/usr/bin/env cvs
FETCHCMD_cvs="/usr/bin/env cvs"
# DESKTOP_SESSION=ubuntu
DESKTOP_SESSION="ubuntu"
# PKGWRITEDIRSRPM=${DEPLOY_DIR}/sources/deploy-srpm
PKGWRITEDIRSRPM="/tool/yocto/poky/build/tmp/deploy/sources/deploy-srpm"
# COMPATIBLE_MACHINE=(virtex4|virtex5|virtex5mb|spartan6-sp605|spartan6-lx9mb)
COMPATIBLE_MACHINE="(virtex4|virtex5|virtex5mb|spartan6-sp605|spartan6-lx9mb)"
# PREFERRED_PROVIDER_libgcc=libgcc
PREFERRED_PROVIDER_libgcc="libgcc"
# GENTOO_MIRROR=http://distfiles.gentoo.org/distfiles
GENTOO_MIRROR="http://distfiles.gentoo.org/distfiles"
# CO_DIR=${DL_DIR}
CO_DIR="/tool/yocto/poky/build/downloads"
# MULTIMACH_TARGET_SYS=${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
MULTIMACH_TARGET_SYS="virtex5-poky-linux"
# BB_BASEHASH_task-do_populate_lic_setscene=3bdcbad02cc5fbfdbf0709766880eac2
BB_BASEHASH_task-do_populate_lic_setscene="3bdcbad02cc5fbfdbf0709766880eac2"
# DESCRIPTION_linux-xilinx-dev=${DESCRIPTION} This package contains symbolic links, header files, and related items necessary for software development.
DESCRIPTION_linux-xilinx-dev="Linux kernel for Xilinx platforms This package contains symbolic links, header files, and related items necessary for software development."
# ALLOW_EMPTY_kernel-image=1
ALLOW_EMPTY_kernel-image="1"
# HOSTTOOLS_WHITELIST_GPLv3=
# TUNE_LDARGS=
# baselib=${BASELIB}
baselib="lib"
# SSTATE_VERSION=2
SSTATE_VERSION="2"
# PREFERRED_VERSION_gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}=None
# BB_ENV_EXTRAWHITE=PSEUDO_BUILD PSEUDO_DISABLED MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER SCREENDIR
BB_ENV_EXTRAWHITE="PSEUDO_BUILD PSEUDO_DISABLED MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER SCREENDIR"
# KERNEL_IMAGETYPE_FOR_MAKE=${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}
KERNEL_IMAGETYPE_FOR_MAKE="uImage"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++=None
# PREFERRED_VERSION_gcc-crosssdk-intermediate=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-crosssdk-intermediate="4.7%"
# PREFERRED_VERSION_binutils-cross-canadian-${TRANSLATED_TARGET_ARCH}=None
# BUILDSDK_CPPFLAGS=-isystem${STAGING_INCDIR}
BUILDSDK_CPPFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/include"
# AVAILTUNES= powerpc powerpc-nf ppc440
AVAILTUNES="powerpc powerpc-nf ppc440"
# BB_SIGNATURE_EXCLUDE_FLAGS=doc defaultval _append _prepend deps depends lockfiles type vardepsexclude vardeps vardepvalue file-checksums python func task export unexport noexec nostamp dirs cleandirs sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask recrdeptask nodeprrecs stamp-base stamp-extra-info
BB_SIGNATURE_EXCLUDE_FLAGS="doc defaultval _append _prepend deps depends lockfiles type vardepsexclude vardeps vardepvalue file-checksums python func task export unexport noexec nostamp dirs cleandirs sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask recrdeptask nodeprrecs stamp-base stamp-extra-info"
# BB_HASHBASE_WHITELIST=TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE
BB_HASHBASE_WHITELIST="TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE"
# module_conf_bluez=alias net-pf-31 bluez
module_conf_bluez="alias net-pf-31 bluez"
# DESCRIPTION_linux-xilinx-dbg=${DESCRIPTION} This package contains ELF symbols and related sources for debugging purposes.
DESCRIPTION_linux-xilinx-dbg="Linux kernel for Xilinx platforms This package contains ELF symbols and related sources for debugging purposes."
# E_MIRROR=http://download.enlightenment.org/releases
E_MIRROR="http://download.enlightenment.org/releases"
# KERNEL_DEVICETREE_FLAGS=-R 8 -p 0x3000
KERNEL_DEVICETREE_FLAGS="-R 8 -p 0x3000"
# FETCHCMD_svn=/usr/bin/env svn
FETCHCMD_svn="/usr/bin/env svn"
# PREFERRED_PROVIDER_virtual/kernel=linux-xilinx
PREFERRED_PROVIDER_virtual/kernel="linux-xilinx"
# BB_BASEHASH_task-do_listtasks=1ad35dec4c57727e67231fbe9f8e453b
BB_BASEHASH_task-do_listtasks="1ad35dec4c57727e67231fbe9f8e453b"
# BB_BASEHASH_task-do_package_write=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_package_write="fdc376fd264c2fc126ec182f0a53ca8a"
# sysconfdir=${base_prefix}/etc
export sysconfdir="/etc"
# FILES_kernel-image=/boot/${KERNEL_IMAGETYPE}*
FILES_kernel-image="/boot/uImage*"
# CCLD=${CC}
export CCLD="powerpc-poky-linux-gcc -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# CHECKCOMMAND_wget=/usr/bin/env wget --spider -t 2 -T 30 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'
CHECKCOMMAND_wget="/usr/bin/env wget --spider -t 2 -T 30 --passive-ftp --no-check-certificate -P /tool/yocto/poky/build/downloads '${URI}'"
# QAPATHTEST=None
# SELECTED_OPTIMIZATION=${@d.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][d.getVar('DEBUG_BUILD', True) == '1'], True)}
SELECTED_OPTIMIZATION="-O2 -pipe -g -feliminate-unused-debug-types"
# GIT_CONFIG_PATH=${STAGING_DIR_NATIVE}/etc
GIT_CONFIG_PATH="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc"
# ASNEEDED_pn-openobex=
# SDKGCCVERSION=${GCCVERSION}
SDKGCCVERSION="4.7%"
# DEBIAN_NAMES=1
DEBIAN_NAMES="1"
# DISTRO_EXTRA_RRECOMMENDS= ${POKY_DEFAULT_EXTRA_RRECOMMENDS}
DISTRO_EXTRA_RRECOMMENDS="kernel-module-af-packet"
# PACKAGEINDEXDEPS= rpm-native:do_populate_sysroot createrepo-native:do_populate_sysroot
PACKAGEINDEXDEPS="rpm-native:do_populate_sysroot createrepo-native:do_populate_sysroot"
# PREFERRED_VERSION_linux-yocto_qemuarm=3.4%
PREFERRED_VERSION_linux-yocto_qemuarm="3.4%"
# PREFERRED_VERSION_linux-yocto_qemuppc=3.4%
PREFERRED_VERSION_linux-yocto_qemuppc="3.4%"
# KERNEL_ALT_IMAGETYPE=
# QA_LOG=None
# PACKAGELOCK=${STAGING_DIR}/package-output.lock
PACKAGELOCK="/tool/yocto/poky/build/tmp/sysroots/package-output.lock"
# IMAGE_NAME=${IMAGE_BASENAME}-${MACHINE}-${DATETIME}
IMAGE_NAME="linux-xilinx-virtex5-20120623074715"
# STAGING_DIR_TCBOOTSTRAP=${STAGING_DIR_TARGET}-tcbootstrap
STAGING_DIR_TCBOOTSTRAP="/tool/yocto/poky/build/tmp/sysroots/virtex5-tcbootstrap"
# STAGING_LIBDIR_NATIVE=${STAGING_DIR_NATIVE}${libdir_native}
STAGING_LIBDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib"
# QEMU_TARGETS=arm i386 mips mipsel ppc x86_64
QEMU_TARGETS="arm i386 mips mipsel ppc x86_64"
# GROUP_packaging=None
# DESCRIPTION=Linux kernel for Xilinx platforms
DESCRIPTION="Linux kernel for Xilinx platforms"
# OVERRIDES=${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable${LIBCOVERRIDE}
OVERRIDES="linux:powerpc:build-linux:pn-linux-xilinx:virtex5:poky:class-target:forcevariable:libc-glibc"
# INHERIT= ${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_INSANE} ${INHERIT_DISTRO} sanity
INHERIT="package_rpm buildstats image-mklibs image-prelink insane debian devshell sstate license sanity"
# BB_BASEHASH_task-do_devshell=aa48d219cbda3f32c9b16c048e5ff62e
BB_BASEHASH_task-do_devshell="aa48d219cbda3f32c9b16c048e5ff62e"
# TARGET_LD_ARCH=${TUNE_LDARGS}
# SDK_SYS=${SDK_ARCH}${SDK_VENDOR}${@['-' + d.getVar('SDK_OS', True), ''][d.getVar('SDK_OS', True) == ('' or 'custom')]}
SDK_SYS="x86_64-pokysdk-linux"
# base_dep=def base_dep_prepend(d):
# #
# # Ideally this will check a flag so we will operate properly in
# # the case where host == build == target, for now we don't work in
# # that case though.
# #
#
# deps = ""
# # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
# # we need that built is the responsibility of the patch function / class, not
# # the application.
# if not d.getVar('INHIBIT_DEFAULT_DEPS'):
# if (d.getVar('HOST_SYS', True) !=
# d.getVar('BUILD_SYS', True)):
# deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
# return deps
#
base_dep="def base_dep_prepend(d): \
# \
# Ideally this will check a flag so we will operate properly in \
# the case where host == build == target, for now we don't work in \
# that case though. \
# \
\
deps = \"\" \
# INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not \
# we need that built is the responsibility of the patch function / class, not \
# the application. \
if not d.getVar('INHIBIT_DEFAULT_DEPS'): \
if (d.getVar('HOST_SYS', True) != \
d.getVar('BUILD_SYS', True)): \
deps += \" virtual/powerpc-poky-linux-gcc virtual/powerpc-poky-linux-compilerlibs virtual/libc \" \
return deps"
# module_autoload_rtc-sa1100=rtc-sa1100
module_autoload_rtc-sa1100="rtc-sa1100"
# ASSUME_SHLIBS=None
# base_libdir=${base_prefix}/${baselib}
export base_libdir="/lib"
# BASELIB=lib
BASELIB="lib"
# BUILD_OPTIMIZATION=-O2 -pipe
BUILD_OPTIMIZATION="-O2 -pipe"
# UBOOT_ENTRYPOINT=0x00000000
UBOOT_ENTRYPOINT="0x00000000"
# PACKAGEINDEXES= package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};
PACKAGEINDEXES="package_update_index_rpm; createrepo /tool/yocto/poky/build/tmp/deploy/rpm;"
# BPN=${@base_prune_suffix(d.getVar('PN', True), d.getVar('SPECIAL_PKGSUFFIX', True).split(), d)}
BPN="linux-xilinx"
# LOGNAME=elvis
export LOGNAME="elvis"
# PATH=${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:/tool/yocto/poky/scripts:/tool/yocto/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
export PATH="/tool/yocto/poky/scripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/ppc440-poky-linux:/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux//bin:/tool/yocto/poky/scripts:/tool/yocto/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
# ASNEEDED_pn-pciutils=
# TARGET_CFLAGS=${TARGET_CPPFLAGS} ${SELECTED_OPTIMIZATION}
export TARGET_CFLAGS="-O2 -pipe -g -feliminate-unused-debug-types"
# base_bindir=${base_prefix}/bin
export base_bindir="/bin"
# BUILDCFG_FUNCS=buildcfg_vars get_layers_branch_rev buildcfg_neededvars
BUILDCFG_FUNCS="buildcfg_vars get_layers_branch_rev buildcfg_neededvars"
# PKG_CONFIG_LIBDIR=${PKG_CONFIG_DIR}
export PKG_CONFIG_LIBDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5//usr/lib/pkgconfig"
# SANITY_REQUIRED_UTILITIES=patch diffstat texi2html makeinfo svn bzip2 tar gzip gawk chrpath wget cpio
SANITY_REQUIRED_UTILITIES="patch diffstat texi2html makeinfo svn bzip2 tar gzip gawk chrpath wget cpio"
# SEPPUKU_COMPONENT=None
# BBFILE_PRIORITY_normal=5
BBFILE_PRIORITY_normal="5"
# MACHINE=virtex5
unset MACHINE
# TARGET_LD_KERNEL_ARCH=
# GITDIR=${CO_DIR}/git2
GITDIR="/tool/yocto/poky/build/downloads/git2"
# EXCLUDE_FROM_WORLD_pn-gobject-introspection=1
EXCLUDE_FROM_WORLD_pn-gobject-introspection="1"
# MACHINEOVERRIDES=${MACHINE}
MACHINEOVERRIDES="virtex5"
# prefix_native=/usr
prefix_native="/usr"
# BBFILE_PRIORITY_yocto=5
BBFILE_PRIORITY_yocto="5"
# SECTION_${PN}-dev=None
# base_sbindir_native=/sbin
base_sbindir_native="/sbin"
# ALLOW_EMPTY_kernel-base=1
ALLOW_EMPTY_kernel-base="1"
# sbindir=${exec_prefix}/sbin
export sbindir="/usr/sbin"
# CFLAGS=${TARGET_CFLAGS}
export CFLAGS="-O2 -pipe -g -feliminate-unused-debug-types"
# BB_BASEHASH_task-do_populate_sysroot=b7753f1df384ebc522204f2bca9baabb
BB_BASEHASH_task-do_populate_sysroot="b7753f1df384ebc522204f2bca9baabb"
# BUILD_AR=${BUILD_PREFIX}ar
export BUILD_AR="ar"
# BUILD_AS=${BUILD_PREFIX}as ${BUILD_AS_ARCH}
export BUILD_AS="as"
# SHLIBSDIR=${STAGING_DIR_HOST}/shlibs
SHLIBSDIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/shlibs"
# sharedstatedir=${base_prefix}/com
export sharedstatedir="/com"
# FILES_linux-xilinx=${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} ${sysconfdir} ${sharedstatedir} ${localstatedir} ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*${SOLIBS} ${datadir}/${BPN} ${libdir}/${BPN}/* ${datadir}/pixmaps ${datadir}/applications ${datadir}/idl ${datadir}/omf ${datadir}/sounds ${libdir}/bonobo/servers
FILES_linux-xilinx="/usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* /etc /com /var /bin/* /sbin/* /lib/*.so.* /usr/share/linux-xilinx /usr/lib/linux-xilinx/* /usr/share/pixmaps /usr/share/applications /usr/share/idl /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers"
# COMMERCIAL_AUDIO_PLUGINS=
# DEBIAN_MIRROR=ftp://ftp.debian.org/debian/pool
DEBIAN_MIRROR="ftp://ftp.debian.org/debian/pool"
# PREFERRED_PROVIDER_virtual/libc=eglibc
PREFERRED_PROVIDER_virtual/libc="eglibc"
# DEVFILE=${BUILDSTATS_BASE}/.device
DEVFILE="/tool/yocto/poky/build/tmp/buildstats//.device"
# DEFAULT_TASK_PROVIDER=task-base
DEFAULT_TASK_PROVIDER="task-base"
# PREFERRED_VERSION_uclibc-initial=${UCLIBCVERSION}
PREFERRED_VERSION_uclibc-initial="0.9.33"
# BBFILE_PATTERN_openembedded-layer=^/tool/yocto/meta-openembedded/meta-oe/
BBFILE_PATTERN_openembedded-layer="^/tool/yocto/meta-openembedded/meta-oe/"
# BB_BASEHASH_task-do_configure=9347e52b8b7eef509e108752d35aa92e
BB_BASEHASH_task-do_configure="9347e52b8b7eef509e108752d35aa92e"
# VIRTUAL-RUNTIME_apm=apm
VIRTUAL-RUNTIME_apm="apm"
# IMAGE_LINGUAS=en-us en-gb
IMAGE_LINGUAS="en-us en-gb"
# KERNEL_IMAGE_SYMLINK_NAME=${KERNEL_IMAGETYPE}-${MACHINE}
KERNEL_IMAGE_SYMLINK_NAME="uImage-virtex5"
# PREFERRED_PROVIDER_virtual/libc-nativesdk=eglibc-nativesdk
PREFERRED_PROVIDER_virtual/libc-nativesdk="eglibc-nativesdk"
# PARALLEL_MAKE=-j 6
PARALLEL_MAKE="-j 6"
# PACKAGE_EXTRA_ARCHS=${PACKAGE_EXTRA_ARCHS_tune-${DEFAULTTUNE}}
PACKAGE_EXTRA_ARCHS="powerpc-nf ppc440"
# PREFERRED_PROVIDER_virtual/libiconv-nativesdk=eglibc-nativesdk
PREFERRED_PROVIDER_virtual/libiconv-nativesdk="eglibc-nativesdk"
# PREFERRED_VERSION_linux-libc-headers=${LINUXLIBCVERSION}
PREFERRED_VERSION_linux-libc-headers="3.4"
# KERNEL_TARGET=440-ml507
KERNEL_TARGET="440-ml507"
# PREFERRED_VERSION_liberation-fonts=1.04
PREFERRED_VERSION_liberation-fonts="1.04"
# OBJDUMP=${HOST_PREFIX}objdump
export OBJDUMP="powerpc-poky-linux-objdump"
# INHERIT_DISTRO=debian devshell sstate license
INHERIT_DISTRO="debian devshell sstate license"
# IMAGE_BASENAME=${PN}
IMAGE_BASENAME="linux-xilinx"
# PATCHTOOL=quilt
PATCHTOOL="quilt"
# XORG_MIRROR=http://xorg.freedesktop.org/releases
XORG_MIRROR="http://xorg.freedesktop.org/releases"
# SYSROOT_DESTDIR=${WORKDIR}/sysroot-destdir/
SYSROOT_DESTDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir/"
# FILES_kernel-dev=/boot/System.map* /boot/Module.symvers* /boot/config*
FILES_kernel-dev="/boot/System.map* /boot/Module.symvers* /boot/config*"
# BB_BASEHASH_task-do_checkuri=4de07276512afa6485487cc4e3c3489a
BB_BASEHASH_task-do_checkuri="4de07276512afa6485487cc4e3c3489a"
# UCLIBCVERSION=0.9.33
UCLIBCVERSION="0.9.33"
# CROSS_COMPILE=${TARGET_PREFIX}
export CROSS_COMPILE="powerpc-poky-linux-"
# SPECIAL_PKGSUFFIX=-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian
SPECIAL_PKGSUFFIX="-native -cross -initial -intermediate -nativesdk -crosssdk -cross-canadian"
# DESCRIPTION_${PN}-doc=None
# BUILD_EXEEXT=
# PREFERRED_VERSION_elfutils=0.148
PREFERRED_VERSION_elfutils="0.148"
# DL_DIR=${TOPDIR}/downloads
DL_DIR="/tool/yocto/poky/build/downloads"
# BB_BASEHASH_task-do_checkuriall=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_checkuriall="fdc376fd264c2fc126ec182f0a53ca8a"
# IMAGE_ROOTFS_EXTRA_SPACE=0
IMAGE_ROOTFS_EXTRA_SPACE="0"
# BB_BASEHASH_task-do_compile=3cac88de5a688f2684eb1f92fd7386e1
BB_BASEHASH_task-do_compile="3cac88de5a688f2684eb1f92fd7386e1"
# PR=r0
PR="r0"
# PV=${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1] or '1.0'}
PV="3.3.0"
# HOST_EXTRACFLAGS=${BUILD_CFLAGS} ${BUILD_LDFLAGS}
HOST_EXTRACFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -L/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath-link,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1"
# SDK_PREFIX=${SDK_SYS}-
SDK_PREFIX="x86_64-pokysdk-linux-"
# module_conf_bnep=alias bt-proto-4 bnep
module_conf_bnep="alias bt-proto-4 bnep"
# PKGDEST=${WORKDIR}/packages-split
PKGDEST="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/packages-split"
# BB_BASEHASH_task-do_fetch=d2142b2ebff99a629535445acf830fe7
BB_BASEHASH_task-do_fetch="d2142b2ebff99a629535445acf830fe7"
# PF=${PN}-${EXTENDPE}${PV}-${PR}
PF="linux-xilinx-3.3.0-r0"
# STAGING_BINDIR_NATIVE=${STAGING_DIR_NATIVE}${bindir_native}
STAGING_BINDIR_NATIVE="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin"
# MACHINE_EXTRA_RECOMMENDS=kernel-modules
MACHINE_EXTRA_RECOMMENDS="kernel-modules"
# RDEPENDS_linux-xilinx-dev=${PN} (= ${EXTENDPKGV})
RDEPENDS_linux-xilinx-dev="linux-xilinx (= 3.3.0-r0)"
# FAKEROOTNOENV=PSEUDO_UNLOAD=1
FAKEROOTNOENV="PSEUDO_UNLOAD=1"
# DISTRO=poky
unset DISTRO
# PACKAGEVARS=FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME
PACKAGEVARS="FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME"
# DISTRO_VERSION=1.2+snapshot-${DATE}
DISTRO_VERSION="1.2+snapshot-20120623"
# SDK_LD_ARCH=${BUILD_LD_ARCH}
# S=${WORKDIR}/git
S="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git"
# KERNEL_IMAGETYPE=uImage
KERNEL_IMAGETYPE="uImage"
# FILES_kernel-misc=/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media
FILES_kernel-misc="/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
# STAGING_KERNEL_DIR=${STAGING_DIR_HOST}/kernel
STAGING_KERNEL_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5/kernel"
# PREFERRED_PROVIDER_linux-libc-headers=linux-libc-headers
PREFERRED_PROVIDER_linux-libc-headers="linux-libc-headers"
# BB_BASEHASH_task-do_clean=0ef69b495b4727a19258e1bbd5534551
BB_BASEHASH_task-do_clean="0ef69b495b4727a19258e1bbd5534551"
# MLPREFIX=
# ADOBE_MIRROR=http://fpdownload.macromedia.com/get/flashplayer/current/
ADOBE_MIRROR="http://fpdownload.macromedia.com/get/flashplayer/current/"
# IPK_FEED_URIS=None
# PKG_CONFIG_DIR=${STAGING_DIR_HOST}/${libdir}/pkgconfig
export PKG_CONFIG_DIR="/tool/yocto/poky/build/tmp/sysroots/virtex5//usr/lib/pkgconfig"
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc=None
# TARGET_LDFLAGS=-Wl,-O1 ${TARGET_LINK_HASH_STYLE} ${ASNEEDED}
export TARGET_LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
# IMAGE_PREPROCESS_COMMAND= mklibs_optimize_image; prelink_image;
IMAGE_PREPROCESS_COMMAND="mklibs_optimize_image; prelink_image;"
# SRCREV=${AUTOREV}
SRCREV="AUTOINC"
# DEBIANRDEP=do_package
DEBIANRDEP="do_package"
# TARGET_SYS=${TARGET_ARCH}${TARGET_VENDOR}${@['-' + d.getVar('TARGET_OS', True), ''][d.getVar('TARGET_OS', True) == ('' or 'custom')]}
TARGET_SYS="powerpc-poky-linux"
# PREFERRED_PROVIDER_virtual/libc-locale=eglibc-locale
PREFERRED_PROVIDER_virtual/libc-locale="eglibc-locale"
# DEPLOY_DIR_TAR=${DEPLOY_DIR}/tar
DEPLOY_DIR_TAR="/tool/yocto/poky/build/tmp/deploy/tar"
# FILES_linux-xilinx-staticdev=${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a
FILES_linux-xilinx-staticdev="/usr/lib/*.a /lib/*.a /usr/lib/linux-xilinx/*.a"
# PKG_CONFIG_DISABLE_UNINSTALLED=yes
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
# DESCRIPTION_${PN}-dev=None
# PACKAGERDEPTASK=do_package_write
PACKAGERDEPTASK="do_package_write"
# LINKER_HASH_STYLE_mips64el=sysv
LINKER_HASH_STYLE_mips64el="sysv"
# DESCRIPTION_linux-xilinx-doc=${DESCRIPTION} This package contains documentation.
DESCRIPTION_linux-xilinx-doc="Linux kernel for Xilinx platforms This package contains documentation."
# libdir=${exec_prefix}/${baselib}
export libdir="/usr/lib"
# SEPPUKU_NEWREPORT=None
# FILES_linux-xilinx-doc=${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc ${datadir}/gnome/help
FILES_linux-xilinx-doc="/usr/share/doc /usr/share/man /usr/share/info /usr/share/gtk-doc /usr/share/gnome/help"
# ALLOW_EMPTY_${PN}-dev=None
# ASNEEDED_pn-xserver-kdrive-xomap=
# PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-initial-nativesdk=${TCLIBC}-initial-nativesdk
PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-initial-nativesdk="eglibc-initial-nativesdk"
# METADATA_BRANCH=${@base_detect_branch(d)}
METADATA_BRANCH="master"
# PREFERRED_VERSION_gcc-crosssdk-initial=${SDKGCCVERSION}
PREFERRED_VERSION_gcc-crosssdk-initial="4.7%"
# SYSROOT_PREPROCESS_FUNCS=
# PREFERRED_PROVIDER_virtual/${SDK_PREFIX}libc-initial-nativesdk=None
# SEPPUKU_ATTACHMENT=None
# DEPLOY_DIR_IMAGE=${DEPLOY_DIR}/images
DEPLOY_DIR_IMAGE="/tool/yocto/poky/build/tmp/deploy/images"
# BB_DEFAULT_TASK=build
BB_DEFAULT_TASK="build"
# PSEUDO_DISABLED=1
export PSEUDO_DISABLED="1"
# SRCREV_pn-u-boot-xilinx=${AUTOREV}
SRCREV_pn-u-boot-xilinx="AUTOINC"
# PACKAGE_CLASSES=package_rpm
PACKAGE_CLASSES="package_rpm"
# PREFERRED_VERSION_linux-yocto_qemux86=3.4%
PREFERRED_VERSION_linux-yocto_qemux86="3.4%"
# EXTRA_IMAGE_FEATURES=debug-tweaks
EXTRA_IMAGE_FEATURES="debug-tweaks"
# TOOLCHAIN_OPTIONS= --sysroot=${STAGING_DIR_TARGET}
TOOLCHAIN_OPTIONS="--sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# LIBC_DEPENDENCIES=libsegfault eglibc eglibc-dbg eglibc-dev eglibc-utils eglibc-thread-db ${@get_libc_locales_dependencies(d)}
LIBC_DEPENDENCIES="libsegfault eglibc eglibc-dbg eglibc-dev eglibc-utils eglibc-thread-db eglibc-localedata-i18n eglibc-gconv-ibm850 eglibc-gconv-cp1252 eglibc-gconv-iso8859-1 eglibc-gconv-iso8859-15"
# BB_NUMBER_THREADS=6
BB_NUMBER_THREADS="6"
# OE_TERMINAL=auto
OE_TERMINAL="auto"
# PYTHON=${@sys.executable}
PYTHON="/usr/bin/python"
# CACHE=/tool/yocto/poky/build/tmp/cache/default-eglibc/virtex5
CACHE="/tool/yocto/poky/build/tmp/cache/default-eglibc/virtex5"
# PREFERRED_PROVIDER_virtual/libx11=libx11-trim
PREFERRED_PROVIDER_virtual/libx11="libx11-trim"
# TARGET_PREFIX=${TARGET_SYS}-
TARGET_PREFIX="powerpc-poky-linux-"
# SRCPV=${@bb.fetch2.get_srcrev(d)}
SRCPV="1+ed63a4d76efadcb68f5776e4244766ffea226cc4"
# _task_deps={'noexec': {'do_package_write': '1', 'do_build': '1'}, 'tasks': ['do_patch', 'do_populate_sysroot', 'do_populate_sysroot_setscene', 'do_listtasks', 'do_clean', 'do_checkuri', 'do_checkuriall', 'do_fetchall', 'do_buildall', 'do_fetch', 'do_unpack', 'do_configure', 'do_compile', 'do_install', 'do_build', 'do_cleansstate', 'do_cleanall', 'do_package', 'do_package_setscene', 'do_package_write', 'do_package_write_rpm_setscene', 'do_package_write_rpm', 'do_devshell', 'do_populate_lic', 'do_populate_lic_setscene', 'do_deploy_setscene', 'do_compile_kernelmodules', 'do_savedefconfig', 'do_menuconfig', 'do_sizecheck', 'do_uboot_mkimage', 'do_deploy'], 'rdeptask': {'do_package_write_rpm': 'do_package'}, 'recrdeptask': {'do_buildall': 'do_build', 'do_checkuriall': 'do_checkuri', 'do_fetchall': 'do_fetch', 'do_build': ' do_deploy do_package_write'}, 'umask': {'do_install': 18, 'do_configure': 18, 'do_package': 18, 'do_populate_sysroot': '022', 'do_compile': 18, 'do_package_write_rpm': '022'}, 'depends': {'do_menuconfig': ' ncurses-native:do_populate_sysroot', 'do_install': ' virtual/fakeroot-native:do_populate_sysroot', 'do_configure': ' ', 'do_package_write_rpm': ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot', 'do_fetch': ' git-native:do_populate_sysroot', 'do_patch': 'quilt-native:do_populate_sysroot', 'do_package': ' virtual/fakeroot-native:do_populate_sysroot rpm-native:do_populate_sysroot file-native:do_populate_sysroot pax-utils-native:do_populate_sysroot prelink-native:do_populate_sysroot'}, 'fakeroot': {'do_install': 1, 'do_package_setscene': 1, 'do_package_write_rpm': 1, 'do_package': 1, 'do_package_write_rpm_setscene': 1}, 'parents': {'do_configure': ['do_patch', 'do_unpack'], 'do_package': ['do_populate_lic', 'do_install'], 'do_package_write': ['do_package_write_rpm', 'do_package'], 'do_savedefconfig': ['do_configure'], 'do_fetchall': ['do_fetch'], 'do_compile': ['do_configure'], 'do_cleanall': ['do_cleansstate'], 'do_checkuri': [], 'do_unpack': ['do_fetch'], 'do_menuconfig': ['do_configure'], 'do_populate_lic': ['do_patch'], 'do_build': ['do_deploy', 'do_package_write', 'do_package', 'do_populate_sysroot'], 'do_fetch': [], 'do_devshell': ['do_patch'], 'do_populate_sysroot': ['do_install'], 'do_populate_sysroot_setscene': [], 'do_uboot_mkimage': ['do_compile'], 'do_checkuriall': ['do_checkuri'], 'do_install': ['do_uboot_mkimage', 'do_sizecheck', 'do_compile_kernelmodules', 'do_compile'], 'do_populate_lic_setscene': [], 'do_listtasks': [], 'do_clean': [], 'do_patch': ['do_unpack'], 'do_deploy': ['do_install'], 'do_compile_kernelmodules': ['do_compile'], 'do_buildall': ['do_build'], 'do_package_setscene': [], 'do_package_write_rpm': ['do_package'], 'do_deploy_setscene': [], 'do_package_write_rpm_setscene': [], 'do_sizecheck': ['do_compile'], 'do_cleansstate': ['do_clean']}, 'deptask': {'do_configure': 'do_populate_sysroot', 'do_package': ' do_package'}, 'nostamp': {'do_menuconfig': '1', 'do_savedefconfig': '1', 'do_listtasks': '1', 'do_devshell': '1', 'do_clean': '1', 'do_cleanall': '1', 'do_checkuri': '1', 'do_checkuriall': '1'}}
_task_deps="{'noexec': {'do_package_write': '1', 'do_build': '1'}, 'tasks': ['do_patch', 'do_populate_sysroot', 'do_populate_sysroot_setscene', 'do_listtasks', 'do_clean', 'do_checkuri', 'do_checkuriall', 'do_fetchall', 'do_buildall', 'do_fetch', 'do_unpack', 'do_configure', 'do_compile', 'do_install', 'do_build', 'do_cleansstate', 'do_cleanall', 'do_package', 'do_package_setscene', 'do_package_write', 'do_package_write_rpm_setscene', 'do_package_write_rpm', 'do_devshell', 'do_populate_lic', 'do_populate_lic_setscene', 'do_deploy_setscene', 'do_compile_kernelmodules', 'do_savedefconfig', 'do_menuconfig', 'do_sizecheck', 'do_uboot_mkimage', 'do_deploy'], 'rdeptask': {'do_package_write_rpm': 'do_package'}, 'recrdeptask': {'do_buildall': 'do_build', 'do_checkuriall': 'do_checkuri', 'do_fetchall': 'do_fetch', 'do_build': ' do_deploy do_package_write'}, 'umask': {'do_install': 18, 'do_configure': 18, 'do_package': 18, 'do_populate_sysroot': '022', 'do_compile': 18, 'do_package_write_rpm': '022'}, 'depends': {'do_menuconfig': ' ncurses-native:do_populate_sysroot', 'do_install': ' virtual/fakeroot-native:do_populate_sysroot', 'do_configure': ' ', 'do_package_write_rpm': ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot', 'do_fetch': ' git-native:do_populate_sysroot', 'do_patch': 'quilt-native:do_populate_sysroot', 'do_package': ' virtual/fakeroot-native:do_populate_sysroot rpm-native:do_populate_sysroot file-native:do_populate_sysroot pax-utils-native:do_populate_sysroot prelink-native:do_populate_sysroot'}, 'fakeroot': {'do_install': 1, 'do_package_setscene': 1, 'do_package_write_rpm': 1, 'do_package': 1, 'do_package_write_rpm_setscene': 1}, 'parents': {'do_configure': ['do_patch', 'do_unpack'], 'do_package': ['do_populate_lic', 'do_install'], 'do_package_write': ['do_package_write_rpm', 'do_package'], 'do_savedefconfig': ['do_configure'], 'do_fetchall': ['do_fetch'], 'do_compile': ['do_configure'], 'do_cleanall': ['do_cleansstate'], 'do_checkuri': [], 'do_unpack': ['do_fetch'], 'do_menuconfig': ['do_configure'], 'do_populate_lic': ['do_patch'], 'do_build': ['do_deploy', 'do_package_write', 'do_package', 'do_populate_sysroot'], 'do_fetch': [], 'do_devshell': ['do_patch'], 'do_populate_sysroot': ['do_install'], 'do_populate_sysroot_setscene': [], 'do_uboot_mkimage': ['do_compile'], 'do_checkuriall': ['do_checkuri'], 'do_install': ['do_uboot_mkimage', 'do_sizecheck', 'do_compile_kernelmodules', 'do_compile'], 'do_populate_lic_setscene': [], 'do_listtasks': [], 'do_clean': [], 'do_patch': ['do_unpack'], 'do_deploy': ['do_install'], 'do_compile_kernelmodules': ['do_compile'], 'do_buildall': ['do_build'], 'do_package_setscene': [], 'do_package_write_rpm': ['do_package'], 'do_deploy_setscene': [], 'do_package_write_rpm_setscene': [], 'do_sizecheck': ['do_compile'], 'do_cleansstate': ['do_clean']}, 'deptask': {'do_configure': 'do_populate_sysroot', 'do_package': ' do_package'}, 'nostamp': {'do_menuconfig': '1', 'do_savedefconfig': '1', 'do_listtasks': '1', 'do_devshell': '1', 'do_clean': '1', 'do_cleanall': '1', 'do_checkuri': '1', 'do_checkuriall': '1'}}"
# PSEUDO_BUILD=0
PSEUDO_BUILD="0"
# FILES_SOLIBSDEV=${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}
FILES_SOLIBSDEV="/lib/lib*.so /usr/lib/lib*.so"
# HOST_LOADLIBES=-lncurses
HOST_LOADLIBES="-lncurses"
# BB_BASEHASH_task-do_populate_sysroot_setscene=3bdcbad02cc5fbfdbf0709766880eac2
BB_BASEHASH_task-do_populate_sysroot_setscene="3bdcbad02cc5fbfdbf0709766880eac2"
# PREFERRED_PROVIDER_virtual/update-alternatives=update-alternatives-cworth
PREFERRED_PROVIDER_virtual/update-alternatives="update-alternatives-cworth"
# DOTDEBUG-dbg=${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${BPN}/.debug ${libdir}/matchbox-panel/.debug /usr/src/debug
DOTDEBUG-dbg="/usr/bin/.debug /usr/sbin/.debug /usr/libexec/.debug /usr/lib/.debug /bin/.debug /sbin/.debug /lib/.debug /usr/lib/linux-xilinx/.debug /usr/lib/matchbox-panel/.debug /usr/src/debug"
# PACKAGE_ARCHS=all any noarch ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}
PACKAGE_ARCHS="all any noarch powerpc-nf ppc440 virtex5"
# PACKAGE_ARCH=${MACHINE_ARCH}
PACKAGE_ARCH="virtex5"
# EXTRA_OECONF=
# SHLIBSWORKDIR=${WORKDIR}/shlibs
SHLIBSWORKDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/shlibs"
# PRAUTOINX=${PF}
PRAUTOINX="linux-xilinx-3.3.0-r0"
# BUILD_LD_ARCH=
# BB_BASEHASH_task-do_fetchall=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_fetchall="fdc376fd264c2fc126ec182f0a53ca8a"
# RPROVIDES=
# RPMDEPS=${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps-oecore --macros ${STAGING_LIBDIR_NATIVE}/rpm/macros --define '_rpmfc_magic_path ${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc' --rpmpopt ${STAGING_LIBDIR_NATIVE}/rpm/rpmpopt
RPMDEPS="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/rpmdeps-oecore --macros /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/macros --define '_rpmfc_magic_path /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share/misc/magic.mgc' --rpmpopt /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/rpmpopt"
# base_libdir_nativesdk=/lib
base_libdir_nativesdk="/lib"
# PACKAGEFUNCS=package_get_auto_pr perform_packagecopy ${PACKAGE_PREPROCESS_FUNCS} package_do_split_locales split_and_strip_files fixup_perms populate_packages package_do_filedeps package_do_shlibs package_do_pkgconfig read_shlibdeps package_depchains emit_pkgdata do_package_qa
PACKAGEFUNCS="package_get_auto_pr perform_packagecopy kernel_package_preprocess package_do_split_locales split_and_strip_files fixup_perms populate_packages package_do_filedeps package_do_shlibs package_do_pkgconfig read_shlibdeps package_depchains emit_pkgdata do_package_qa"
# PWD=/tool/yocto/poky/build
export PWD="/tool/yocto/poky/build"
# BZRDIR=${CO_DIR}/bzr
BZRDIR="/tool/yocto/poky/build/downloads/bzr"
# GPE_SVN=svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=${PN}
GPE_SVN="svn://projects.linuxtogo.org/svn/gpe/trunk/base;module=linux-xilinx"
# EXTENDPKGV=${EXTENDPKGEVER}${PKGV}-${PKGR}
EXTENDPKGV="3.3.0-r0"
# PREFERRED_PROVIDER_virtual/db-native=db-native
PREFERRED_PROVIDER_virtual/db-native="db-native"
# BB_VERSION=1.15.2
BB_VERSION="1.15.2"
# SSTATETASKS=do_deploy do_package_write_rpm do_populate_lic do_package do_populate_sysroot
SSTATETASKS="do_deploy do_package_write_rpm do_populate_lic do_package do_populate_sysroot"
# SOLIBS_darwin=.*.dylib
SOLIBS_darwin=".*.dylib"
# PREFERRED_PROVIDER_virtual/db=db
PREFERRED_PROVIDER_virtual/db="db"
# BP=${BPN}-${PV}
BP="linux-xilinx-3.3.0"
# BBFILE_PATTERN_normal=^/tool/yocto/poky/meta/
BBFILE_PATTERN_normal="^/tool/yocto/poky/meta/"
# PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-for-gcc-nativesdk=${TCLIBC}-nativesdk
PREFERRED_PROVIDER_virtual/x86_64-pokysdk-linux-libc-for-gcc-nativesdk="eglibc-nativesdk"
# module_conf_af_packet=alias net-pf-17 af_packet
module_conf_af_packet="alias net-pf-17 af_packet"
# DEBUGFILEDIRECTORY-dbg=/usr/lib/debug /usr/src/debug
DEBUGFILEDIRECTORY-dbg="/usr/lib/debug /usr/src/debug"
# PREFERRED_VERSION_uclibc=${UCLIBCVERSION}
PREFERRED_VERSION_uclibc="0.9.33"
# PREFERRED_PROVIDER_xf86-video-intel=xf86-video-intel
PREFERRED_PROVIDER_xf86-video-intel="xf86-video-intel"
# module_conf_l2cap=alias bt-proto-0 l2cap
module_conf_l2cap="alias bt-proto-0 l2cap"
# BB_GENERATE_MIRROR_TARBALLS=0
BB_GENERATE_MIRROR_TARBALLS="0"
# SOURCE_MIRROR_FETCH=None
# PSEUDO_PASSWD=${STAGING_DIR_TARGET}
PSEUDO_PASSWD="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# T=${WORKDIR}/temp
T="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp"
# LINKER_HASH_STYLE_mips64=sysv
LINKER_HASH_STYLE_mips64="sysv"
# COMMERCIAL_VIDEO_PLUGINS=
# BUILD_CC_ARCH=
# PREFERRED_VERSION=None
# LINUXLIBCVERSION=3.4
LINUXLIBCVERSION="3.4"
# SUMMARY_${PN}-staticdev=None
# SECTION_linux-xilinx-dev=devel
SECTION_linux-xilinx-dev="devel"
# FILES_${PN}-bin=None
# BB_BASEHASH_task-do_build=fdc376fd264c2fc126ec182f0a53ca8a
BB_BASEHASH_task-do_build="fdc376fd264c2fc126ec182f0a53ca8a"
# MIRRORS=ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ${DEBIAN_MIRROR}/main http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool/ \n ${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.hr.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.fi.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.hk.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.hu.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.ie.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.it.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.jp.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.no.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.pl.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.ro.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.si.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.es.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool \n ${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool \n ${GNU_MIRROR} ftp://mirrors.kernel.org/gnu \n ${KERNELORG_MIRROR} http://www.kernel.org/pub \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/ \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/ \n ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ \n ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnutls.org/pub/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://josefsson.org/gnutls/releases/ \n http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tau.ac.il/pub/unix/admin/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.kaizo.org/pub/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n http://www.apache.org/dist http://archive.apache.org/dist \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://sources.openembedded.org/ \n svn://.*/.* http://sources.openembedded.org/ \n git://.*/.* http://sources.openembedded.org/ \n hg://.*/.* http://sources.openembedded.org/ \n bzr://.*/.* http://sources.openembedded.org/ \n svk://.*/.* http://sources.openembedded.org/ \n p4://.*/.* http://sources.openembedded.org/ \n osc://.*/.* http://sources.openembedded.org/ \n https?$://.*/.* http://sources.openembedded.org/ \n ftp://.*/.* http://sources.openembedded.org/ \n
MIRRORS="ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ftp://ftp.debian.org/debian/pool/main http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool/ \n ftp://ftp.debian.org/debian/pool ftp://ftp.de.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.au.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.cl.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.hr.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.fi.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.hk.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.hu.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.ie.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.it.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.jp.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.no.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.pl.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.ro.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.si.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.es.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.se.debian.org/debian/pool \n ftp://ftp.debian.org/debian/pool ftp://ftp.tr.debian.org/debian/pool \n ftp://ftp.gnu.org/gnu ftp://mirrors.kernel.org/gnu \n http://kernel.org/pub http://www.kernel.org/pub \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/ \n ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/ \n ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ \n ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnutls.org/pub/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \n ftp://ftp.gnutls.org/pub/gnutls http://josefsson.org/gnutls/releases/ \n http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/ \n http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tau.ac.il/pub/unix/admin/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.kaizo.org/pub/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n http://www.apache.org/dist http://archive.apache.org/dist \n cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n svk://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n cvs://.*/.* http://sources.openembedded.org/ \n svn://.*/.* http://sources.openembedded.org/ \n git://.*/.* http://sources.openembedded.org/ \n hg://.*/.* http://sources.openembedded.org/ \n bzr://.*/.* http://sources.openembedded.org/ \n svk://.*/.* http://sources.openembedded.org/ \n p4://.*/.* http://sources.openembedded.org/ \n osc://.*/.* http://sources.openembedded.org/ \n https?$://.*/.* http://sources.openembedded.org/ \n ftp://.*/.* http://sources.openembedded.org/ \n"
# LOG_DIR=${TMPDIR}/log
LOG_DIR="/tool/yocto/poky/build/tmp/log"
# DEPCHAIN_PRE=
# GNOME_GIT=git://git.gnome.org
GNOME_GIT="git://git.gnome.org"
# NO32LIBS=1
NO32LIBS="1"
# PACKAGE_EXTRA_ARCHS_tune-ppc440=${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} ppc440
PACKAGE_EXTRA_ARCHS_tune-ppc440="powerpc-nf ppc440"
# PREFERRED_PROVIDER_gzip-native=pigz-native
PREFERRED_PROVIDER_gzip-native="pigz-native"
# _=/tool/yocto/poky/scripts/bitbake
_="/tool/yocto/poky/scripts/bitbake"
# PREFERRED_VERSION_u-boot_virtex5=None
# PREFERRED_PROVIDER_virtual/xserver=xserver-xorg
PREFERRED_PROVIDER_virtual/xserver="xserver-xorg"
# SPDXLICENSEMAP=None
# PN=${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}
PN="linux-xilinx"
# FREEDESKTOP_CVS=cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs
FREEDESKTOP_CVS="cvs://anoncvs:anoncvs@anoncvs.freedesktop.org/cvs"
# SANITY_ABIFILE=${TMPDIR}/abi_version
SANITY_ABIFILE="/tool/yocto/poky/build/tmp/abi_version"
# DEBUG_OPTIMIZATION=-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe
DEBUG_OPTIMIZATION="-O -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe"
# libdir_native=${prefix_native}/lib
libdir_native="/usr/lib"
# MACHINE_EXTRA_RRECOMMENDS=
# PATCH_GET=0
export PATCH_GET="0"
# SITE_CONF_VERSION=1
SITE_CONF_VERSION="1"
# CXXFLAGS=${TARGET_CXXFLAGS} -fvisibility-inlines-hidden
export CXXFLAGS="-O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden"
# RDEPENDS_${PN}-dev=None
# PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate=None
# DISPLAY=:0
DISPLAY=":0"
# NM=${HOST_PREFIX}nm
export NM="powerpc-poky-linux-nm"
# SEPPUKU_ADDCOMMENT=None
# DEPENDS= virtual/powerpc-poky-linux-gcc kmod-native virtual/powerpc-poky-linux-gcc update-modules u-boot-mkimage-native dtc-native
DEPENDS="virtual/powerpc-poky-linux-gcc kmod-native virtual/powerpc-poky-linux-gcc update-modules u-boot-mkimage-native dtc-native"
# PREFERRED_PROVIDER_virtual/fakeroot-native=pseudo-native
PREFERRED_PROVIDER_virtual/fakeroot-native="pseudo-native"
# TARGET_LINK_HASH_STYLE=${@['-Wl,--hash-style=gnu',''][d.getVar('LINKER_HASH_STYLE', True) != 'gnu']}
TARGET_LINK_HASH_STYLE="-Wl,--hash-style=gnu"
# DISTRO_FEATURES_BACKFILL=pulseaudio
DISTRO_FEATURES_BACKFILL="pulseaudio"
# AUTO_LIBNAME_PKGS=${PACKAGES}
AUTO_LIBNAME_PKGS="kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-misc kernel-devicetree"
# WORKDIR=${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PF}
WORKDIR="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0"
# BUILDSDK_CFLAGS=${BUILDSDK_CPPFLAGS} ${BUILD_OPTIMIZATION}
BUILDSDK_CFLAGS="-isystem/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/include -O2 -pipe"
# SECTION_linux-xilinx-dbg=devel
SECTION_linux-xilinx-dbg="devel"
# F77=${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}
export F77="powerpc-poky-linux-g77 -m32 -msoft-float -mcpu=440 --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
# DISTRO_FEATURES_LIBC=${DISTRO_FEATURES_LIBC_DEFAULT}
DISTRO_FEATURES_LIBC="ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc libc-posix-wchar-io"
# SDK_AS_ARCH=${BUILD_AS_ARCH}
# GNOME_KEYRING_PID=4294
GNOME_KEYRING_PID="4294"
# BB_HASHFILENAME=${SSTATE_PKGNAME}
BB_HASHFILENAME="sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}"
# SSTATE_PKGARCH=${PACKAGE_ARCH}
SSTATE_PKGARCH="virtex5"
# METADATA_REVISION=${@base_detect_revision(d)}
METADATA_REVISION="b876f42821383bf0069ee49b607ba06614417fba"
# UBOOT_ARCH=${@map_uboot_arch(d.getVar('ARCH', True), d)}
export UBOOT_ARCH="ppc"
# EXTRA_IMAGEDEPENDS= u-boot-xilinx
EXTRA_IMAGEDEPENDS="u-boot-xilinx"
# BUILD_STRIP=${BUILD_PREFIX}strip
export BUILD_STRIP="strip"
# libdir_nativesdk=${prefix_nativesdk}/lib
libdir_nativesdk="/usr/lib"
# BB_BASEHASH_task-do_package_setscene=79b3a3c162c8fd538cfa409bb9455043
BB_BASEHASH_task-do_package_setscene="79b3a3c162c8fd538cfa409bb9455043"
# TCLIBCAPPEND=
# STAGING_DIR=${TMPDIR}/sysroots
STAGING_DIR="/tool/yocto/poky/build/tmp/sysroots"
# STAGING_BINDIR_TOOLCHAIN=${STAGING_DIR_NATIVE}${bindir_native}/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}
STAGING_BINDIR_TOOLCHAIN="/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/ppc440-poky-linux"
# FILES_linux-xilinx-dbg=${@d.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory'], True)}
FILES_linux-xilinx-dbg="/usr/bin/.debug /usr/sbin/.debug /usr/libexec/.debug /usr/lib/.debug /bin/.debug /sbin/.debug /lib/.debug /usr/lib/linux-xilinx/.debug /usr/lib/matchbox-panel/.debug /usr/src/debug"
# BB_SIGNATURE_HANDLER=OEBasicHash
BB_SIGNATURE_HANDLER="OEBasicHash"
# LINKER_HASH_STYLE=gnu
LINKER_HASH_STYLE="gnu"
# PREFERRED_VERSION_linux-yocto_qemumips=3.4%
PREFERRED_VERSION_linux-yocto_qemumips="3.4%"
# PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-initial=gcc-cross-initial
PREFERRED_PROVIDER_virtual/powerpc-poky-linux-gcc-initial="gcc-cross-initial"
# VIRTUAL-RUNTIME_alsa-state=alsa-state
VIRTUAL-RUNTIME_alsa-state="alsa-state"
# SSH_AGENT_PID=4340
SSH_AGENT_PID="4340"
# XDG_SESSION_COOKIE=7e784a950e35e8c870d2db2900000013-1340396892.331324-597899210
XDG_SESSION_COOKIE="7e784a950e35e8c870d2db2900000013-1340396892.331324-597899210"
# LICENSE=GPLv2
LICENSE="GPLv2"
# PACKAGES_DYNAMIC=${PN}-locale-* kernel-module-* kernel-image-* kernel-firmware-*
PACKAGES_DYNAMIC="linux-xilinx-locale-* kernel-module-* kernel-image-* kernel-firmware-*"
# LOCALCONF_VERSION=1
LOCALCONF_VERSION="1"
# MULTILIB_VARIANTS=
# TARGET_CC_KERNEL_ARCH=
# PREFERRED_PROVIDER_console-tools=kbd
PREFERRED_PROVIDER_console-tools="kbd"
# SSTATEPREINSTFUNCS=
# SSH_AUTH_SOCK=/tmp/keyring-MhCyXy/ssh
SSH_AUTH_SOCK="/tmp/keyring-MhCyXy/ssh"
# STAGING_DIR_TARGET=${STAGING_DIR}/${MACHINE}
STAGING_DIR_TARGET="/tool/yocto/poky/build/tmp/sysroots/virtex5"
# FILES_linux-xilinx-dev=${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig ${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la ${base_libdir}/*.la
FILES_linux-xilinx-dev="/usr/include /lib/lib*.so /usr/lib/lib*.so /usr/lib/*.la /usr/lib/*.o /usr/lib/pkgconfig /usr/share/pkgconfig /usr/share/aclocal /lib/*.o /usr/lib/linux-xilinx/*.la /lib/*.la"
# PREFERRED_VERSION_gcc-runtime=${GCCVERSION}
PREFERRED_VERSION_gcc-runtime="4.7%"
# OE_IMPORTS= os sys time oe.path oe.utils oe.data oe.packagegroup oe.sstatesig
OE_IMPORTS="os sys time oe.path oe.utils oe.data oe.packagegroup oe.sstatesig"
# AUTOREV=${@bb.fetch2.get_autorev(d)}
AUTOREV="AUTOINC"
# FETCHCOMMAND_svn=/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}
FETCHCOMMAND_svn="/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
# DEPLOY_DIR_DEB=${DEPLOY_DIR}/deb
DEPLOY_DIR_DEB="/tool/yocto/poky/build/tmp/deploy/deb"
# DEPLOY_DIR_RPM=${DEPLOY_DIR}/rpm
DEPLOY_DIR_RPM="/tool/yocto/poky/build/tmp/deploy/rpm"
# PREFERRED_VERSION_eglibc-locale=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-locale="2.15"
# CLEANFUNCS= sstate_cleanall
CLEANFUNCS="sstate_cleanall"
# STAGING_BINDIR_CROSS=${STAGING_BINDIR}/crossscripts
STAGING_BINDIR_CROSS="/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts"
# PALMTOP_USE_MULTITHREADED_QT=None
# PREFERRED_VERSION_eglibc-initial=${EGLIBCVERSION}
PREFERRED_VERSION_eglibc-initial="2.15"
do_fetchall() {
:
}
do_build() {
:
}
resolve_package_rpm() {
local conffile="$1"
shift
local pkg_name=""
for solve in `cat ${conffile}`; do
pkg_name=$(rpm -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --qf "%{packageorigin}\n" "$@" | grep -v "is not installed" || true)
if [ -n "$pkg_name" -a "$pkg_name" != "(none)" ]; then
echo $pkg_name
break;
fi
done
}
do_savedefconfig() {
oe_runmake savedefconfig
}
do_uboot_mkimage() {
if test "xuImage" = "xuImage" ; then
if test ! -e arch/powerpc/boot/uImage ; then
ENTRYPOINT=0x00000000
if test -n "${UBOOT_ENTRYSYMBOL}"; then
ENTRYPOINT=`powerpc-poky-linux-nm /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/vmlinux | \
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
fi
if test -e arch/powerpc/boot/compressed/vmlinux ; then
powerpc-poky-linux-objcopy -O binary -R .note -R .comment -S arch/powerpc/boot/compressed/vmlinux linux.bin
uboot-mkimage -A ppc -O linux -T kernel -C none -a 0x00000000 -e $ENTRYPOINT -n "Yocto (Built by Poky 7.0)/3.3.0/virtex5" -d linux.bin arch/powerpc/boot/uImage
rm -f linux.bin
else
powerpc-poky-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
rm -f linux.bin.gz
gzip -9 linux.bin
uboot-mkimage -A ppc -O linux -T kernel -C gzip -a 0x00000000 -e $ENTRYPOINT -n "Yocto (Built by Poky 7.0)/3.3.0/virtex5" -d linux.bin.gz arch/powerpc/boot/uImage
rm -f linux.bin.gz
fi
fi
fi
}
prelink_image() {
# export PSEUDO_DEBUG=4
# /bin/env | /bin/grep PSEUDO
# echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
# echo "LD_PRELOAD=$LD_PRELOAD"
pre_prelink_size=`du -ks /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs | awk '{size = $1 ; print size }'`
echo "Size before prelinking $pre_prelink_size."
# We need a prelink conf on the filesystem, add one if it's missing
if [ ! -e /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/etc/prelink.conf ]; then
cp /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc/prelink.conf \
/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/etc/prelink.conf
dummy_prelink_conf=true;
else
dummy_prelink_conf=false;
fi
# prelink!
/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/sbin/prelink --root /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs -amR -N -c /etc/prelink.conf
# Remove the prelink.conf if we had to add it.
if [ "$dummy_prelink_conf" = "true" ]; then
rm -f /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/etc/prelink.conf
fi
pre_prelink_size=`du -ks /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs | awk '{size = $1 ; print size }'`
echo "Size after prelinking $pre_prelink_size."
}
do_sizecheck() {
if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
size=`ls -l arch/powerpc/boot/uImage | awk '{ print $5}'`
if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
rm arch/powerpc/boot/uImage
die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
fi
fi
}
bbdebug() {
USAGE='Usage: bbdebug [123] "message"'
if [ $# -lt 2 ]; then
bbfatal "$USAGE"
fi
# Strip off the debug level and ensure it is an integer
DBGLVL=$1; shift
if ! [[ "$DBGLVL" =~ ^[0-9]+ ]]; then
bbfatal "$USAGE"
fi
# All debug output is printed to the logs
echo "DEBUG: $*"
}
package_generate_rpm_conf() {
# Update target packages
package_generate_rpm_conf_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb" base_archs ml_archs
# Update SDK packages
package_generate_rpm_conf_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb-sdk" base_archs
}
oe_machinstall() {
# Purpose: Install machine dependent files, if available
# If not available, check if there is a default
# If no default, just touch the destination
# Example:
# $1 $2 $3 $4
# oe_machinstall -m 0644 fstab /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/etc/fstab
#
# TODO: Check argument number?
#
filename=`basename $3`
dirname=`dirname $3`
for o in `echo linux:powerpc:build-linux:pn-linux-xilinx:virtex5:poky:class-target:forcevariable:libc-glibc | tr ':' ' '`; do
if [ -e $dirname/$o/$filename ]; then
bbnote $dirname/$o/$filename present, installing to $4
install $1 $2 $dirname/$o/$filename $4
return
fi
done
# bbnote overrides specific file NOT present, trying default=$3...
if [ -e $3 ]; then
bbnote $3 present, installing to $4
install $1 $2 $3 $4
else
bbnote $3 NOT present, touching empty $4
touch $4
fi
}
do_install() {
kernel_do_install
if test -n "arch/powerpc/boot/dts/virtex440-ml507.dts"; then
dtc -I dts -O dtb -R 8 -p 0x3000 -o devicetree arch/powerpc/boot/dts/virtex440-ml507.dts
install -m 0644 devicetree /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/devicetree-3.3.0-14.2-build1
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx
install -m 0644 devicetree /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/uImage-3.3.0-r0-virtex5-20120623074715.dtb
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx
rm -f uImage-virtex5.dtb
ln -sf uImage-3.3.0-r0-virtex5-20120623074715.dtb uImage-virtex5.dtb
fi
}
do_configure() {
#first check that the XILINX_BSP_PATH and XILINX_BOARD have been defined in local.conf
#now depending on the board type and arch do what is nessesary
if [ -n "/project/xilinx-ml507-workspace" ]; then
if [ "ml507" != "unknown" ]; then
dts=`find "/project/xilinx-ml507-workspace" -name *.dts -print`
if [ -e "$dts" ]; then
bbnote "Xilinx BSP device tree located in: ${dts}"
if [ "powerpc" = "powerpc" ]; then
bbnote "Replacing linux kernel powerpc device tree to match located hardware model"
cp -pP ${dts} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/arch/powerpc/boot/dts/virtex440-ml507.dts
else
bbnote "Replacing linux kernel microblaze device tree to match located hardware model"
cp -pP ${dts} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/arch/microblaze/platform/generic/440-ml507.dts
fi
else
bbfatal "No device tree found, missing hardware ref design?"
exit 1
fi
else
bbnote "Xilinx board model: ml507"
bbfatal "XILINX_BSP_PATH points to a valid Xilinx XPS project directory? ! Exit"
exit 1
fi
else
bbfatal "XILINX_BSP_PATH not defined ! Exit"
exit 1
fi
kernel_do_configure
}
kernel_package_preprocess() {
rm -rf /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/package/kernel
}
cml1_do_configure() {
set -e
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake oldconfig
}
kernel_do_deploy() {
install -m 0644 arch/powerpc/boot/uImage /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/uImage-3.3.0-r0-virtex5-20120623074715.bin
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
tar -cvzf /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/modules-3.3.0-14.2-build1-r0-virtex5.tgz -C /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image lib
fi
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx
rm -f uImage-virtex5.bin
ln -sf uImage-3.3.0-r0-virtex5-20120623074715.bin uImage-virtex5.bin
ln -sf uImage-3.3.0-r0-virtex5-20120623074715.bin uImage
cp /tool/yocto/poky/meta/files/deploydir_readme.txt /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-linux-xilinx/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
}
pkg_postrm_modules() {
update-modules || true
}
sysroot_stage_dir() {
src="$1"
dest="$2"
# if the src doesn't exist don't do anything
if [ ! -d "$src" ]; then
return
fi
# We only want to stage the contents of $src if it's non-empty so first rmdir $src
# then if it still exists (rmdir on non-empty dir fails) we can copy its contents
rmdir "$src" 2> /dev/null || true
# However we always want to stage a $src itself, even if it's empty
mkdir -p "$dest"
if [ -d "$src" ]; then
tar -cf - -C "$src" -ps . | tar -xf - -C "$dest"
fi
}
do_buildall() {
:
}
pkg_postinst_modules() {
if [ -z "$D" ]; then
depmod -a 3.3.0-14.2-build1
update-modules || true
fi
}
package_update_index_rpm_common() {
rpmconf_base="$1"
shift
createdirs=""
for archvar in "$@"; do
eval archs=\${${archvar}}
packagedirs=""
for arch in $archs; do
packagedirs="/tool/yocto/poky/build/tmp/deploy/rpm/$arch $packagedirs"
rm -rf /tool/yocto/poky/build/tmp/deploy/rpm/$arch/solvedb.done
done
cat /dev/null > ${rpmconf_base}-${archvar}.conf
for pkgdir in $packagedirs; do
if [ -e $pkgdir/ ]; then
echo "Generating solve db for $pkgdir..."
echo $pkgdir/solvedb >> ${rpmconf_base}-${archvar}.conf
createdirs="$createdirs $pkgdir"
fi
done
done
rpm-createsolvedb.py "rpm" $createdirs
}
base_do_configure() {
:
}
create_wrapper() {
# Create a wrapper script
#
# These are useful to work around relocation issues, by setting environment
# variables which point to paths in the filesystem.
#
# Usage: create_wrapper FILENAME [[VAR=VALUE]..]
cmd=$1
shift
echo "Generating wrapper script for $cmd"
mv $cmd $cmd.real
cmdname=`basename $cmd`.real
cat <<END >$cmd
#!/bin/sh
realpath=\`readlink -fn \$0\`
exec env $@ \`dirname \$realpath\`/$cmdname "\$@"
END
chmod +x $cmd
}
bbnote() {
echo "NOTE: $*"
}
do_deploy() {
kernel_do_deploy
}
sstate_create_package() {
cd ${SSTATE_BUILDDIR}
TFILE=`mktemp /tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}.XXXXXXXX`
# Need to handle empty directories
if [ "$(ls -A)" ]; then
tar -czf $TFILE *
else
tar -cz --file=$TFILE --files-from=/dev/null
fi
chmod 0664 $TFILE
mv $TFILE /tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0
rm -rf ${SSTATE_BUILDDIR}
}
bbplain() {
echo "$*"
}
rpm_log_check() {
target="$1"
lf_path="$2"
lf_txt="`cat $lf_path`"
for keyword_die in "Cannot find package" "exit 1" ERR Fail
do
if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
then
echo "log_check: There were error messages in the logfile"
echo -e "log_check: Matched keyword: [$keyword_die]\n"
echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
echo ""
do_exit=1
fi
done
test "$do_exit" = 1 && exit 1
true
}
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
[ -x /sbin/ldconfig ] && /sbin/ldconfig
fi
}
package_update_index_rpm() {
if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
return
fi
# Update target packages
base_archs="all any noarch powerpc-nf ppc440 virtex5"
ml_archs="${MULTILIB_PACKAGE_ARCHS}"
package_update_index_rpm_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb" base_archs ml_archs
# Update SDK packages
base_archs="all any noarch x86_64-nativesdk"
package_update_index_rpm_common "/tool/yocto/poky/build/tmp/deploy/rpm/solvedb-sdk" base_archs
}
kernel_do_configure() {
# fixes extra + in /lib/modules/2.6.37+
# $ scripts/setlocalversion . => +
# $ make kernelversion => 2.6.37
# $ make kernelrelease => 2.6.37+
touch /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.scmversion /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.scmversion
# Copy defconfig to .config if .config does not exist. This allows
# recipes to manage the .config themselves in do_configure_prepend().
if [ -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/defconfig" ] && [ ! -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.config" ]; then
cp "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/defconfig" "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/.config"
fi
yes '' | oe_runmake oldconfig
if [ ! -z "" ]; then
for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do
if [ -e "/tool/yocto/poky/build/tmp/deploy/images/-virtex5.$img" ]; then
cp "/tool/yocto/poky/build/tmp/deploy/images/-virtex5.$img" initramfs.$img
fi
done
fi
}
sysroot_stage_libdir() {
src="$1"
dest="$2"
sysroot_stage_dir $src $dest
}
die() {
bbfatal "$*"
}
base_do_install() {
:
}
do_compile() {
kernel_do_compile
}
autoload_postinst_fragment() {
if [ x"$D" = "x" ]; then
modprobe %s || true
fi
}
kernel_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
oe_runmake include/linux/version.h CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
oe_runmake uImage CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
if test "uImage.gz" = "uImage"; then
gzip -9c < "uImage" > "arch/powerpc/boot/uImage"
fi
}
base_do_package() {
:
}
do_compile_kernelmodules() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake -j 6 modules CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5"
else
bbnote "no modules to compile"
fi
}
oe_soinstall() {
# Purpose: Install shared library file and
# create the necessary links
# Example:
#
# oe_
#
#bbnote installing shared library $1 to $2
#
libname=`basename $1`
install -m 755 $1 $2/$libname
sonamelink=`powerpc-poky-linux-readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
ln -sf $libname $2/$sonamelink
ln -sf $libname $2/$solink
}
create_cmdline_wrapper() {
# Create a wrapper script
#
# These are useful to work around relocation issues, by setting environment
# variables which point to paths in the filesystem.
#
# Usage: create_wrapper FILENAME [[VAR=VALUE]..]
cmd=$1
shift
echo "Generating wrapper script for $cmd"
mv $cmd $cmd.real
cmdname=`basename $cmd`.real
cat <<END >$cmd
#!/bin/sh
realpath=\`readlink -fn \$0\`
exec \`dirname \$realpath\`/$cmdname $@ "\$@"
END
chmod +x $cmd
}
oe_libinstall() {
# Purpose: Install a library, in all its forms
# Example
#
# oe_libinstall libltdl /tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib/
# oe_libinstall -C src/libblah libblah /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image//usr/lib/
dir=""
libtool=""
silent=""
require_static=""
require_shared=""
staging_install=""
while [ "$#" -gt 0 ]; do
case "$1" in
-C)
shift
dir="$1"
;;
-s)
silent=1
;;
-a)
require_static=1
;;
-so)
require_shared=1
;;
-*)
bbfatal "oe_libinstall: unknown option: $1"
;;
*)
break;
;;
esac
shift
done
libname="$1"
shift
destpath="$1"
if [ -z "$destpath" ]; then
bbfatal "oe_libinstall: no destination path specified"
fi
if echo "$destpath/" | egrep '^/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib/' >/dev/null
then
staging_install=1
fi
__runcmd () {
if [ -z "$silent" ]; then
echo >&2 "oe_libinstall: $*"
fi
$*
}
if [ -z "$dir" ]; then
dir=`pwd`
fi
dotlai=$libname.lai
# Sanity check that the libname.lai is unique
number_of_files=`(cd $dir; find . -name "$dotlai") | wc -l`
if [ $number_of_files -gt 1 ]; then
bbfatal "oe_libinstall: $dotlai is not unique in $dir"
fi
dir=$dir`(cd $dir;find . -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"`
olddir=`pwd`
__runcmd cd $dir
lafile=$libname.la
# If such file doesn't exist, try to cut version suffix
if [ ! -f "$lafile" ]; then
libname1=`echo "$libname" | sed 's/-[0-9.]*$//'`
lafile1=$libname.la
if [ -f "$lafile1" ]; then
libname=$libname1
lafile=$lafile1
fi
fi
if [ -f "$lafile" ]; then
# libtool archive
eval `cat $lafile|grep "^library_names="`
libtool=1
else
library_names="$libname.so* $libname.dll.a $libname.*.dylib"
fi
__runcmd install -d $destpath/
dota=$libname.a
if [ -f "$dota" -o -n "$require_static" ]; then
rm -f $destpath/$dota
__runcmd install -m 0644 $dota $destpath/
fi
if [ -f "$dotlai" -a -n "$libtool" ]; then
rm -f $destpath/$libname.la
__runcmd install -m 0644 $dotlai $destpath/$libname.la
fi
for name in $library_names; do
files=`eval echo $name`
for f in $files; do
if [ ! -e "$f" ]; then
if [ -n "$libtool" ]; then
bbfatal "oe_libinstall: $dir/$f not found."
fi
elif [ -L "$f" ]; then
__runcmd cp -P "$f" $destpath/
elif [ ! -L "$f" ]; then
libfile="$f"
rm -f $destpath/$libfile
__runcmd install -m 0755 $libfile $destpath/
fi
done
done
if [ -z "$libfile" ]; then
if [ -n "$require_shared" ]; then
bbfatal "oe_libinstall: unable to locate shared library"
fi
elif [ -z "$libtool" ]; then
# special case hack for non-libtool .so.#.#.# links
baselibfile=`basename "$libfile"`
if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
sonamelink=`powerpc-poky-linux-readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
__runcmd ln -sf $baselibfile $destpath/$sonamelink
fi
__runcmd ln -sf $baselibfile $destpath/$solink
fi
fi
__runcmd cd "$olddir"
}
kernel_do_install() {
#
# First install the modules
#
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image" modules_install
rm -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/modules.order"
rm -f "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/modules.builtin"
rm "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/build"
rm "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/lib/modules/3.3.0-14.2-build1/source"
else
bbnote "no modules to install"
fi
#
# Install various kernel output (zImage, map file, config, module support files)
#
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot
install -m 0644 arch/powerpc/boot/uImage /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/uImage-3.3.0-14.2-build1
install -m 0644 System.map /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/System.map-3.3.0-14.2-build1
install -m 0644 .config /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/config-3.3.0-14.2-build1
install -m 0644 vmlinux /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/vmlinux-3.3.0-14.2-build1
[ -e Module.symvers ] && install -m 0644 Module.symvers /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/boot/Module.symvers-3.3.0-14.2-build1
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/etc/modules-load.d
install -d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/etc/modprobe.d
#
# Support for external module building - create a minimal copy of the
# kernel source tree.
#
kerneldir=/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/kernel
install -d $kerneldir
#
# Store the kernel version in sysroots for module-base.bbclass
#
echo "3.3.0-14.2-build1" > $kerneldir/kernel-abiversion
#
# Store kernel image name to allow use during image generation
#
echo "uImage-3.3.0-r0-virtex5-20120623074715" >$kerneldir/kernel-image-name
#
# Copy the entire source tree. In case an external build directory is
# used, copy the build directory over first, then copy over the source
# dir. This ensures the original Makefiles are used and not the
# redirecting Makefiles in the build directory.
#
# work and sysroots can be on different partitions, so we can't rely on
# hardlinking, unfortunately.
#
cp -fR * $kerneldir
cp .config $kerneldir
if [ "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git" != "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git" ]; then
cp -fR /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/git/* $kerneldir
fi
install -m 0644 arch/powerpc/boot/uImage $kerneldir/uImage
install -m 0644 System.map $kerneldir/System.map-3.3.0-14.2-build1
#
# Clean and remove files not needed for building modules.
# Some distributions go through a lot more trouble to strip out
# unecessary headers, for now, we just prune the obvious bits.
#
# We don't want to leave host-arch binaries in /sysroots, so
# we clean the scripts dir while leaving the generated config
# and include files.
#
oe_runmake -C $kerneldir CC="powerpc-poky-linux-gcc --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" LD="powerpc-poky-linux-ld --sysroot=/tool/yocto/poky/build/tmp/sysroots/virtex5" clean
make -C $kerneldir _mrproper_scripts
find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
# As of Linux kernel version 3.0.1, the clean target removes
# arch/powerpc/lib/crtsavres.o which is present in
# KBUILD_LDFLAGS_MODULE, making it required to build external modules.
if [ powerpc = "powerpc" ]; then
cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
fi
# Remove the following binaries which cause strip errors
# during do_package for cross-compiled platforms
bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
arch/powerpc/boot/mktree"
for entry in $bin_files; do
rm -f $kerneldir/$entry
done
}
base_do_compile() {
if [ -e Makefile -o -e makefile ]; then
oe_runmake || die "make failed"
else
bbnote "nothing to compile"
fi
}
bbfatal() {
echo "ERROR: $*"
exit 1
}
package_install_internal_rpm() {
local target_rootfs="${INSTALL_ROOTFS_RPM}"
local platform="${INSTALL_PLATFORM_RPM}"
local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
local confbase="${INSTALL_CONFBASE_RPM}"
local package_to_install="${INSTALL_PACKAGES_RPM}"
local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}"
local providename="${INSTALL_PROVIDENAME_RPM}"
local task="${INSTALL_TASK_RPM}"
# Setup base system configuration
mkdir -p ${target_rootfs}/etc/rpm/
echo "${platform}-poky-linux" > ${target_rootfs}/etc/rpm/platform
if [ ! -z "$platform_extra" ]; then
for pt in $platform_extra ; do
case $pt in
noarch | any | all)
os="`echo linux | sed "s,-.*,,"`.*"
;;
*)
os="linux"
;;
esac
echo "$pt-.*-$os" >> ${target_rootfs}/etc/rpm/platform
done
fi
# Tell RPM that the "/" directory exist and is available
mkdir -p ${target_rootfs}/etc/rpm/sysinfo
echo "/" >${target_rootfs}/etc/rpm/sysinfo/Dirnames
if [ ! -z "$providename" ]; then
cat /dev/null > ${target_rootfs}/etc/rpm/sysinfo/Providename
for provide in $providename ; do
echo $provide >> ${target_rootfs}/etc/rpm/sysinfo/Providename
done
fi
# Setup manifest of packages to install...
mkdir -p ${target_rootfs}/install
rm -f ${target_rootfs}/install/install.manifest
# Uclibc builds don't provide this stuff...
if [ xlinux = "xlinux" ] || [ xlinux = "xlinux-gnueabi" ] ; then
if [ ! -z "${package_linguas}" ]; then
for pkg in ${package_linguas}; do
echo "Processing $pkg..."
archvar=base_archs
manifest=install.manifest
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
manifest=install_multilib.manifest
break
fi
done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
echo "Unable to find package $pkg ($ml_pkg)!"
exit 1
fi
echo $pkg_name >> ${target_rootfs}/install/${manifest}
done
fi
fi
if [ ! -z "${package_to_install}" ]; then
for pkg in ${package_to_install} ; do
echo "Processing $pkg..."
archvar=base_archs
manifest=install.manifest
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
manifest=install_multilib.manifest
break
fi
done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
echo "Unable to find package $pkg ($ml_pkg)!"
exit 1
fi
echo $pkg_name >> ${target_rootfs}/install/${manifest}
done
fi
# Normal package installation
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
if [ -s ${target_rootfs}/install/install.manifest ]; then
echo "# Install manifest padding" >> ${target_rootfs}/install/install.manifest
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-base_archs.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/install.manifest
fi
if [ ! -z "${package_attemptonly}" ]; then
echo "Adding attempt only packages..."
for pkg in ${package_attemptonly} ; do
echo "Processing $pkg..."
archvar=base_archs
ml_prefix=`echo ${pkg} | cut -d'-' -f1`
ml_pkg=$pkg
for i in ${MULTILIB_PREFIX_LIST} ; do
if [ ${ml_prefix} = ${i} ]; then
ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
archvar=ml_archs
break
fi
done
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${ml_pkg})
if [ -z "$pkg_name" ]; then
echo "Note: Unable to find package $pkg ($ml_pkg) -- PACKAGE_INSTALL_ATTEMPTONLY"
continue
fi
echo "Attempting $pkg_name..." >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_attemptonly.${PID}"
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
$pkg_name >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_attemptonly.${PID}" || true
done
fi
#### Note: 'Recommends' is an arbitrary tag that means _SUGGESTS_ in OE-core..
# Add any recommended packages to the image
# RPM does not solve for recommended packages because they are optional...
# So we query them and tree them like the ATTEMPTONLY packages above...
# Change the loop to "1" to run this code...
loop=0
if [ $loop -eq 1 ]; then
echo "Processing recommended packages..."
cat /dev/null > ${target_rootfs}/install/recommend.list
while [ $loop -eq 1 ]; do
# Dump the full set of recommends...
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-qa --qf "[%{RECOMMENDS}\n]" | sort -u > ${target_rootfs}/install/recommend
# Did we add more to the list?
grep -v -x -F -f ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend > ${target_rootfs}/install/recommend.new || true
# We don't want to loop unless there is a change to the list!
loop=0
cat ${target_rootfs}/install/recommend.new | \
while read pkg ; do
# Ohh there was a new one, we'll need to loop again...
loop=1
echo "Processing $pkg..."
found=0
for archvar in base_archs ml_archs ; do
pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${pkg})
if [ -n "$pkg_name" ]; then
found=1
break
fi
done
if [ $found -eq 0 ]; then
echo "Note: Unable to find package $pkg -- suggests"
echo "Unable to find package $pkg." >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_recommend.${PID}"
continue
fi
echo "Attempting $pkg_name..." >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_{task}_recommend.${PID}"
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync private" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
$pkg_name >> "/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/log.do_${task}_recommend.${PID}" 2>&1 || true
done
cat ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend.new | sort -u > ${target_rootfs}/install/recommend.new.list
mv -f ${target_rootfs}/install/recommend.new.list ${target_rootfs}/install/recommend.list
rm ${target_rootfs}/install/recommend ${target_rootfs}/install/recommend.new
done
fi
# Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install.manifest"
rpm -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
--root "${target_rootfs}/install" \
-D "__dbi_txn create nofsync private" \
> ${target_rootfs}/install/install_solution.manifest
touch ${target_rootfs}/install/install_multilib_solution.manifest
if [ -s "${target_rootfs}/install/install_multilib.manifest" ]; then
# multilib package installation
echo "# Install multilib manifest padding" >> ${target_rootfs}/install/install_multilib.manifest
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-ml_archs.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/install_multilib.manifest
# Now that we have a solution, pull out a list of what to install...
echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
rpm -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
--root "${target_rootfs}/install" \
-D "__dbi_txn create nofsync private" \
> ${target_rootfs}/install/install_multilib_solution.manifest
fi
cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest
cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest
# Construct install scriptlet wrapper
cat << EOF > /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/scriptlet_wrapper
#!/bin/bash
export PATH="/tool/yocto/poky/scripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/ppc440-poky-linux:/tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/sbin:/tool/yocto/poky/build/tmp/sysroots/x86_64-linux//bin:/tool/yocto/poky/scripts:/tool/yocto/poky/bitbake/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
export D="${target_rootfs}"
export OFFLINE_ROOT="\$D"
export IPKG_OFFLINE_ROOT="\$D"
export OPKG_OFFLINE_ROOT="\$D"
\$2 \$1/\$3 \$4
if [ \$? -ne 0 ]; then
mkdir -p \$1/etc/rpm-postinsts
num=100
while [ -e \$1/etc/rpm-postinsts/\${num} ]; do num=\$((num + 1)); done
echo "#!\$2" > \$1/etc/rpm-postinsts/\${num}
echo "# Arg: \$4" >> \$1/etc/rpm-postinsts/\${num}
cat \$1/\$3 >> \$1/etc/rpm-postinsts/\${num}
chmod +x \$1/etc/rpm-postinsts/\${num}
fi
EOF
chmod 0755 /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/scriptlet_wrapper
# Configure RPM... we enforce these settings!
mkdir -p ${target_rootfs}${rpmlibdir}
mkdir -p ${target_rootfs}${rpmlibdir}/log
# After change the __db.* cache size, log file will not be generated automatically,
# that will raise some warnings, so touch a bare log for rpm write into it.
touch ${target_rootfs}${rpmlibdir}/log/log.0000000001
cat > ${target_rootfs}${rpmlibdir}/DB_CONFIG << EOF
# ================ Environment
set_data_dir .
set_create_dir .
set_lg_dir ./log
set_tmp_dir ./tmp
set_flags db_log_autoremove on
# -- thread_count must be >= 8
set_thread_count 64
# ================ Logging
# ================ Memory Pool
set_cachesize 0 1048576 0
set_mp_mmapsize 268435456
# ================ Locking
set_lk_max_locks 16384
set_lk_max_lockers 16384
set_lk_max_objects 16384
mutex_set_max 163840
# ================ Replication
EOF
# RPM is special. It can't handle dependencies and preinstall scripts correctly. Its
# probably a feature. The only way to convince rpm to actually run the preinstall scripts
# for base-passwd and shadow first before installing packages that depend on these packages
# is to do two image installs, installing one set of packages, then the other.
if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
echo "Skipping pre install due to exisitng image"
else
rm -f ${target_rootfs}/install/initial_install.manifest
echo "Installing base dependencies first (base-passwd, base-files and shadow) since rpm is special"
grep /base-passwd-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
grep /base-files-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
grep /shadow-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
if [ -s ${target_rootfs}/install/initial_install.manifest ]; then
echo "# Initial Install manifest padding..." >> ${target_rootfs}/install/initial_install.manifest
# Generate an install solution by doing a --justdb install, then recreate it with
# an actual package install!
mkdir -p ${target_rootfs}/initial
rpm --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
--root "${target_rootfs}/install" \
-D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}.macro`" \
-D "__dbi_txn create nofsync" \
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
${target_rootfs}/install/initial_install.manifest
rpm -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
-D "__dbi_txn create nofsync private" \
--root "${target_rootfs}/install" \
> ${target_rootfs}/install/initial_solution.manifest
rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
grep -Fv -f ${target_rootfs}/install/initial_solution.manifest ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution.manifest.new
mv ${target_rootfs}/install/total_solution.manifest.new ${target_rootfs}/install/total_solution.manifest
rm -rf ${target_rootfs}/initial
fi
fi
echo "Installing main solution manifest (${target_rootfs}/install/total_solution.manifest)"
rpm_update_pkg ${target_rootfs}/install/total_solution.manifest
}
bbwarn() {
echo "WARNING: $*"
}
rpm_common_comand() {
local target_rootfs="${INSTALL_ROOTFS_RPM}"
rpm --root ${target_rootfs} \
--predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
-D "_var /var" \
-D "_dbpath ${rpmlibdir}" \
-D "_tmppath /install/tmp" \
--noparentdirs --nolinktos \
-D "__dbi_txn create nofsync private" \
-D "_cross_scriptlet_wrapper /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/scriptlet_wrapper" $@
}
do_package_write() {
:
}
rpm_update_pkg() {
manifest=$1
btmanifest=$manifest.bt.manifest
pre_btmanifest=/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp/${btmanifest##/*/}
local target_rootfs="${INSTALL_ROOTFS_RPM}"
# Save the rpm's build time for incremental image generation, and the file
# would be moved to /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/temp
for i in `cat $manifest`; do
# Use "rpm" rather than "rpm" here, since we don't need the
# '--dbpath' option
echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
done | sort -u > $btmanifest
# Only install the different pkgs if incremental image generation is set
if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
"rpm" = "rpm" ]; then
comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
${target_rootfs}/install/remove.manifest
comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
${target_rootfs}/install/incremental.manifest
# Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
# been run by now, so don't have to run them(preun, postun, etc.) when
# erase the pkg
if [ -s ${target_rootfs}/install/remove.manifest ]; then
rpm_common_comand --noscripts --nodeps \
-e `cat ${target_rootfs}/install/remove.manifest`
fi
# Attempt to install the incremental pkgs
if [ -s ${target_rootfs}/install/incremental.manifest ]; then
rpm_common_comand --nodeps --replacefiles --replacepkgs \
-Uvh ${target_rootfs}/install/incremental.manifest
fi
else
# Attempt to install
rpm_common_comand --replacepkgs -Uhv $manifest
fi
}
sysroot_stage_dirs() {
from="$1"
to="$2"
sysroot_stage_dir $from/usr/include $to/usr/include
if [ "x86_64-linux" = "powerpc-poky-linux" ]; then
sysroot_stage_dir $from/usr/bin $to/usr/bin
sysroot_stage_dir $from/usr/sbin $to/usr/sbin
sysroot_stage_dir $from/bin $to/bin
sysroot_stage_dir $from/sbin $to/sbin
sysroot_stage_dir $from/usr/libexec $to/usr/libexec
sysroot_stage_dir $from/etc $to/etc
sysroot_stage_dir $from/var $to/var
fi
if [ -d $from/usr/lib ]
then
sysroot_stage_libdir $from//usr/lib $to/usr/lib
fi
if [ -d $from/lib ]
then
sysroot_stage_libdir $from/lib $to/lib
fi
sysroot_stage_dir $from/usr/share $to/usr/share
}
do_checkuriall() {
:
}
packagedstaging_fastpath() {
:
}
sstate_unpack_package() {
mkdir -p ${SSTATE_INSTDIR}
cd ${SSTATE_INSTDIR}
tar -xvzf /tool/yocto/poky/build/sstate-cache/sstate-linux-xilinx-virtex5-poky-linux-3.3.0-r0-virtex5-2-${BB_TASKHASH}
}
package_generate_rpm_conf_common() {
rpmconf_base="$1"
shift
printf "_solve_dbpath " > ${rpmconf_base}.macro
o_colon="false"
for archvar in "$@"; do
printf "_solve_dbpath " > ${rpmconf_base}-${archvar}.macro
colon="false"
for each in `cat ${rpmconf_base}-${archvar}.conf` ; do
if [ "$o_colon" = "true" ]; then
printf ":" >> ${rpmconf_base}.macro
fi
if [ "$colon" = "true" ]; then
printf ":" >> ${rpmconf_base}-${archvar}.macro
fi
printf "%s" $each >> ${rpmconf_base}.macro
o_colon="true"
printf "%s" $each >> ${rpmconf_base}-${archvar}.macro
colon="true"
done
printf "\n" >> ${rpmconf_base}-${archvar}.macro
done
printf "\n" >> ${rpmconf_base}.macro
}
sysroot_stage_all() {
sysroot_stage_dirs /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir/
sysroot_stage_dir /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/image/kernel /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir//kernel
}
license_create_manifest() {
mkdir -p /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715
# Get list of installed packages
list_installed_packages | grep -v "locale" |sort > /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/package.manifest
INSTALLED_PKGS=`cat /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/package.manifest`
# remove existing license.manifest file
if [ -f /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest ]; then
rm /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
fi
# list of installed packages is broken for deb
for pkg in ${INSTALLED_PKGS}; do
# not the best way to do this but licenses are not arch dependant iirc
filename=`ls /tool/yocto/poky/build/tmp/pkgdata/*/runtime/${pkg}| head -1`
pkged_pn="$(sed -n 's/^PN: //p' ${filename})"
pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
# check to see if the package name exists in the manifest. if so, bail.
if ! grep -q "PACKAGE NAME: ${pkg}" ${filename}; then
# exclude local recipes
if [ ! "${pkged_pn}" = "*locale*" ]; then
echo "PACKAGE NAME:" ${pkg} >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
echo "PACKAGE VERSION:" ${pkged_pv} >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
echo "RECIPE NAME:" ${pkged_pn} >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
echo "LICENSE: " >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
for lic in ${pkged_lic}; do
if [ -e "/tool/yocto/poky/build/tmp/deploy/licenses/${pkged_pn}/generic_${lic}" ]; then
echo ${lic}|sed s'/generic_//'g >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
else
echo "WARNING: The license listed, " ${lic} " was not in the licenses collected for " ${pkged_pn}>> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
fi
done
echo "" >> /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest
fi
fi
done
# Two options here:
# - Just copy the manifest
# - Copy the manifest and the license directories
# With both options set we see a .5 M increase in core-image-minimal
if [ -n "${COPY_LIC_MANIFEST}" ]; then
mkdir -p /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/
cp /tool/yocto/poky/build/tmp/deploy/licenses/linux-xilinx-virtex5-20120623074715/license.manifest /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/license.manifest
if [ -n "${COPY_LIC_DIRS}" ]; then
for pkg in ${INSTALLED_PKGS}; do
mkdir -p /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${pkg}
for lic in `ls /tool/yocto/poky/build/tmp/deploy/licenses/${pkg}`; do
# Really don't need to copy the generics as they're
# represented in the manifest and in the actual pkg licenses
# Doing so would make your image quite a bit larger
if [[ "${lic}" != "generic_"* ]]; then
cp /tool/yocto/poky/build/tmp/deploy/licenses/${pkg}/${lic} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${pkg}/${lic}
elif [[ "${lic}" == "generic_"* ]]; then
if [ ! -f /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${lic} ]; then
cp /tool/yocto/poky/build/tmp/deploy/licenses/${pkg}/${lic} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/
fi
ln -s ../${lic} /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs/usr/share/common-licenses/${pkg}/${lic}
fi
done
done
fi
fi
}
mklibs_optimize_image() {
for img in ${MKLIBS_OPTIMIZED_IMAGES}
do
if [ "${img}" = "linux-xilinx" ] || [ "${img}" = "all" ]
then
mklibs_optimize_image_doit
break
fi
done
}
oe_runmake() {
if [ x"$MAKE" = x ]; then MAKE=make; fi
bbnote make "$@"
make "$@" || die "oe_runmake failed"
}
bberror() {
echo "ERROR: $*"
}
mklibs_optimize_image_doit() {
rm -rf /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs
mkdir -p /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/dest
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs
du -bs > /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.before.mklibs.txt
for i in `find .`; do file $i; done \
| grep ELF \
| grep "LSB executable" \
| grep "dynamically linked" \
| sed "s/:.*//" \
| sed "s+^\./++" \
> /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/executables.list
case powerpc in
powerpc | mips | microblaze )
dynamic_loader="/lib/ld.so.1"
;;
powerpc64)
dynamic_loader="/lib/ld64.so.1"
;;
x86_64)
dynamic_loader="/lib/ld-linux-x86-64.so.2"
;;
i586 )
dynamic_loader="/lib/ld-linux.so.2"
;;
arm )
dynamic_loader="/lib/ld-linux.so.3"
;;
* )
dynamic_loader="/unknown_dynamic_linker"
;;
esac
mklibs -v \
--ldlib ${dynamic_loader} \
--sysroot /tool/yocto/poky/build/tmp/sysroots/virtex5 \
--root /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs \
--target `echo powerpc-poky-linux- | sed 's/-$//' ` \
-d /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/dest \
`cat /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/executables.list`
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/dest
for i in *
do
cp $i `find /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs -name $i`
done
cd /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/rootfs
du -bs > /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.after.mklibs.txt
echo rootfs size before mklibs optimization: `cat /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.before.mklibs.txt`
echo rootfs size after mklibs optimization: `cat /tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/mklibs/du.after.mklibs.txt`
}
python do_devshell () {
oe_terminal(d.getVar('SHELL', True), 'OpenEmbedded Developer Shell', d)
}
python oe_import_eh () {
if isinstance(e, bb.event.ConfigParsed):
oe_import(e.data)
}
python package_qa_check_unsafe_references_in_scripts () {
def package_qa_check_unsafe_references_in_scripts(path, name, d, elf, messages):
"""
Warn if scripts in base_[bindir|sbindir|libdir] reference files under exec_prefix
"""
if unsafe_references_skippable(path, name, d):
return
if not elf:
import stat
import subprocess
pn = d.getVar('PN', True)
# Ensure we're checking an executable script
statinfo = os.stat(path)
if bool(statinfo.st_mode & stat.S_IXUSR):
# grep shell scripts for possible references to /exec_prefix/
exec_prefix = d.getVar('exec_prefix', True)
statement = "grep -e '%s/' %s > /dev/null" % (exec_prefix, path)
if subprocess.call(statement, shell=True) == 0:
error_msg = pn + ": Found a reference to %s/ in %s" % (exec_prefix, path)
package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
error_msg = "Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix"
package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
}
python gen_packagevar () {
def gen_packagevar(d):
ret = []
pkgs = (d.getVar("PACKAGES", True) or "").split()
vars = (d.getVar("PACKAGEVARS", True) or "").split()
for p in pkgs:
for v in vars:
ret.append(v + "_" + p)
return " ".join(ret)
}
python check_connectivity () {
def check_connectivity(d):
# URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
# using the same syntax as for SRC_URI. If the variable is not set
# the check is skipped
test_uris = (d.getVar('CONNECTIVITY_CHECK_URIS', True) or "").split()
retval = ""
# Only check connectivity if network enabled and the
# CONNECTIVITY_CHECK_URIS are set
network_enabled = not d.getVar('BB_NO_NETWORK', True)
check_enabled = len(test_uris)
# Take a copy of the data store and unset MIRRORS and PREMIRROS
data = bb.data.createCopy(d)
data.delVar('PREMIRRORS')
data.delVar('MIRRORS')
if check_enabled and network_enabled:
try:
fetcher = bb.fetch2.Fetch(test_uris, data)
fetcher.checkstatus()
except Exception:
# Allow the message to be configured so that users can be
# pointed to a support mechanism.
msg = data.getVar('CONNECTIVITY_CHECK_MSG', True) or ""
if len(msg) == 0:
msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n"
retval = msg
return retval
}
python do_cleansstate () {
sstate_clean_cachefiles(d)
}
python package_rpm_fn () {
d.setVar('PKGFN', d.getVar('PKG'))
}
python get_libc_locales_dependencies () {
def get_libc_locales_dependencies(d):
if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''
else:
return ''}
python get_kernelversion () {
def get_kernelversion(p):
import re
fn = p + '/include/linux/utsrelease.h'
if not os.path.isfile(fn):
# after 2.6.33-rc1
fn = p + '/include/generated/utsrelease.h'
if not os.path.isfile(fn):
fn = p + '/include/linux/version.h'
import re
try:
f = open(fn, 'r')
except IOError:
return None
l = f.readlines()
f.close()
r = re.compile("#define UTS_RELEASE \"(.*)\"")
for s in l:
m = r.match(s)
if m:
return m.group(1)
return None
}
python splitfile2 () {
def splitfile2(debugsrcdir, d):
# Function to split a single file, called from split_and_strip_files below
#
# The debug src information processed in the splitfile2 is further procecessed
# and copied to the destination here.
import commands, stat, subprocess
sourcefile = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/debugsources.list")
if debugsrcdir and os.path.isfile(sourcefile):
dvar = d.getVar('PKGD', True)
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
strip = d.getVar("STRIP", True)
objcopy = d.getVar("OBJCOPY", True)
debugedit = d.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR", True)
workparentdir = os.path.dirname(workdir)
workbasedir = os.path.basename(workdir)
nosuchdir = []
basepath = dvar
for p in debugsrcdir.split("/"):
basepath = basepath + "/" + p
if not os.path.exists(basepath):
nosuchdir.append(basepath)
bb.mkdirhier(basepath)
processdebugsrc = "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
# We need to ignore files that are not actually ours
# we do this by only paying attention to items from this package
processdebugsrc += "fgrep -z '%s' | "
processdebugsrc += "(cd '%s' ; cpio -pd0mL --no-preserve-owner '%s%s' 2>/dev/null)"
subprocess.call(processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir), shell=True)
# The copy by cpio may have resulted in some empty directories! Remove these
for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)):
for d in dirs:
dir = os.path.join(root, d)
#bb.note("rmdir -p %s" % dir)
subprocess.call("rmdir -p %s 2>/dev/null" % dir, shell=True)
# Also remove debugsrcdir if its empty
for p in nosuchdir[::-1]:
if os.path.exists(p) and not os.listdir(p):
os.rmdir(p)
}
python return_spdx () {
def return_spdx(d, license):
"""
This function returns the spdx mapping of a license.
"""
if d.getVarFlag('SPDXLICENSEMAP', license) != None:
return license
else:
return d.getVarFlag('SPDXLICENSEMAP', license_type)
}
python base_version_less_or_equal () {
def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
}
python get_cputime () {
def get_cputime():
fields = open("/proc/stat", "r").readline().rstrip().split()[1:]
return sum(int(field) for field in fields)
}
python base_do_patch () {
bb.build.exec_func('patch_do_patch', d)
}
python runtime_mapping_rename () {
def runtime_mapping_rename (varname, d):
#bb.note("%s before: %s" % (varname, d.getVar(varname, True)))
new_depends = []
deps = bb.utils.explode_dep_versions(d.getVar(varname, True) or "")
for depend in deps:
# Have to be careful with any version component of the depend
new_depend = get_package_mapping(depend, d)
if deps[depend]:
new_depends.append("%s (%s)" % (new_depend, deps[depend]))
else:
new_depends.append(new_depend)
d.setVar(varname, " ".join(new_depends) or None)
#bb.note("%s after: %s" % (varname, d.getVar(varname, True)))
}
python split_and_strip_files () {
import commands, stat, errno, subprocess
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
# We default to '.debug' style
if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory':
# Single debug-file-directory style debug info
debugappend = ".debug"
debugdir = ""
debuglibdir = "/usr/lib/debug"
debugsrcdir = "/usr/src/debug"
else:
# Original OE-core, a.k.a. ".debug", style debug info
debugappend = ""
debugdir = "/.debug"
debuglibdir = ""
debugsrcdir = "/usr/src/debug"
os.chdir(dvar)
# Return type (bits):
# 0 - not elf
# 1 - ELF
# 2 - stripped
# 4 - executable
# 8 - shared library
def isELF(path):
type = 0
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
if ret:
bb.error("split_and_strip_files: 'file %s' failed" % path)
return type
# Not stripped
if "ELF" in result:
type |= 1
if "not stripped" not in result:
type |= 2
if "executable" in result:
type |= 4
if "shared" in result:
type |= 8
return type
#
# First lets figure out all of the files we may have to process ... do this only once!
#
file_list = {}
file_links = {}
if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \
(d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
# Only process files (and symlinks)... Skip files that are obviously debug files
if not (debugappend != "" and file.endswith(debugappend)) and \
not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and \
os.path.isfile(file):
try:
s = os.stat(file)
except OSError, (err, strerror):
if err != errno.ENOENT:
raise
# Skip broken symlinks
continue
# Is the item excutable? Then we need to process it.
if (s[stat.ST_MODE] & stat.S_IXUSR) or \
(s[stat.ST_MODE] & stat.S_IXGRP) or \
(s[stat.ST_MODE] & stat.S_IXOTH):
# If it's a symlink, and points to an ELF file, we capture the readlink target
if os.path.islink(file):
target = os.readlink(file)
if not os.path.isabs(target):
ltarget = os.path.join(os.path.dirname(file), target)
else:
ltarget = target
if isELF(ltarget):
#bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget)))
file_list[file] = "sym: " + target
continue
# It's a file (or hardlink), not a link
# ...but is it ELF, and is it already stripped?
elf_file = isELF(file)
if elf_file & 1:
# Check if it's a hard link to something else
if s.st_nlink > 1:
file_reference = "%d_%d" % (s.st_dev, s.st_ino)
# Hard link to something else
file_list[file] = "hard: " + file_reference
continue
file_list[file] = "ELF: %d" % elf_file
#
# First lets process debug splitting
#
if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1'):
for file in file_list:
src = file[len(dvar):]
dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
fpath = dvar + dest
# Preserve symlinks in debug area...
if file_list[file].startswith("sym: "):
ltarget = file_list[file][5:]
lpath = os.path.dirname(ltarget)
lbase = os.path.basename(ltarget)
ftarget = ""
if lpath and lpath != ".":
ftarget += lpath + debugdir + "/"
ftarget += lbase + debugappend
if lpath.startswith(".."):
ftarget = os.path.join("..", ftarget)
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Symlink %s -> %s" % (fpath, ftarget))
os.symlink(ftarget, fpath)
continue
# Preserve hard links in debug area...
file_reference = ""
if file_list[file].startswith("hard: "):
file_reference = file_list[file][6:]
if file_reference not in file_links:
# If this is a new file, add it as a reference, and
# update it's type, so we can fall through and split
file_list[file] = "ELF: %d" % (isELF(file))
else:
target = file_links[file_reference][len(dvar):]
ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Link %s -> %s" % (fpath, ftarget))
os.link(ftarget, fpath)
continue
# It's ELF...
if file_list[file].startswith("ELF: "):
elf_file = int(file_list[file][5:])
if elf_file & 2:
bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (src, pn))
continue
# Split the file...
bb.mkdirhier(os.path.dirname(fpath))
#bb.note("Split %s -> %s" % (file, fpath))
# Only store off the hard link reference if we successfully split!
if splitfile(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
file_links[file_reference] = file
# The above may have generated dangling symlinks, remove them!
# Dangling symlinks are a result of something NOT being split, such as a stripped binary.
# This should be a rare occurance, but we want to clean up anyway.
for file in file_list:
if file_list[file].startswith("sym: "):
src = file[len(dvar):]
dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
fpath = dvar + dest
try:
s = os.stat(fpath)
except OSError, (err, strerror):
if err != errno.ENOENT:
raise
#bb.note("Remove dangling link %s -> %s" % (fpath, os.readlink(fpath)))
os.unlink(fpath)
# This could leave an empty debug directory laying around
# take care of the obvious case...
subprocess.call("rmdir %s 2>/dev/null" % os.path.dirname(fpath), shell=True)
# Process the debugsrcdir if requested...
# This copies and places the referenced sources for later debugging...
splitfile2(debugsrcdir, d)
#
# End of debug splitting
#
#
# Now lets go back over things and strip them
#
if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for file in file_list:
if file_list[file].startswith("ELF: "):
elf_file = int(file_list[file][5:])
#bb.note("Strip %s" % file)
runstrip(file, elf_file, d)
if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
if not f.endswith(".ko"):
continue
runstrip(os.path.join(root, f), None, d)
#
# End of strip
#
}
python patch_do_patch () {
import oe.patch
patchsetmap = {
"patch": oe.patch.PatchTree,
"quilt": oe.patch.QuiltTree,
"git": oe.patch.GitApplyTree,
}
cls = patchsetmap[d.getVar('PATCHTOOL', True) or 'quilt']
resolvermap = {
"noop": oe.patch.NOOPResolver,
"user": oe.patch.UserResolver,
}
rcls = resolvermap[d.getVar('PATCHRESOLVE', True) or 'user']
classes = {}
s = d.getVar('S', True)
path = os.getenv('PATH')
os.putenv('PATH', d.getVar('PATH', True))
for patch in src_patches(d):
_, _, local, _, _, parm = bb.decodeurl(patch)
if "patchdir" in parm:
patchdir = parm["patchdir"]
if not os.path.isabs(patchdir):
patchdir = os.path.join(s, patchdir)
else:
patchdir = s
if not patchdir in classes:
patchset = cls(patchdir, d)
resolver = rcls(patchset, oe_terminal)
classes[patchdir] = (patchset, resolver)
patchset.Clean()
else:
patchset, resolver = classes[patchdir]
bb.note("Applying patch '%s' (%s)" % (parm['patchname'], oe.path.format_display(local, d)))
try:
patchset.Import({"file":local, "strippath": parm['striplevel']}, True)
except Exception as exc:
bb.fatal(str(exc))
try:
resolver.Resolve()
except bb.BBHandledException as e:
bb.fatal(str(e))
}
python pkgarch_mapping () {
def pkgarch_mapping(d):
# Compatibility mappings of TUNE_PKGARCH (opt in)
if d.getVar("PKGARCHCOMPAT_ARMV7A", True):
if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon":
d.setVar("TUNE_PKGARCH", "armv7a")
}
python populate_packages_prepend () {
None}
python run_buildstats () {
import bb.build
import bb.event
import bb.data
import time, subprocess, platform
if isinstance(e, bb.event.BuildStarted):
########################################################################
# at first pass make the buildstats heriarchy and then
# set the buildname
########################################################################
try:
bb.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
except:
pass
set_bn(e)
bn = get_bn(e)
set_device(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
try:
bb.mkdirhier(bsdir)
except:
pass
if device != "NoLogicalDevice":
set_diskdata("__diskdata_build", device, e.data)
set_timedata("__timedata_build", e.data)
build_time = os.path.join(bsdir, "build_stats")
# write start of build into build_time
file = open(build_time,"a")
host_info = platform.uname()
file.write("Host Info: ")
for x in host_info:
if x:
file.write(x + " ")
file.write("\n")
file.write("Build Started: %0.2f \n" % time.time())
file.close()
elif isinstance(e, bb.event.BuildCompleted):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
build_time = os.path.join(bsdir, "build_stats")
file = open(build_time, "a")
########################################################################
# Write build statistics for the build
########################################################################
timedata = get_timedata("__timedata_build", e.data)
if timedata:
time, cpu = timedata
# write end of build and cpu used into build_time
file = open(build_time, "a")
file.write("Elapsed time: %0.2f seconds \n" % (time))
if cpu:
file.write("CPU usage: %0.1f%% \n" % cpu)
if device != "NoLogicalDevice":
diskio = get_diskdata("__diskdata_build", device, e.data)
if diskio:
for key in sorted(diskio.iterkeys()):
file.write(key + ": " + diskio[key] + "\n")
file.close()
if isinstance(e, bb.build.TaskStarted):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
if device != "NoLogicalDevice":
set_diskdata("__diskdata_task", device, e.data)
set_timedata("__timedata_task", e.data)
try:
bb.mkdirhier(taskdir)
except:
pass
# write into the task event file the name and start time
file = open(os.path.join(taskdir, e.task), "a")
file.write("Event: %s \n" % bb.event.getName(e))
file.write("Started: %0.2f \n" % time.time())
file.close()
elif isinstance(e, bb.build.TaskSucceeded):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
write_task_data("passed", os.path.join(taskdir, e.task), device, e)
if e.task == "do_rootfs":
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
bs=os.path.join(bsdir, "build_stats")
file = open(bs,"a")
rootfs = e.data.getVar('IMAGE_ROOTFS', True)
rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read()
file.write("Uncompressed Rootfs size: %s" % rootfs_size)
file.close()
elif isinstance(e, bb.build.TaskFailed):
bn = get_bn(e)
device = get_device(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
write_task_data("failed", os.path.join(taskdir, e.task), device, e)
########################################################################
# Lets make things easier and tell people where the build failed in
# build_status. We do this here because BuildCompleted triggers no
# matter what the status of the build actually is
########################################################################
build_status = os.path.join(bsdir, "build_stats")
file = open(build_status,"a")
file.write(e.data.expand("Failed at: linux-xilinx-3.3.0-r0 at task: %s \n" % e.task))
file.close()
}
python package_qa_check_rdepends () {
def package_qa_check_rdepends(pkg, pkgdest, skip, d):
# Don't do this check for kernel/module recipes, there aren't too many debug/development
# packages and you can get false positives e.g. on kernel-module-lirc-dev
if bb.data.inherits_class("kernel", d) or bb.data.inherits_class("module-base", d):
return True
sane = True
if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg:
# Copied from package_ipk.bbclass
# boiler plate to update the data
localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg)
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
pkgname = localdata.getVar('PKG_%s' % pkg, True)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', pkg)
bb.data.update_data(localdata)
# Now check the RDEPENDS
rdepends = bb.utils.explode_deps(localdata.getVar('RDEPENDS', True) or "")
# Now do the sanity check!!!
for rdepend in rdepends:
if "-dbg" in rdepend and "debug-deps" not in skip:
error_msg = "%s rdepends on %s" % (pkgname,rdepend)
sane = package_qa_handle_error("debug-deps", error_msg, d)
if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
error_msg = "%s rdepends on %s" % (pkgname, rdepend)
sane = package_qa_handle_error("dev-deps", error_msg, d)
return sane
}
python explode_deps () {
def explode_deps(s):
return bb.utils.explode_deps(s)
}
python package_qa_check_rpath () {
def package_qa_check_rpath(file,name, d, elf, messages):
"""
Check for dangerous RPATHs
"""
if not elf:
return
scanelf = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'scanelf')
bad_dirs = [d.getVar('TMPDIR', True) + "/work", d.getVar('STAGING_DIR_TARGET', True)]
bad_dir_test = d.getVar('TMPDIR', True)
if not os.path.exists(scanelf):
bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found")
if not bad_dirs[0] in d.getVar('WORKDIR', True):
bb.fatal("This class assumed that WORKDIR is /tool/yocto/poky/build/tmp/work... Not doing any check")
output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file))
txt = output.readline().split()
for line in txt:
for dir in bad_dirs:
if dir in line:
messages.append("package %s contains bad RPATH %s in file %s" % (name, line, file))
}
python map_kernel_arch () {
def map_kernel_arch(a, d):
import re
valid_archs = d.getVar('valid_archs', True).split()
if re.match('(i.86|athlon|x86.64)$', a): return 'x86'
elif re.match('arm26$', a): return 'arm26'
elif re.match('armeb$', a): return 'arm'
elif re.match('mips(el|64|64el)$', a): return 'mips'
elif re.match('p(pc|owerpc)(|64)', a): return 'powerpc'
elif re.match('sh(3|4)$', a): return 'sh'
elif re.match('bfin', a): return 'blackfin'
elif re.match('microblazeel', a): return 'microblaze'
elif a in valid_archs: return a
else:
bb.error("cannot map '%s' to a linux kernel architecture" % a)
}
python perform_packagecopy () {
import subprocess
dest = d.getVar('D', True)
dvar = d.getVar('PKGD', True)
bb.mkdirhier(dvar)
# Start by package population by taking a copy of the installed
# files to operate on
subprocess.call('rm -rf %s/*' % (dvar), shell=True)
# Preserve sparse files and hard links
subprocess.call('tar -cf - -C %s -ps . | tar -xf - -C %s' % (dest, dvar), shell=True)
}
python package_depchains () {
"""
For a given set of prefix and postfix modifiers, make those packages
RRECOMMENDS on the corresponding packages for its RDEPENDS.
Example: If package A depends upon package B, and A's .bb emits an
A-dev package, this would make A-dev Recommends: B-dev.
If only one of a given suffix is specified, it will take the RRECOMMENDS
based on the RDEPENDS of *all* other packages. If more than one of a given
suffix is specified, its will only use the RDEPENDS of the single parent
package.
"""
packages = d.getVar('PACKAGES', True)
postfixes = (d.getVar('DEPCHAIN_POST', True) or '').split()
prefixes = (d.getVar('DEPCHAIN_PRE', True) or '').split()
def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
#bb.note('depends for %s is %s' % (base, depends))
rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
for depend in depends:
if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
#bb.note("Skipping %s" % depend)
continue
if depend.endswith('-dev'):
depend = depend.replace('-dev', '')
if depend.endswith('-dbg'):
depend = depend.replace('-dbg', '')
pkgname = getname(depend, suffix)
#bb.note("Adding %s for %s" % (pkgname, depend))
if pkgname not in rreclist:
rreclist[pkgname] = ""
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
#bb.note('rdepends for %s is %s' % (base, rdepends))
rreclist = bb.utils.explode_dep_versions(d.getVar('RRECOMMENDS_' + pkg, True) or d.getVar('RRECOMMENDS', True) or "")
for depend in rdepends:
if depend.find('virtual-locale-') != -1:
#bb.note("Skipping %s" % depend)
continue
if depend.endswith('-dev'):
depend = depend.replace('-dev', '')
if depend.endswith('-dbg'):
depend = depend.replace('-dbg', '')
pkgname = getname(depend, suffix)
#bb.note("Adding %s for %s" % (pkgname, depend))
if pkgname not in rreclist:
rreclist[pkgname] = ""
#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
d.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False))
def add_dep(list, dep):
dep = dep.split(' (')[0].strip()
if dep not in list:
list.append(dep)
depends = []
for dep in bb.utils.explode_deps(d.getVar('DEPENDS', True) or ""):
add_dep(depends, dep)
rdepends = []
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS', True) or ""):
add_dep(rdepends, dep)
for pkg in packages.split():
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + pkg, True) or ""):
add_dep(rdepends, dep)
#bb.note('rdepends is %s' % rdepends)
def post_getname(name, suffix):
return '%s%s' % (name, suffix)
def pre_getname(name, suffix):
return '%s%s' % (suffix, name)
pkgs = {}
for pkg in packages.split():
for postfix in postfixes:
if pkg.endswith(postfix):
if not postfix in pkgs:
pkgs[postfix] = {}
pkgs[postfix][pkg] = (pkg[:-len(postfix)], post_getname)
for prefix in prefixes:
if pkg.startswith(prefix):
if not prefix in pkgs:
pkgs[prefix] = {}
pkgs[prefix][pkg] = (pkg[:-len(prefix)], pre_getname)
for suffix in pkgs:
for pkg in pkgs[suffix]:
if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs'):
continue
(base, func) = pkgs[suffix][pkg]
if suffix == "-dev":
pkg_adddeprrecs(pkg, base, suffix, func, depends, d)
if len(pkgs[suffix]) == 1:
pkg_addrrecs(pkg, base, suffix, func, rdepends, d)
else:
rdeps = []
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + base, True) or d.getVar('RDEPENDS', True) or ""):
add_dep(rdeps, dep)
pkg_addrrecs(pkg, base, suffix, func, rdeps, d)
}
python sstate_task_postfunc () {
shared_state = sstate_state_fromvars(d)
sstate_install(shared_state, d)
for intercept in shared_state['interceptfuncs']:
bb.build.exec_func(intercept, d)
sstate_package(shared_state, d)
}
python sysroot_checkhashes () {
def sysroot_checkhashes(covered, tasknames, fnids, fns, d):
problems = set()
configurefnids = set()
for task in xrange(len(tasknames)):
if tasknames[task] == "do_configure" and task not in covered:
configurefnids.add(fnids[task])
for task in covered:
if tasknames[task] == "do_populate_sysroot" and fnids[task] in configurefnids:
problems.add(task)
return problems
}
python populate_packages () {
def extract_modinfo(file):
import tempfile, re, subprocess
tempfile.tempdir = d.getVar("WORKDIR", True)
tf = tempfile.mkstemp()
tmpfile = tf[1]
cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("PATH", True), d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
subprocess.call(cmd, shell=True)
f = open(tmpfile)
l = f.read().split("\000")
f.close()
os.close(tf[0])
os.unlink(tmpfile)
exp = re.compile("([^=]+)=(.*)")
vals = {}
for i in l:
m = exp.match(i)
if not m:
continue
vals[m.group(1)] = m.group(2)
return vals
def parse_depmod():
import re
dvar = d.getVar('PKGD', True)
if not dvar:
bb.error("PKGD not defined")
return
kernelver = d.getVar('KERNEL_VERSION', True)
kernelver_stripped = kernelver
m = re.match('^(.*-hh.*)[\.\+].*$', kernelver)
if m:
kernelver_stripped = m.group(1)
path = d.getVar("PATH", True)
cmd = "PATH=\"%s\" depmod -n -a -b %s -F %s/boot/System.map-%s %s" % (path, dvar, dvar, kernelver, kernelver_stripped)
f = os.popen(cmd, 'r')
deps = {}
pattern0 = "^(.*\.k?o):..*$"
pattern1 = "^(.*\.k?o):\s*(.*\.k?o)\s*$"
pattern2 = "^(.*\.k?o):\s*(.*\.k?o)\s*\\\$"
pattern3 = "^\t(.*\.k?o)\s*\\\$"
pattern4 = "^\t(.*\.k?o)\s*$"
line = f.readline()
while line:
if not re.match(pattern0, line):
line = f.readline()
continue
m1 = re.match(pattern1, line)
if m1:
deps[m1.group(1)] = m1.group(2).split()
else:
m2 = re.match(pattern2, line)
if m2:
deps[m2.group(1)] = m2.group(2).split()
line = f.readline()
m3 = re.match(pattern3, line)
while m3:
deps[m2.group(1)].extend(m3.group(1).split())
line = f.readline()
m3 = re.match(pattern3, line)
m4 = re.match(pattern4, line)
deps[m2.group(1)].extend(m4.group(1).split())
line = f.readline()
f.close()
return deps
def get_dependencies(file, pattern, format):
# file no longer includes PKGD
file = file.replace(d.getVar('PKGD', True) or '', '', 1)
# instead is prefixed with /lib/modules/3.3.0-14.2-build1
file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
if module_deps.has_key(file):
import re
dependencies = []
for i in module_deps[file]:
m = re.match(pattern, os.path.basename(i))
if not m:
continue
on = legitimize_package_name(m.group(1))
dependency_pkg = format % on
dependencies.append(dependency_pkg)
return dependencies
return []
def frob_metadata(file, pkg, pattern, format, basename):
import re
vals = extract_modinfo(file)
dvar = d.getVar('PKGD', True)
# If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
# appropriate modprobe commands to the postinst
autoload = d.getVar('module_autoload_%s' % basename, True)
if autoload:
name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
for m in autoload.split():
f.write('%s\n' % m)
f.close()
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
if not postinst:
bb.fatal("pkg_postinst_%s not defined" % pkg)
postinst += d.getVar('autoload_postinst_fragment', True) % autoload
d.setVar('pkg_postinst_%s' % pkg, postinst)
# Write out any modconf fragment
modconf = d.getVar('module_conf_%s' % basename, True)
if modconf:
name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
f = open(name, 'w')
f.write("%s\n" % modconf)
f.close()
files = d.getVar('FILES_%s' % pkg, True)
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
d.setVar('FILES_%s' % pkg, files)
if vals.has_key("description"):
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
rdepends_str = d.getVar('RDEPENDS_' + pkg, True)
if rdepends_str:
rdepends = rdepends_str.split()
else:
rdepends = []
rdepends.extend(get_dependencies(file, pattern, format))
d.setVar('RDEPENDS_' + pkg, ' '.join(rdepends))
module_deps = parse_depmod()
module_regex = '^(.*)\.k?o$'
module_pattern = 'kernel-module-%s'
postinst = d.getVar('pkg_postinst_modules', True)
postrm = d.getVar('pkg_postrm_modules', True)
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % d.getVar("KERNEL_VERSION", True))
# If modules-load.d and modprobe.d are empty at this point, remove them to
# avoid warnings. removedirs only raises an OSError if an empty
# directory cannot be removed.
dvar = d.getVar('PKGD', True)
for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
if len(os.listdir(dir)) == 0:
os.rmdir(dir)
import re
metapkg = "kernel-modules"
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
d.setVar('FILES_' + metapkg, "")
blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'kernel-misc' ]
for l in module_deps.values():
for i in l:
pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
blacklist.append(pkg)
metapkg_rdepends = []
packages = d.getVar('PACKAGES', True).split()
for pkg in packages[1:]:
if not pkg in blacklist and not pkg in metapkg_rdepends:
metapkg_rdepends.append(pkg)
d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
d.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package')
packages.append(metapkg)
d.setVar('PACKAGES', ' '.join(packages))
import glob, stat, errno, re, subprocess
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR', True)
dvar = d.getVar('PKGD', True)
packages = d.getVar('PACKAGES', True)
pn = d.getVar('PN', True)
bb.mkdirhier(outdir)
os.chdir(dvar)
# Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
# Sanity should be moved to sanity.bbclass once we have the infrastucture
package_list = []
for pkg in packages.split():
if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
packages.remove(pkg)
else:
if pkg in package_list:
bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
else:
package_list.append(pkg)
d.setVar('PACKAGES', ' '.join(package_list))
pkgdest = d.getVar('PKGDEST', True)
subprocess.call('rm -rf %s' % pkgdest, shell=True)
seen = []
for pkg in package_list:
localdata = bb.data.createCopy(d)
root = os.path.join(pkgdest, pkg)
bb.mkdirhier(root)
localdata.setVar('PKG', pkg)
overrides = localdata.getVar('OVERRIDES', True)
if not overrides:
raise bb.build.FuncFailed('OVERRIDES not defined')
localdata.setVar('OVERRIDES', overrides + ':' + pkg)
bb.data.update_data(localdata)
filesvar = localdata.getVar('FILES', True) or ""
files = filesvar.split()
file_links = {}
for file in files:
if file.find("//") != -1:
bb.warn("FILES variable for package %s contains '//' which is invalid. Attempting to fix this but you should correct the metadata.\n" % pkg)
file.replace("//", "/")
if os.path.isabs(file):
file = '.' + file
if not os.path.islink(file):
if os.path.isdir(file):
newfiles = [ os.path.join(file,x) for x in os.listdir(file) ]
if newfiles:
files += newfiles
continue
globbed = glob.glob(file)
if globbed:
if [ file ] != globbed:
files += globbed
continue
if (not os.path.islink(file)) and (not os.path.exists(file)):
continue
if file in seen:
continue
seen.append(file)
def mkdir(src, dest, p):
src = os.path.join(src, p)
dest = os.path.join(dest, p)
bb.mkdirhier(dest)
fstat = os.stat(src)
os.chmod(dest, fstat.st_mode)
os.chown(dest, fstat.st_uid, fstat.st_gid)
if p not in seen:
seen.append(p)
def mkdir_recurse(src, dest, paths):
while paths.startswith("./"):
paths = paths[2:]
p = "."
for c in paths.split("/"):
p = os.path.join(p, c)
if not os.path.exists(os.path.join(dest, p)):
mkdir(src, dest, p)
if os.path.isdir(file) and not os.path.islink(file):
mkdir_recurse(dvar, root, file)
continue
mkdir_recurse(dvar, root, os.path.dirname(file))
fpath = os.path.join(root,file)
if not os.path.islink(file):
os.link(file, fpath)
fstat = os.stat(file)
os.chmod(fpath, fstat.st_mode)
os.chown(fpath, fstat.st_uid, fstat.st_gid)
continue
ret = bb.copyfile(file, fpath)
if ret is False or ret == 0:
raise bb.build.FuncFailed("File population failed")
del localdata
os.chdir(workdir)
unshipped = []
for root, dirs, files in os.walk(dvar):
dir = root[len(dvar):]
if not dir:
dir = os.sep
for f in (files + dirs):
path = os.path.join(dir, f)
if ('.' + path) not in seen:
unshipped.append(path)
if unshipped != []:
bb.warn("For recipe %s, the following files/directories were installed but not shipped in any package:" % pn)
for f in unshipped:
bb.warn(" " + f)
bb.build.exec_func("package_name_hook", d)
for pkg in package_list:
pkgname = d.getVar('PKG_%s' % pkg, True)
if pkgname is None:
d.setVar('PKG_%s' % pkg, pkg)
dangling_links = {}
pkg_files = {}
for pkg in package_list:
dangling_links[pkg] = []
pkg_files[pkg] = []
inst_root = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(inst_root):
for f in files:
path = os.path.join(root, f)
rpath = path[len(inst_root):]
pkg_files[pkg].append(rpath)
try:
s = os.stat(path)
except OSError, (err, strerror):
if err != errno.ENOENT:
raise
target = os.readlink(path)
if target[0] != '/':
target = os.path.join(root[len(inst_root):], target)
dangling_links[pkg].append(os.path.normpath(target))
for pkg in package_list:
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
for l in dangling_links[pkg]:
found = False
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
for p in package_list:
for f in pkg_files[p]:
if f == l:
found = True
bb.debug(1, "target found in %s" % p)
if p == pkg:
break
if p not in rdepends:
rdepends[p] = ""
break
if found == False:
bb.note("%s contains dangling symlink to %s" % (pkg, l))
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
python generate_git_config () {
def generate_git_config(e):
from bb import data
if data.getVar('GIT_CORE_CONFIG', e.data, True):
gitconfig_path = e.data.getVar('GIT_CONFIG', True)
proxy_command = " gitProxy = %s\n" % data.getVar('OE_GIT_PROXY_COMMAND', e.data, True)
bb.mkdirhier(e.data.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/etc"))
if (os.path.exists(gitconfig_path)):
os.remove(gitconfig_path)
f = open(gitconfig_path, 'w')
f.write("[core]\n")
ignore_hosts = data.getVar('GIT_PROXY_IGNORE', e.data, True).split()
for ignore_host in ignore_hosts:
f.write(" gitProxy = none for %s\n" % ignore_host)
f.write(proxy_command)
f.close
}
python extend_variants () {
def extend_variants(d, var, extend, delim=':'):
"""Return a string of all bb class extend variants for the given extend"""
variants = []
whole = d.getVar(var, True) or ""
for ext in whole.split():
eext = ext.split(delim)
if len(eext) > 1 and eext[0] == extend:
variants.append(eext[1])
return " ".join(variants)
}
python buildcfg_vars () {
def buildcfg_vars(d):
statusvars = oe.data.typed_value('BUILDCFG_VARS', d)
for var in statusvars:
value = d.getVar(var, True)
if value is not None:
yield '%-17s = "%s"' % (var, value)
}
python package_qa_check_unsafe_references_in_binaries () {
def package_qa_check_unsafe_references_in_binaries(path, name, d, elf, messages):
"""
Ensure binaries in base_[bindir|sbindir|libdir] do not link to files under exec_prefix
"""
if unsafe_references_skippable(path, name, d):
return
if elf:
import subprocess as sub
pn = d.getVar('PN', True)
exec_prefix = d.getVar('exec_prefix', True)
sysroot_path = d.getVar('STAGING_DIR_TARGET', True)
sysroot_path_usr = sysroot_path + exec_prefix
try:
ldd_output = bb.process.Popen(["prelink-rtld", "--root", sysroot_path, path], stdout=sub.PIPE).stdout.read()
except bb.process.CmdError:
error_msg = pn + ": prelink-rtld aborted when processing %s" % path
package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
return False
if sysroot_path_usr in ldd_output:
ldd_output = ldd_output.replace(sysroot_path, "")
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
for package in packages.split():
short_path = path.replace('%s/%s' % (pkgdest, package), "", 1)
if (short_path != path):
break
base_err = pn + ": %s, installed in the base_prefix, requires a shared library under exec_prefix (%s)" % (short_path, exec_prefix)
for line in ldd_output.split('\n'):
if exec_prefix in line:
error_msg = "%s: %s" % (base_err, line.strip())
package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
return False
}
python get_package_mapping () {
def get_package_mapping (pkg, d):
import oe.packagedata
data = oe.packagedata.read_subpkgdata(pkg, d)
key = "PKG_%s" % pkg
if key in data:
return data[key]
return pkg
}
python sstate_task_prefunc () {
shared_state = sstate_state_fromvars(d)
sstate_clean(shared_state, d)
}
python check_sanity_sstate_dir_change () {
def check_sanity_sstate_dir_change(sstate_dir, data):
# Sanity checks to be done when the value of SSTATE_DIR changes
# Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS)
testmsg = ""
if sstate_dir != "":
testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR")
# If we don't have permissions to SSTATE_DIR, suggest the user set it as an SSTATE_MIRRORS
try:
err = testmsg.split(': ')[1].strip()
if err == "Permission denied.":
testmsg = testmsg + "You could try using %s in SSTATE_MIRRORS rather than as an SSTATE_CACHE.\n" % (sstate_dir)
except IndexError:
pass
return testmsg
}
python sstate_setscene () {
def sstate_setscene(d):
shared_state = sstate_state_fromvars(d)
accelerate = sstate_installpkg(shared_state, d)
if not accelerate:
raise bb.build.FuncFailed("No suitable staging package found")
}
python find_board () {
def find_board(a, d):
# Given a xps project path return the board board model
board = "unknown"
if a and os.path.exists(a):
try:
xps_proj = os.path.join(a, "system.mhs")
xps_hwd = file(xps_proj, 'r')
for l in xps_hwd:
if "Target Board" in l:
board = l
break
# Close file descriptor
xps_hwd.close()
if board != "unknown":
# Strip board board name
board = board.split()
return board[6].lower()
else:
return board
except IOError:
return board
else:
return board}
python base_path_relative () {
def base_path_relative(src, dest):
return oe.path.relative(src, dest)
}
python do_deploy_setscene () {
sstate_setscene(d)
}
python do_cleanall () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.clean()
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python sstate_package () {
def sstate_package(ss, d):
import oe.path
def make_relative_symlink(path, outputpath, d):
# Replace out absolute TMPDIR paths in symlinks with relative ones
if not os.path.islink(path):
return
link = os.readlink(path)
if not os.path.isabs(link):
return
if not link.startswith(tmpdir):
return
depth = link.rpartition(tmpdir)[2].count('/')
base = link.partition(tmpdir)[2].strip()
while depth > 1:
base = "../" + base
depth -= 1
bb.debug(2, "Replacing absolute path %s with relative path %s" % (link, base))
os.remove(path)
os.symlink(base, path)
tmpdir = d.getVar('TMPDIR', True)
sstatebuild = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sstate-build-%s/" % ss['name'])
sstatepkg = d.getVar('SSTATE_PKG', True) + '_'+ ss['name'] + ".tgz"
bb.mkdirhier(sstatebuild)
bb.mkdirhier(os.path.dirname(sstatepkg))
for state in ss['dirs']:
srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
for walkroot, dirs, files in os.walk(state[1]):
for file in files:
srcpath = os.path.join(walkroot, file)
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
make_relative_symlink(srcpath, dstpath, d)
for dir in dirs:
srcpath = os.path.join(walkroot, dir)
dstpath = srcpath.replace(state[1], sstatebuild + state[0])
make_relative_symlink(srcpath, dstpath, d)
bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0]))
oe.path.copytree(state[1], sstatebuild + state[0])
workdir = d.getVar('WORKDIR', True)
for plain in ss['plaindirs']:
pdir = plain.replace(workdir, sstatebuild)
bb.mkdirhier(plain)
bb.mkdirhier(pdir)
oe.path.copytree(plain, pdir)
d.setVar('SSTATE_BUILDDIR', sstatebuild)
d.setVar('SSTATE_PKG', sstatepkg)
sstate_hardcode_path(d)
bb.build.exec_func('sstate_create_package', d)
bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
return
}
python do_populate_lic () {
"""
Populate LICENSE_DIRECTORY with licenses.
"""
import os
import bb
import shutil
import oe.license
pn = d.getVar('PN', True)
for package in d.getVar('PACKAGES', True):
if d.getVar('LICENSE_' + pn + '-' + package, True):
license_types = license_types + ' & ' + \
d.getVar('LICENSE_' + pn + '-' + package, True)
#If we get here with no license types, then that means we have a recipe
#level license. If so, we grab only those.
try:
license_types
except NameError:
# All the license types at the recipe level
license_types = d.getVar('LICENSE', True)
# All the license files for the package
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
pn = d.getVar('PN', True)
# The base directory we wrangle licenses to
destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn)
# The license files are located in S/LIC_FILE_CHECKSUM.
srcdir = d.getVar('S', True)
# Directory we store the generic licenses as set in the distro configuration
generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
license_source_dirs = []
license_source_dirs.append(generic_directory)
try:
additional_lic_dirs = d.getVar('LICENSE_DIR', True).split()
for lic_dir in additional_lic_dirs:
license_source_dirs.append(lic_dir)
except:
pass
class FindVisitor(oe.license.LicenseVisitor):
def visit_Str(self, node):
#
# Until I figure out what to do with
# the two modifiers I support (or greater = +
# and "with exceptions" being *
# we'll just strip out the modifier and put
# the base license.
find_license(node.s.replace("+", "").replace("*", ""))
self.generic_visit(node)
def find_license(license_type):
try:
bb.mkdirhier(gen_lic_dest)
except:
pass
spdx_generic = None
license_source = None
# If the generic does not exist we need to check to see if there is an SPDX mapping to it
for lic_dir in license_source_dirs:
if not os.path.isfile(os.path.join(lic_dir, license_type)):
if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
# Great, there is an SPDXLICENSEMAP. We can copy!
bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type))
spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
license_source = lic_dir
break
elif os.path.isfile(os.path.join(lic_dir, license_type)):
spdx_generic = license_type
license_source = lic_dir
break
if spdx_generic and license_source:
# we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
# audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
bb.copyfile(os.path.join(license_source, spdx_generic), os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type))
if not os.path.isfile(os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type)):
# If the copy didn't occur, something horrible went wrong and we fail out
bb.warn("%s for %s could not be copied for some reason. It may not exist. WARN for now." % (spdx_generic, pn))
else:
# And here is where we warn people that their licenses are lousy
bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type))
pass
try:
bb.mkdirhier(destdir)
except:
pass
if not generic_directory:
raise bb.build.FuncFailed("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
if not lic_files:
# No recipe should have an invalid license file. This is checked else
# where, but let's be pedantic
bb.note(pn + ": Recipe file does not have license file information.")
return True
for url in lic_files.split():
(type, host, path, user, pswd, parm) = bb.decodeurl(url)
# We want the license file to be copied into the destination
srclicfile = os.path.join(srcdir, path)
ret = bb.copyfile(srclicfile, os.path.join(destdir, os.path.basename(path)))
# If the copy didn't occur, something horrible went wrong and we fail out
if not ret:
bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile)
v = FindVisitor()
try:
v.visit_string(license_types)
except oe.license.InvalidLicense as exc:
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
except SyntaxError:
bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True)))
}
python package_qa_handle_error () {
def package_qa_handle_error(error_class, error_msg, d):
package_qa_write_error(error_msg, d)
if error_class in (d.getVar("ERROR_QA", True) or "").split():
bb.error("QA Issue: %s" % error_msg)
return False
else:
bb.warn("QA Issue: %s" % error_msg)
return True
}
python all_multilib_tune_values () {
def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
"""Return a string of all ${var} in all multilib tune configuration"""
values = []
value = d.getVar(var, True) or ""
if value != "":
if need_split:
for item in value.split(delim):
values.append(item)
else:
values.append(value)
variants = d.getVar("MULTILIB_VARIANTS", True) or ""
for item in variants.split():
localdata = bb.data.createCopy(d)
overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
localdata.setVar("OVERRIDES", overrides)
bb.data.update_data(localdata)
value = localdata.getVar(var, True) or ""
if value != "":
if need_split:
for item in value.split(delim):
values.append(item)
else:
values.append(value)
if unique:
#we do this to keep order as much as possible
ret = []
for value in values:
if not value in ret:
ret.append(value)
else:
ret = values
return " ".join(ret)}
python set_timedata () {
def set_timedata(var, data):
import time
time = time.time()
cputime = get_cputime()
proctime = get_process_cputime(os.getpid())
data.setVar(var, (time, cputime, proctime))
}
python package_get_auto_pr () {
# per recipe PRSERV_HOST PRSERV_PORT
pn = d.getVar('PN', True)
host = d.getVar("PRSERV_HOST_" + pn, True)
port = d.getVar("PRSERV_PORT_" + pn, True)
if not (host is None):
d.setVar("PRSERV_HOST", host)
if not (port is None):
d.setVar("PRSERV_PORT", port)
if d.getVar('USE_PR_SERV', True) != "0":
try:
auto_pr=prserv_get_pr_auto(d)
except Exception as e:
bb.fatal("Can NOT get PRAUTO, exception %s" % str(e))
return
if auto_pr is None:
if d.getVar('PRSERV_LOCKDOWN', True):
bb.fatal("Can NOT get PRAUTO from lockdown exported file")
else:
bb.fatal("Can NOT get PRAUTO from remote PR service")
return
d.setVar('PRAUTO',str(auto_pr))
}
python base_do_fetch () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.download()
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python do_populate_sysroot () {
#
# if do_stage exists, we're legacy. In that case run the do_stage,
# modify the SYSROOT_DESTDIR variable and then run the staging preprocess
# functions against staging directly.
#
# Otherwise setup a destdir, copy the results from do_install
# and run the staging preprocess against that
#
bb.build.exec_func("sysroot_stage_all", d)
for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
python package_name_hook () {
bb.build.exec_func('debian_package_name_hook', d)
}
python patch_path () {
def patch_path(url, fetch, workdir):
"""Return the local path of a patch, or None if this isn't a patch"""
local = fetch.localpath(url)
base, ext = os.path.splitext(os.path.basename(local))
if ext in ('.gz', '.bz2', '.Z'):
local = os.path.join(workdir, base)
ext = os.path.splitext(base)[1]
urldata = fetch.ud[url]
if "apply" in urldata.parm:
apply = oe.types.boolean(urldata.parm["apply"])
if not apply:
return
elif ext not in (".diff", ".patch"):
return
return local
}
python base_get_metadata_monotone_revision () {
def base_get_metadata_monotone_revision(path, d):
monotone_revision = "<unknown>"
try:
monotone_revision = file( "%s/_MTN/revision" % path ).read().strip()
if monotone_revision.startswith( "format_version" ):
monotone_revision_words = monotone_revision.split()
monotone_revision = monotone_revision_words[ monotone_revision_words.index( "old_revision" )+1][1:-1]
except IOError:
pass
return monotone_revision
}
python base_path_out () {
def base_path_out(path, d):
return oe.path.format_display(path, d)
}
python set_device () {
def set_device(e):
tmpdir = e.data.getVar('TMPDIR', True)
try:
os.remove(e.data.getVar('DEVFILE', True))
except:
pass
############################################################################
# We look for the volume TMPDIR lives on. To do all disks would make little
# sense and not give us any particularly useful data. In theory we could do
# something like stick DL_DIR on a different partition and this would
# throw stats gathering off. The same goes with SSTATE_DIR. However, let's
# get the basics in here and work on the cornercases later.
# A note. /proc/diskstats does not contain info on encryptfs, tmpfs, etc.
# If we end up hitting one of these fs, we'll just skip diskstats collection.
############################################################################
device=os.stat(tmpdir)
majordev=os.major(device.st_dev)
minordev=os.minor(device.st_dev)
############################################################################
# Bug 1700:
# Because tmpfs/encryptfs/ramfs etc inserts no entry in /proc/diskstats
# we set rdev to NoLogicalDevice and search for it later. If we find NLD
# we do not collect diskstats as the method to collect meaningful statistics
# for these fs types requires a bit more research.
############################################################################
rdev="NoLogicalDevice"
try:
for line in open("/proc/diskstats", "r"):
if majordev == int(line.split()[0]) and minordev == int(line.split()[1]):
rdev=line.split()[2]
except:
pass
file = open(e.data.getVar('DEVFILE', True), "w")
file.write(rdev)
file.close()
}
python sstate_clean_cachefiles () {
def sstate_clean_cachefiles(d):
for task in (d.getVar('SSTATETASKS', True) or "").split():
ss = sstate_state_fromvars(d, task[3:])
sstate_clean_cachefile(ss, d)
}
python do_split_packages () {
def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False, aux_files_pattern_verbatim=None, allow_links=False):
"""
Used in .bb files to split up dynamically generated subpackages of a
given package, usually plugins or modules.
"""
ml = d.getVar("MLPREFIX", True)
if ml:
if not output_pattern.startswith(ml):
output_pattern = ml + output_pattern
newdeps = []
for dep in (extra_depends or "").split():
if dep.startswith(ml):
newdeps.append(dep)
else:
newdeps.append(ml + dep)
if newdeps:
extra_depends = " ".join(newdeps)
dvar = d.getVar('PKGD', True)
packages = d.getVar('PACKAGES', True).split()
if postinst:
postinst = '#!/bin/sh\n' + postinst + '\n'
if postrm:
postrm = '#!/bin/sh\n' + postrm + '\n'
if not recursive:
objs = os.listdir(dvar + root)
else:
objs = []
for walkroot, dirs, files in os.walk(dvar + root):
for file in files:
relpath = os.path.join(walkroot, file).replace(dvar + root + '/', '', 1)
if relpath:
objs.append(relpath)
if extra_depends == None:
extra_depends = d.getVar("PN", True)
for o in sorted(objs):
import re, stat
if match_path:
m = re.match(file_regex, o)
else:
m = re.match(file_regex, os.path.basename(o))
if not m:
continue
f = os.path.join(dvar + root, o)
mode = os.lstat(f).st_mode
if not (stat.S_ISREG(mode) or (allow_links and stat.S_ISLNK(mode)) or (allow_dirs and stat.S_ISDIR(mode))):
continue
on = legitimize_package_name(m.group(1))
pkg = output_pattern % on
if not pkg in packages:
if prepend:
packages = [pkg] + packages
else:
packages.append(pkg)
oldfiles = d.getVar('FILES_' + pkg, True)
if not oldfiles:
the_files = [os.path.join(root, o)]
if aux_files_pattern:
if type(aux_files_pattern) is list:
for fp in aux_files_pattern:
the_files.append(fp % on)
else:
the_files.append(aux_files_pattern % on)
if aux_files_pattern_verbatim:
if type(aux_files_pattern_verbatim) is list:
for fp in aux_files_pattern_verbatim:
the_files.append(fp % m.group(1))
else:
the_files.append(aux_files_pattern_verbatim % m.group(1))
d.setVar('FILES_' + pkg, " ".join(the_files))
if extra_depends != '':
d.appendVar('RDEPENDS_' + pkg, ' ' + extra_depends)
d.setVar('DESCRIPTION_' + pkg, description % on)
if postinst:
d.setVar('pkg_postinst_' + pkg, postinst)
if postrm:
d.setVar('pkg_postrm_' + pkg, postrm)
else:
d.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o))
if callable(hook):
hook(f, pkg, file_regex, output_pattern, m.group(1))
d.setVar('PACKAGES', ' '.join(packages))
}
python sstate_state_fromvars () {
def sstate_state_fromvars(d, task = None):
if task is None:
task = d.getVar('BB_CURRENTTASK', True)
if not task:
bb.fatal("sstate code running without task context?!")
task = task.replace("_setscene", "")
name = d.getVarFlag("do_" + task, 'sstate-name', True)
inputs = (d.getVarFlag("do_" + task, 'sstate-inputdirs', True) or "").split()
outputs = (d.getVarFlag("do_" + task, 'sstate-outputdirs', True) or "").split()
plaindirs = (d.getVarFlag("do_" + task, 'sstate-plaindirs', True) or "").split()
lockfiles = (d.getVarFlag("do_" + task, 'sstate-lockfile', True) or "").split()
lockfilesshared = (d.getVarFlag("do_" + task, 'sstate-lockfile-shared', True) or "").split()
interceptfuncs = (d.getVarFlag("do_" + task, 'sstate-interceptfuncs', True) or "").split()
if not name or len(inputs) != len(outputs):
bb.fatal("sstate variables not setup correctly?!")
ss = sstate_init(name, task, d)
for i in range(len(inputs)):
sstate_add(ss, inputs[i], outputs[i], d)
ss['lockfiles'] = lockfiles
ss['lockfiles-shared'] = lockfilesshared
ss['plaindirs'] = plaindirs
ss['interceptfuncs'] = interceptfuncs
return ss
}
python unsafe_references_skippable () {
def unsafe_references_skippable(path, name, d):
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d):
return True
if "-dbg" in name or "-dev" in name:
return True
# Other package names to skip:
if name.startswith("kernel-module-"):
return True
# Skip symlinks
if os.path.islink(path):
return True
# Skip unusual rootfs layouts which make these tests irrelevant
exec_prefix = d.getVar('exec_prefix', True)
if exec_prefix == "":
return True
pkgdest = d.getVar('PKGDEST', True)
pkgdest = pkgdest + "/" + name
pkgdest = os.path.abspath(pkgdest)
base_bindir = pkgdest + d.getVar('base_bindir', True)
base_sbindir = pkgdest + d.getVar('base_sbindir', True)
base_libdir = pkgdest + d.getVar('base_libdir', True)
bindir = pkgdest + d.getVar('bindir', True)
sbindir = pkgdest + d.getVar('sbindir', True)
libdir = pkgdest + d.getVar('libdir', True)
if base_bindir == bindir and base_sbindir == sbindir and base_libdir == libdir:
return True
# Skip files not in base_[bindir|sbindir|libdir]
path = os.path.abspath(path)
if not (base_bindir in path or base_sbindir in path or base_libdir in path):
return True
return False
}
python set_diskdata () {
def set_diskdata(var, dev, data):
data.setVar(var, get_diskstats(dev))
}
python do_package_write_rpm () {
bb.build.exec_func("read_subpackage_metadata", d)
bb.build.exec_func("do_package_rpm", d)
}
python get_bn () {
def get_bn(e):
file = open(e.data.getVar('BNFILE', True))
bn = file.readline()
file.close()
return bn
}
python check_app_exists () {
def check_app_exists(app, d):
from bb import which, data
app = data.expand(app, d)
path = data.getVar('PATH', d, 1)
return bool(which(path, app))
}
python fixup_perms () {
import os, pwd, grp
# init using a string with the same format as a line as documented in
# the fs-perms.txt file
# <path> <mode> <uid> <gid> <walk> <fmode> <fuid> <fgid>
# <path> link <link target>
#
# __str__ can be used to print out an entry in the input format
#
# if fs_perms_entry.path is None:
# an error occured
# if fs_perms_entry.link, you can retrieve:
# fs_perms_entry.path = path
# fs_perms_entry.link = target of link
# if not fs_perms_entry.link, you can retrieve:
# fs_perms_entry.path = path
# fs_perms_entry.mode = expected dir mode or None
# fs_perms_entry.uid = expected uid or -1
# fs_perms_entry.gid = expected gid or -1
# fs_perms_entry.walk = 'true' or something else
# fs_perms_entry.fmode = expected file mode or None
# fs_perms_entry.fuid = expected file uid or -1
# fs_perms_entry_fgid = expected file gid or -1
class fs_perms_entry():
def __init__(self, line):
lsplit = line.split()
if len(lsplit) == 3 and lsplit[1].lower() == "link":
self._setlink(lsplit[0], lsplit[2])
elif len(lsplit) == 8:
self._setdir(lsplit[0], lsplit[1], lsplit[2], lsplit[3], lsplit[4], lsplit[5], lsplit[6], lsplit[7])
else:
bb.error("Fixup Perms: invalid config line %s" % line)
self.path = None
self.link = None
def _setdir(self, path, mode, uid, gid, walk, fmode, fuid, fgid):
self.path = os.path.normpath(path)
self.link = None
self.mode = self._procmode(mode)
self.uid = self._procuid(uid)
self.gid = self._procgid(gid)
self.walk = walk.lower()
self.fmode = self._procmode(fmode)
self.fuid = self._procuid(fuid)
self.fgid = self._procgid(fgid)
def _setlink(self, path, link):
self.path = os.path.normpath(path)
self.link = link
def _procmode(self, mode):
if not mode or (mode and mode == "-"):
return None
else:
return int(mode,8)
# Note uid/gid -1 has special significance in os.lchown
def _procuid(self, uid):
if uid is None or uid == "-":
return -1
elif uid.isdigit():
return int(uid)
else:
return pwd.getpwnam(uid).pw_uid
def _procgid(self, gid):
if gid is None or gid == "-":
return -1
elif gid.isdigit():
return int(gid)
else:
return grp.getgrnam(gid).gr_gid
# Use for debugging the entries
def __str__(self):
if self.link:
return "%s link %s" % (self.path, self.link)
else:
mode = "-"
if self.mode:
mode = "0%o" % self.mode
fmode = "-"
if self.fmode:
fmode = "0%o" % self.fmode
uid = self._mapugid(self.uid)
gid = self._mapugid(self.gid)
fuid = self._mapugid(self.fuid)
fgid = self._mapugid(self.fgid)
return "%s %s %s %s %s %s %s %s" % (self.path, mode, uid, gid, self.walk, fmode, fuid, fgid)
def _mapugid(self, id):
if id is None or id == -1:
return "-"
else:
return "%d" % id
# Fix the permission, owner and group of path
def fix_perms(path, mode, uid, gid, dir):
if mode and not os.path.islink(path):
#bb.note("Fixup Perms: chmod 0%o %s" % (mode, dir))
os.chmod(path, mode)
# -1 is a special value that means don't change the uid/gid
# if they are BOTH -1, don't bother to lchown
if not (uid == -1 and gid == -1):
#bb.note("Fixup Perms: lchown %d:%d %s" % (uid, gid, dir))
os.lchown(path, uid, gid)
# Return a list of configuration files based on either the default
# files/fs-perms.txt or the contents of FILESYSTEM_PERMS_TABLES
# paths are resolved via BBPATH
def get_fs_perms_list(d):
str = ""
fs_perms_tables = d.getVar('FILESYSTEM_PERMS_TABLES', True)
if not fs_perms_tables:
fs_perms_tables = 'files/fs-perms.txt'
for conf_file in fs_perms_tables.split():
str += " %s" % bb.which(d.getVar('BBPATH', True), conf_file)
return str
dvar = d.getVar('PKGD', True)
fs_perms_table = {}
# By default all of the standard directories specified in
# bitbake.conf will get 0755 root:root.
target_path_vars = [ 'base_prefix',
'prefix',
'exec_prefix',
'base_bindir',
'base_sbindir',
'base_libdir',
'datadir',
'sysconfdir',
'servicedir',
'sharedstatedir',
'localstatedir',
'infodir',
'mandir',
'docdir',
'bindir',
'sbindir',
'libexecdir',
'libdir',
'includedir',
'oldincludedir' ]
for path in target_path_vars:
dir = d.getVar(path, True) or ""
if dir == "":
continue
fs_perms_table[dir] = fs_perms_entry(bb.data.expand("%s 0755 root root false - - -" % (dir), d))
# Now we actually load from the configuration files
for conf in get_fs_perms_list(d).split():
if os.path.exists(conf):
f = open(conf)
for line in f:
if line.startswith('#'):
continue
lsplit = line.split()
if len(lsplit) == 0:
continue
if len(lsplit) != 8 and not (len(lsplit) == 3 and lsplit[1].lower() == "link"):
bb.error("Fixup perms: %s invalid line: %s" % (conf, line))
continue
entry = fs_perms_entry(d.expand(line))
if entry and entry.path:
fs_perms_table[entry.path] = entry
f.close()
# Debug -- list out in-memory table
#for dir in fs_perms_table:
# bb.note("Fixup Perms: %s: %s" % (dir, str(fs_perms_table[dir])))
# We process links first, so we can go back and fixup directory ownership
# for any newly created directories
for dir in fs_perms_table:
if not fs_perms_table[dir].link:
continue
origin = dvar + dir
if not (os.path.exists(origin) and os.path.isdir(origin) and not os.path.islink(origin)):
continue
link = fs_perms_table[dir].link
if link[0] == "/":
target = dvar + link
ptarget = link
else:
target = os.path.join(os.path.dirname(origin), link)
ptarget = os.path.join(os.path.dirname(dir), link)
if os.path.exists(target):
bb.error("Fixup Perms: Unable to correct directory link, target already exists: %s -> %s" % (dir, ptarget))
continue
# Create path to move directory to, move it, and then setup the symlink
bb.mkdirhier(os.path.dirname(target))
#bb.note("Fixup Perms: Rename %s -> %s" % (dir, ptarget))
os.rename(origin, target)
#bb.note("Fixup Perms: Link %s -> %s" % (dir, link))
os.symlink(link, origin)
for dir in fs_perms_table:
if fs_perms_table[dir].link:
continue
origin = dvar + dir
if not (os.path.exists(origin) and os.path.isdir(origin)):
continue
fix_perms(origin, fs_perms_table[dir].mode, fs_perms_table[dir].uid, fs_perms_table[dir].gid, dir)
if fs_perms_table[dir].walk == 'true':
for root, dirs, files in os.walk(origin):
for dr in dirs:
each_dir = os.path.join(root, dr)
fix_perms(each_dir, fs_perms_table[dir].mode, fs_perms_table[dir].uid, fs_perms_table[dir].gid, dir)
for f in files:
each_file = os.path.join(root, f)
fix_perms(each_file, fs_perms_table[dir].fmode, fs_perms_table[dir].fuid, fs_perms_table[dir].fgid, dir)
}
python base_conditional () {
def base_conditional(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.conditional(variable, checkvalue, truevalue, falsevalue, d)
}
python sstate_clean_manifest () {
def sstate_clean_manifest(manifest, d):
import oe.path
mfile = open(manifest)
entries = mfile.readlines()
mfile.close()
for entry in entries:
entry = entry.strip()
bb.debug(2, "Removing manifest: %s" % entry)
# We can race against another package populating directories as we're removing them
# so we ignore errors here.
try:
if entry.endswith("/"):
if os.path.islink(entry[:-1]):
os.remove(entry[:-1])
elif os.path.exists(entry) and len(os.listdir(entry)) == 0:
os.rmdir(entry[:-1])
else:
oe.path.remove(entry)
except OSError:
pass
oe.path.remove(manifest)
}
python base_path_join () {
def base_path_join(a, *p):
return oe.path.join(a, *p)
}
python base_get_metadata_svn_revision () {
def base_get_metadata_svn_revision(path, d):
revision = "<unknown>"
try:
revision = file( "%s/.svn/entries" % path ).readlines()[3].strip()
except IOError:
pass
return revision
}
python sstate_install () {
def sstate_install(ss, d):
import oe.path
sharedfiles = []
shareddirs = []
bb.mkdirhier(d.expand("/tool/yocto/poky/build/tmp/sstate-control"))
manifest = d.expand("/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-linux-xilinx.%s" % ss['name'])
if os.access(manifest, os.R_OK):
bb.fatal("Package already staged (%s)?!" % manifest)
locks = []
for lock in ss['lockfiles-shared']:
locks.append(bb.utils.lockfile(lock, True))
for lock in ss['lockfiles']:
locks.append(bb.utils.lockfile(lock))
for state in ss['dirs']:
oe.path.copytree(state[1], state[2])
for walkroot, dirs, files in os.walk(state[1]):
bb.debug(2, "Staging files from %s to %s" % (state[1], state[2]))
for file in files:
srcpath = os.path.join(walkroot, file)
dstpath = srcpath.replace(state[1], state[2])
#bb.debug(2, "Staging %s to %s" % (srcpath, dstpath))
sharedfiles.append(dstpath)
for dir in dirs:
srcdir = os.path.join(walkroot, dir)
dstdir = srcdir.replace(state[1], state[2])
#bb.debug(2, "Staging %s to %s" % (srcdir, dstdir))
if not dstdir.endswith("/"):
dstdir = dstdir + "/"
shareddirs.append(dstdir)
f = open(manifest, "w")
for file in sharedfiles:
f.write(file + "\n")
# We want to ensure that directories appear at the end of the manifest
# so that when we test to see if they should be deleted any contents
# added by the task will have been removed first.
dirs = sorted(shareddirs, key=len)
# Must remove children first, which will have a longer path than the parent
for di in reversed(dirs):
f.write(di + "\n")
f.close()
for postinst in (d.getVar('SSTATEPOSTINSTFUNCS', True) or '').split():
bb.build.exec_func(postinst, d)
for lock in locks:
bb.utils.unlockfile(lock)
}
python base_get_metadata_monotone_branch () {
def base_get_metadata_monotone_branch(path, d):
monotone_branch = "<unknown>"
try:
monotone_branch = file( "%s/_MTN/options" % path ).read().strip()
if monotone_branch.startswith( "database" ):
monotone_branch_words = monotone_branch.split()
monotone_branch = monotone_branch_words[ monotone_branch_words.index( "branch" )+1][1:-1]
except:
pass
return monotone_branch
}
python package_qa_check_staticdev () {
def package_qa_check_staticdev(path, name, d, elf, messages):
"""
Check for ".a" library in non-staticdev packages
There are a number of exceptions to this rule, -pic packages can contain
static libraries, the _nonshared.a belong with their -dev packages and
libgcc.a, libgcov.a will be skipped in their packages
"""
if not name.endswith("-pic") and not name.endswith("-staticdev") and path.endswith(".a") and not path.endswith("_nonshared.a"):
messages.append("non -staticdev package contains static .a library: %s path '%s'" % \
(name, package_qa_clean_path(path,d)))
}
python get_process_cputime () {
def get_process_cputime(pid):
fields = open("/proc/%d/stat" % pid, "r").readline().rstrip().split()
# 13: utime, 14: stime, 15: cutime, 16: cstime
return sum(int(field) for field in fields[13:16])
}
python package_do_split_locales () {
if (d.getVar('PACKAGE_NO_LOCALE', True) == '1'):
bb.debug(1, "package requested not splitting locales")
return
packages = (d.getVar('PACKAGES', True) or "").split()
datadir = d.getVar('datadir', True)
if not datadir:
bb.note("datadir not defined")
return
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
if pn + '-locale' in packages:
packages.remove(pn + '-locale')
localedir = os.path.join(dvar + datadir, 'locale')
if not os.path.isdir(localedir):
bb.debug(1, "No locale files in this package")
return
locales = os.listdir(localedir)
summary = d.getVar('SUMMARY', True) or pn
description = d.getVar('DESCRIPTION', True) or ""
locale_section = d.getVar('LOCALE_SECTION', True)
mlprefix = d.getVar('MLPREFIX', True) or ""
for l in sorted(locales):
ln = legitimize_package_name(l)
pkg = pn + '-locale-' + ln
packages.append(pkg)
d.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l))
d.setVar('RDEPENDS_' + pkg, '%s %svirtual-locale-%s' % (pn, mlprefix, ln))
d.setVar('RPROVIDES_' + pkg, '%s-locale %s%s-translation' % (pn, mlprefix, ln))
d.setVar('SUMMARY_' + pkg, '%s - %s translations' % (summary, l))
d.setVar('DESCRIPTION_' + pkg, '%s This package contains language translation files for the %s locale.' % (description, l))
if locale_section:
d.setVar('SECTION_' + pkg, locale_section)
d.setVar('PACKAGES', ' '.join(packages))
# Disabled by RP 18/06/07
# Wildcards aren't supported in debian
# They break with ipkg since glibc-locale* will mean that
# glibc-localedata-translit* won't install as a dependency
# for some other package which breaks meta-toolchain
# Probably breaks since virtual-locale- isn't provided anywhere
#rdep = (d.getVar('RDEPENDS_%s' % pn, True) or d.getVar('RDEPENDS', True) or "").split()
#rdep.append('%s-locale*' % pn)
#d.setVar('RDEPENDS_%s' % pn, ' '.join(rdep))
}
python check_pseudo_wrapper () {
def check_pseudo_wrapper():
import sys
if not sys.argv[0].endswith('/bitbake'):
return ""
import subprocess as sub
# Check if bitbake wrapper is being used
pseudo_build = os.environ.get( 'PSEUDO_BUILD' )
if not pseudo_build:
bb.warn("Bitbake has not been run using the bitbake wrapper (scripts/bitbake); this is likely because your PATH has been altered from that normally set up by the oe-init-build-env script. Not using the wrapper may result in failures during package installation, so it is highly recommended that you set your PATH back so that the wrapper script is being executed.")
if (not pseudo_build) or pseudo_build == '2':
# pseudo ought to be working, let's see if it is...
p = sub.Popen(['sh', '-c', 'PSEUDO_DISABLED=0 id -u'],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
if out.rstrip() != '0':
msg = "Pseudo is not functioning correctly, which will cause failures during package installation. Please check your configuration."
if pseudo_build == '2':
return msg
else:
bb.warn(msg)
return ""
}
python do_qa_staging () {
bb.note("QA checking staging")
if not package_qa_check_staged(d.expand('/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sysroot-destdir///tool/yocto/poky/build/tmp/sysroots/virtex5/usr/lib'), d):
bb.fatal("QA staging was broken by the package built above")
}
python sstate_add () {
def sstate_add(ss, source, dest, d):
srcbase = os.path.basename(source)
ss['dirs'].append([srcbase, source, dest])
return ss
}
python do_qa_configure () {
import subprocess
configs = []
workdir = d.getVar('WORKDIR', True)
bb.note("Checking autotools environment for common misconfiguration")
for root, dirs, files in os.walk(workdir):
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \
os.path.join(root,"config.log")
if "config.log" in files:
if subprocess.call(statement, shell=True) == 0:
bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
Rerun configure task after fixing this. The path was '%s'""" % root)
if "configure.ac" in files:
configs.append(os.path.join(root,"configure.ac"))
if "configure.in" in files:
configs.append(os.path.join(root, "configure.in"))
cnf = d.getVar('EXTRA_OECONF', True) or ""
if "gettext" not in d.getVar('P', True) and "gcc-runtime" not in d.getVar('P', True) and "--disable-nls" not in cnf:
ml = d.getVar("MLPREFIX", True) or ""
if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
gt = "gettext-native"
elif bb.data.inherits_class('cross-canadian', d):
gt = "gettext-nativesdk"
else:
gt = "virtual/" + ml + "gettext"
deps = bb.utils.explode_deps(d.getVar('DEPENDS', True) or "")
if gt not in deps:
for config in configs:
gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
if subprocess.call(gnu, shell=True) == 0:
bb.fatal("""%s required but not in DEPENDS for file %s.
Missing inherit gettext?""" % (gt, config))
if not package_qa_check_license(workdir, d):
bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")
}
python should_apply () {
def should_apply(parm, d):
"""Determine if we should apply the given patch"""
if "mindate" in parm or "maxdate" in parm:
pn = d.getVar('PN', True)
srcdate = d.getVar('SRCDATE_%s' % pn, True)
if not srcdate:
srcdate = d.getVar('SRCDATE', True)
if srcdate == "now":
srcdate = d.getVar('DATE', True)
if "maxdate" in parm and parm["maxdate"] < srcdate:
return False, 'is outdated'
if "mindate" in parm and parm["mindate"] > srcdate:
return False, 'is predated'
if "minrev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and srcrev < parm["minrev"]:
return False, 'applies to later revisions'
if "maxrev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and srcrev > parm["maxrev"]:
return False, 'applies to earlier revisions'
if "rev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and parm["rev"] not in srcrev:
return False, "doesn't apply to revision"
if "notrev" in parm:
srcrev = d.getVar('SRCREV', True)
if srcrev and parm["notrev"] in srcrev:
return False, "doesn't apply to revision"
return True, None
}
python check_supported_distro () {
def check_supported_distro(sanity_data):
tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
if not tested_distros:
return
if os.path.exists("/etc/redhat-release"):
f = open("/etc/redhat-release", "r")
try:
distro = f.readline().strip()
finally:
f.close()
elif os.path.exists("/etc/SuSE-release"):
import re
f = open("/etc/SuSE-release", "r")
try:
distro = f.readline()
# Remove the architecture suffix e.g. (i586)
distro = re.sub(r' \([a-zA-Z0-9\-_]*\)$', '', distro).strip()
finally:
f.close()
else:
# Use LSB method
import subprocess as sub
try:
p = sub.Popen(['lsb_release','-d','-s'],stdout=sub.PIPE,stderr=sub.PIPE)
out, err = p.communicate()
distro = out.rstrip()
except Exception:
distro = None
if not distro:
if os.path.exists("/etc/lsb-release"):
f = open("/etc/lsb-release", "r")
try:
for line in f:
lns = line.split('=')
if lns[0] == "DISTRIB_DESCRIPTION":
distro = lns[1].strip('"\n')
break
finally:
f.close()
if distro:
if distro not in [x.strip() for x in tested_distros.split('\\n')]:
bb.warn('Host distribution "%s" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.' % distro)
else:
bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')
}
python preferred_ml_updates () {
def preferred_ml_updates(d):
# If any PREFERRED_PROVIDER or PREFERRED_VERSIONS are set,
# we need to mirror these variables in the multilib case
multilibs = d.getVar('MULTILIBS', True) or ""
if not multilibs:
return
prefixes = []
for ext in multilibs.split():
eext = ext.split(':')
if len(eext) > 1 and eext[0] == 'multilib':
prefixes.append(eext[1])
versions = []
providers = []
for v in d.keys():
if v.startswith("PREFERRED_VERSION_"):
versions.append(v)
if v.startswith("PREFERRED_PROVIDER_"):
providers.append(v)
for v in versions:
val = d.getVar(v, False)
pkg = v.replace("PREFERRED_VERSION_", "")
if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
continue
for p in prefixes:
newname = "PREFERRED_VERSION_" + p + "-" + pkg
if not d.getVar(newname, False):
d.setVar(newname, val)
for prov in providers:
val = d.getVar(prov, False)
pkg = prov.replace("PREFERRED_PROVIDER_", "")
if pkg.endswith("-native") or pkg.endswith("-nativesdk"):
continue
virt = ""
if pkg.startswith("virtual/"):
pkg = pkg.replace("virtual/", "")
virt = "virtual/"
for p in prefixes:
newname = "PREFERRED_PROVIDER_" + virt + p + "-" + pkg
if pkg != "kernel":
val = p + "-" + val
if not d.getVar(newname, False):
d.setVar(newname, val)
mp = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
extramp = []
for p in mp:
if p.endswith("-native") or p.endswith("-nativesdk"):
continue
virt = ""
if p.startswith("virtual/"):
p = p.replace("virtual/", "")
virt = "virtual/"
for pref in prefixes:
extramp.append(virt + pref + "-" + p)
d.setVar("MULTI_PROVIDER_WHITELIST", " ".join(mp + extramp))
}
python do_patch () {
bb.build.exec_func('base_do_patch', d)
}
python base_less_or_equal () {
def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
return oe.utils.less_or_equal(variable, checkvalue, truevalue, falsevalue, d)
}
python check_sanity () {
def check_sanity(sanity_data):
from bb import note, error, data, __version__
import subprocess
try:
from distutils.version import LooseVersion
except ImportError:
def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1
import commands
# Check the bitbake version meets minimum requirements
minversion = sanity_data.getVar('BB_MIN_VERSION', True)
if not minversion:
# Hack: BB_MIN_VERSION hasn't been parsed yet so return
# and wait for the next call
print "Foo %s" % minversion
return
if 0 == os.getuid():
raise_sanity_error("Do not use Bitbake as root.", sanity_data)
messages = ""
# Check the Python version, we now use Python 2.6 features in
# various classes
import sys
if sys.hexversion < 0x020600F0:
messages = messages + 'The system requires at least Python 2.6 to run. Please update your Python interpreter.\n'
if (LooseVersion(__version__) < LooseVersion(minversion)):
messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
# Check that the MACHINE is valid, if it is set
if sanity_data.getVar('MACHINE', True):
if not check_conf_exists("conf/machine/virtex5.conf", sanity_data):
messages = messages + 'Please set a valid MACHINE in your local.conf or environment\n'
else:
messages = messages + check_sanity_validmachine(sanity_data)
else:
messages = messages + 'Please set a MACHINE in your local.conf or environment\n'
# Check we are using a valid lacal.conf
current_conf = sanity_data.getVar('CONF_VERSION', True)
conf_version = sanity_data.getVar('LOCALCONF_VERSION', True)
if current_conf != conf_version:
messages = messages + "Your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes.\n"
# Check bblayers.conf is valid
current_lconf = sanity_data.getVar('LCONF_VERSION', True)
lconf_version = sanity_data.getVar('LAYER_CONF_VERSION', True)
if current_lconf != lconf_version:
messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
# If we have a site.conf, check it's valid
if check_conf_exists("conf/site.conf", sanity_data):
current_sconf = sanity_data.getVar('SCONF_VERSION', True)
sconf_version = sanity_data.getVar('SITE_CONF_VERSION', True)
if current_sconf != sconf_version:
messages = messages + "Your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf conf/site.conf.sample\" is a good way to visualise the changes.\n"
assume_provided = sanity_data.getVar('ASSUME_PROVIDED', True).split()
# Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
if "diffstat-native" not in assume_provided:
messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
# Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't
# set, since so much relies on it being set.
dldir = sanity_data.getVar('DL_DIR', True)
if not dldir:
messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
messages = messages + "DL_DIR: %s exists but you do not appear to have write access to it. \n" % dldir
# Check that the DISTRO is valid, if set
# need to take into account DISTRO renaming DISTRO
distro = sanity_data.getVar('DISTRO', True)
if distro:
if not ( check_conf_exists("conf/distro/poky.conf", sanity_data) or check_conf_exists("conf/distro/include/poky.inc", sanity_data) ):
messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % sanity_data.getVar("DISTRO", True )
missing = ""
if not check_app_exists("make", sanity_data):
missing = missing + "GNU make,"
if not check_app_exists('gcc', sanity_data):
missing = missing + "C Compiler (%sgcc)," % sanity_data.getVar("BUILD_PREFIX", True)
if not check_app_exists('g++', sanity_data):
missing = missing + "C++ Compiler (%sg++)," % sanity_data.getVar("BUILD_PREFIX", True)
required_utilities = sanity_data.getVar('SANITY_REQUIRED_UTILITIES', True)
if "qemu-native" in assume_provided:
if not check_app_exists("qemu-arm", sanity_data):
messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
paths = sanity_data.getVar('PATH', True).split(":")
if "." in paths or "" in paths:
messages = messages + "PATH contains '.' or '', which will break the build, please remove this."
bbpaths = sanity_data.getVar('BBPATH', True).split(":")
if "." in bbpaths or "" in bbpaths:
# TODO: change the following message to fatal when all BBPATH issues
# are fixed
bb.warn("BBPATH references the current directory, either through " \
"an empty entry, or a '.'.\n\t This is unsafe and means your "\
"layer configuration is adding empty elements to BBPATH.\n\t "\
"Please check your layer.conf files and other BBPATH " \
"settings to remove the current working directory " \
"references.");
if sanity_data.getVar('TARGET_ARCH', True) == "arm":
# This path is no longer user-readable in modern (very recent) Linux
try:
if os.path.exists("/proc/sys/vm/mmap_min_addr"):
f = open("/proc/sys/vm/mmap_min_addr", "r")
try:
if (int(f.read().strip()) > 65536):
messages = messages + "/proc/sys/vm/mmap_min_addr is not <= 65536. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 65536 in /etc/sysctl.conf.\n"
finally:
f.close()
except:
pass
for util in required_utilities.split():
if not check_app_exists( util, sanity_data ):
missing = missing + "%s," % util
if missing != "":
missing = missing.rstrip(',')
messages = messages + "Please install the following missing utilities: %s\n" % missing
pseudo_msg = check_pseudo_wrapper()
if pseudo_msg != "":
messages = messages + pseudo_msg + '\n'
check_supported_distro(sanity_data)
toolchain_msg = check_toolchain(sanity_data)
if toolchain_msg != "":
messages = messages + toolchain_msg + '\n'
# Check if DISPLAY is set if IMAGETEST is set
if not sanity_data.getVar( 'DISPLAY', True ) and sanity_data.getVar( 'IMAGETEST', True ) == 'qemu':
messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
omask = os.umask(022)
if omask & 0755:
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
os.umask(omask)
oes_bb_conf = sanity_data.getVar( 'OES_BITBAKE_CONF', True)
if not oes_bb_conf:
messages = messages + 'You do not include the OpenEmbedded version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
nolibs = sanity_data.getVar('NO32LIBS', True)
if not nolibs:
lib32path = '/lib'
if os.path.exists('/lib64') and ( os.path.islink('/lib64') or os.path.islink('/lib') ):
lib32path = '/lib32'
if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
messages = messages + "You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n"
tmpdir = sanity_data.getVar('TMPDIR', True)
sstate_dir = sanity_data.getVar('SSTATE_DIR', True)
# Check saved sanity info
last_sanity_version = 0
last_tmpdir = ""
last_sstate_dir = ""
sanityverfile = 'conf/sanity_info'
if os.path.exists(sanityverfile):
f = file(sanityverfile, 'r')
for line in f:
if line.startswith('SANITY_VERSION'):
last_sanity_version = int(line.split()[1])
if line.startswith('TMPDIR'):
last_tmpdir = line.split()[1]
if line.startswith('SSTATE_DIR'):
last_sstate_dir = line.split()[1]
sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1)
if last_sanity_version < sanity_version:
messages = messages + check_sanity_version_change(sanity_data)
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
else:
if last_tmpdir != tmpdir:
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
if last_sstate_dir != sstate_dir:
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
if os.path.exists("conf") and not messages:
f = file(sanityverfile, 'w')
f.write("SANITY_VERSION %s\n" % sanity_version)
f.write("TMPDIR %s\n" % tmpdir)
f.write("SSTATE_DIR %s\n" % sstate_dir)
#
# Check that TMPDIR hasn't changed location since the last time we were run
#
checkfile = os.path.join(tmpdir, "saved_tmpdir")
if os.path.exists(checkfile):
f = file(checkfile, "r")
saved_tmpdir = f.read().strip()
if (saved_tmpdir != tmpdir):
messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir
else:
f = file(checkfile, "w")
f.write(tmpdir)
f.close()
#
# Check the 'ABI' of TMPDIR
#
current_abi = sanity_data.getVar('OELAYOUT_ABI', True)
abifile = sanity_data.getVar('SANITY_ABIFILE', True)
if os.path.exists(abifile):
f = file(abifile, "r")
abi = f.read().strip()
if not abi.isdigit():
f = file(abifile, "w")
f.write(current_abi)
elif abi == "2" and current_abi == "3":
bb.note("Converting staging from layout version 2 to layout version 3")
subprocess.call(sanity_data.expand("mv /tool/yocto/poky/build/tmp/staging /tool/yocto/poky/build/tmp/sysroots"), shell=True)
subprocess.call(sanity_data.expand("ln -s sysroots /tool/yocto/poky/build/tmp/staging"), shell=True)
subprocess.call(sanity_data.expand("cd /tool/yocto/poky/build/tmp/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"), shell=True)
f = file(abifile, "w")
f.write(current_abi)
elif abi == "3" and current_abi == "4":
bb.note("Converting staging layout from version 3 to layout version 4")
if os.path.exists(sanity_data.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/virtex5-poky-linux")):
subprocess.call(sanity_data.expand("mv /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/virtex5-poky-linux /tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts"), shell=True)
subprocess.call(sanity_data.expand("ln -s /tool/yocto/poky/build/tmp/sysroots/virtex5/usr/bin/crossscripts /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/bin/virtex5-poky-linux"), shell=True)
f = file(abifile, "w")
f.write(current_abi)
elif abi == "4":
messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
elif abi == "5" and current_abi == "6":
bb.note("Converting staging layout from version 5 to layout version 6")
subprocess.call(sanity_data.expand("mv /tool/yocto/poky/build/tmp/pstagelogs /tool/yocto/poky/build/tmp/sstate-control"), shell=True)
f = file(abifile, "w")
f.write(current_abi)
elif abi == "7" and current_abi == "8":
messages = messages + "Your configuration is using stamp files including the sstate hash but your build directory was built with stamp files that do not include this.\nTo continue, either rebuild or switch back to the OEBasic signature handler with BB_SIGNATURE_HANDLER = 'OEBasic'.\n"
elif (abi != current_abi):
# Code to convert from one ABI to another could go here if possible.
messages = messages + "Error, TMPDIR has changed its layout version number (%s to %s) and you need to either rebuild, revert or adjust it at your own risk.\n" % (abi, current_abi)
else:
f = file(abifile, "w")
f.write(current_abi)
f.close()
oeroot = sanity_data.getVar('COREBASE')
if oeroot.find ('+') != -1:
messages = messages + "Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include a +."
elif oeroot.find (' ') != -1:
messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space."
if messages != "":
raise_sanity_error(messages, sanity_data)
}
python check_sanity_tmpdir_change () {
def check_sanity_tmpdir_change(tmpdir, data):
# Sanity checks to be done when the value of TMPDIR changes
# Check that TMPDIR isn't on a filesystem with limited filename length (eg. eCryptFS)
testmsg = check_create_long_filename(tmpdir, "TMPDIR")
# Check that we can fetch from various network transports
testmsg = testmsg + check_connectivity(data)
return testmsg
}
python sstate_hardcode_path () {
def sstate_hardcode_path(d):
import subprocess
# Need to remove hardcoded paths and fix these when we install the
# staging packages.
#
# Note: the logic in this function needs to match the reverse logic
# in sstate_installpkg(ss, d)
staging = d.getVar('STAGING_DIR', True)
staging_target = d.getVar('STAGING_DIR_TARGET', True)
staging_host = d.getVar('STAGING_DIR_HOST', True)
sstate_builddir = d.getVar('SSTATE_BUILDDIR', True)
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
sstate_grep_cmd = "grep -l -e '%s'" % (staging)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIR:g'" % (staging)
elif bb.data.inherits_class('cross', d):
sstate_grep_cmd = "grep -l -e '(%s|%s)'" % (staging_target, staging)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRTARGET:g; s:%s:FIXMESTAGINGDIR:g'" % (staging_target, staging)
else:
sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
fixmefn = sstate_builddir + "fixmepath"
sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
sstate_filelist_cmd = "tee %s" % (fixmefn)
# fixmepath file needs relative paths, drop sstate_builddir prefix
sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn)
# Limit the fixpaths and sed operations based on the initial grep search
# This has the side effect of making sure the vfs cache is hot
sstate_hardcode_cmd = "%s | xargs %s | %s | xargs --no-run-if-empty %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd)
print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)
subprocess.call(sstate_hardcode_cmd, shell=True)
# If the fixmefn is empty, remove it..
if os.stat(fixmefn).st_size == 0:
os.remove(fixmefn)
else:
print "Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd)
subprocess.call(sstate_filelist_relative_cmd, shell=True)
}
python splitfile () {
def splitfile(file, debugfile, debugsrcdir, d):
# Function to split a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
# is split and the split off portions go to debugfile.
#
# The debug information is then processed for src references. These
# references are copied to debugsrcdir, if defined.
import commands, stat, subprocess
dvar = d.getVar('PKGD', True)
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
objcopy = d.getVar("OBJCOPY", True)
debugedit = d.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/debugedit")
workdir = d.getVar("WORKDIR", True)
workparentdir = os.path.dirname(workdir)
sourcefile = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/debugsources.list")
# We ignore kernel modules, we don't generate debug info files.
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
return 1
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
origmode = os.stat(file)[stat.ST_MODE]
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
# We need to extract the debug src information here...
if debugsrcdir:
subprocess.call("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workparentdir, debugsrcdir, sourcefile, file), shell=True)
bb.mkdirhier(os.path.dirname(debugfile))
subprocess.call("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile), shell=True)
# Set the debuglink to have the view of the file path on the target
subprocess.call("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file), shell=True)
if newmode:
os.chmod(file, origmode)
return 0
}
python do_listtasks () {
import sys
# emit variables and shell functions
#bb.data.emit_env(sys.__stdout__, d)
# emit the metadata which isnt valid shell
for e in d.keys():
if d.getVarFlag(e, 'task'):
bb.plain("%s" % e)
}
python package_qa_clean_path () {
def package_qa_clean_path(path,d):
""" Remove the common prefix from the path. In this case it is the TMPDIR"""
return path.replace(d.getVar('TMPDIR',True),"")
}
python machine_paths () {
def machine_paths(d):
"""List any existing machine specific filespath directories"""
machine = d.getVar("MACHINE", True)
filespathpkg = d.getVar("FILESPATHPKG", True).split(":")
for basepath in d.getVar("FILESPATHBASE", True).split(":"):
for pkgpath in filespathpkg:
machinepath = os.path.join(basepath, pkgpath, machine)
if os.path.isdir(machinepath):
yield machinepath
}
python package_qa_check_buildpaths () {
def package_qa_check_buildpaths(path, name, d, elf, messages):
"""
Check for build paths inside target files and error if not found in the whitelist
"""
# Ignore .debug files, not interesting
if path.find(".debug") != -1:
return
# Ignore symlinks
if os.path.islink(path):
return
tmpdir = d.getVar('TMPDIR', True)
file_content = open(path).read()
if tmpdir in file_content:
messages.append("File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
}
python incompatible_license () {
def incompatible_license(d, dont_want_license, package=""):
"""
This function checks if a recipe has only incompatible licenses. It also take into consideration 'or'
operand.
"""
import re
import oe.license
from fnmatch import fnmatchcase as fnmatch
pn = d.getVar('PN', True)
dont_want_licenses = []
dont_want_licenses.append(d.getVar('INCOMPATIBLE_LICENSE', True))
recipe_license = d.getVar('LICENSE', True)
if package != "":
if d.getVar('LICENSE_' + pn + '-' + package, True):
license = d.getVar('LICENSE_' + pn + '-' + package, True)
else:
license = recipe_license
else:
license = recipe_license
spdx_license = return_spdx(d, dont_want_license)
dont_want_licenses.append(spdx_license)
def include_license(license):
if any(fnmatch(license, pattern) for pattern in dont_want_licenses):
return False
else:
return True
def choose_licenses(a, b):
if all(include_license(lic) for lic in a):
return a
else:
return b
"""
If you want to exlude license named generically 'X', we surely want to exlude 'X+' as well.
In consequence, we will exclude the '+' character from LICENSE in case INCOMPATIBLE_LICENSE
is not a 'X+' license.
"""
if not re.search(r'[+]',dont_want_license):
licenses=oe.license.flattened_licenses(re.sub(r'[+]', '', license), choose_licenses)
else:
licenses=oe.license.flattened_licenses(license, choose_licenses)
for onelicense in licenses:
if not include_license(onelicense):
return True
return False
}
python do_package_setscene () {
sstate_setscene(d)
}
python base_dep_prepend () {
None}
python legitimize_package_name () {
def legitimize_package_name(s):
"""
Make sure package names are legitimate strings
"""
import re
def fixutf(m):
cp = m.group(1)
if cp:
return ('\u%s' % cp).decode('unicode_escape').encode('utf-8')
# Handle unicode codepoints encoded as <U0123>, as in glibc locale files.
s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s)
# Remaining package name validity fixes
return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
}
python check_create_long_filename () {
def check_create_long_filename(filepath, pathname):
testfile = os.path.join(filepath, ''.join([`num`[-1] for num in xrange(1,200)]))
try:
if not os.path.exists(filepath):
bb.utils.mkdirhier(filepath)
f = file(testfile, "w")
f.close()
os.remove(testfile)
except IOError as (errno, strerror):
if errno == 36: # ENAMETOOLONG
return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
else:
return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
except OSError as (errno, strerror):
return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror)
return ""
}
python do_populate_lic_setscene () {
sstate_setscene(d)
}
python check_toolchain () {
def check_toolchain(data):
tune_error_set = []
deftune = data.getVar("DEFAULTTUNE", True)
tune_errors = check_toolchain_tune(data, deftune, 'default')
if tune_errors:
tune_error_set.append(tune_errors)
multilibs = (data.getVar("MULTILIB_VARIANTS", True) or "").split()
if multilibs:
seen_libs = []
seen_tunes = []
for lib in multilibs:
if lib in seen_libs:
tune_error_set.append("The multilib '%s' appears more than once." % lib)
else:
seen_libs.append(lib)
tune = data.getVar("DEFAULTTUNE_virtclass-multilib-%s" % lib, True)
if tune in seen_tunes:
tune_error_set.append("The tuning '%s' appears in more than one multilib." % tune)
else:
seen_libs.append(tune)
if tune == deftune:
tune_error_set.append("Multilib '%s' (%s) is also the default tuning." % (lib, deftune))
else:
tune_errors = check_toolchain_tune(data, tune, lib)
if tune_errors:
tune_error_set.append(tune_errors)
if tune_error_set:
return "Toolchain tunings invalid:\n" + '\n'.join(tune_error_set)
return ""
}
python pstaging_fetch () {
def pstaging_fetch(sstatepkg, d):
import bb.fetch2
# Only try and fetch if the user has configured a mirror
mirrors = d.getVar('SSTATE_MIRRORS', True)
if not mirrors:
return
# Copy the data object and override DL_DIR and SRC_URI
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
dldir = localdata.expand("/tool/yocto/poky/build/sstate-cache")
srcuri = "file://" + os.path.basename(sstatepkg)
bb.mkdirhier(dldir)
localdata.setVar('DL_DIR', dldir)
localdata.setVar('PREMIRRORS', mirrors)
localdata.setVar('SRC_URI', srcuri)
# Try a fetch from the sstate mirror, if it fails just return and
# we will build the package
try:
fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
fetcher.download()
# Need to optimise this, if using file:// urls, the fetcher just changes the local path
# For now work around by symlinking
localpath = bb.data.expand(fetcher.localpath(srcuri), localdata)
if localpath != sstatepkg and os.path.exists(localpath) and not os.path.exists(sstatepkg):
os.symlink(localpath, sstatepkg)
except bb.fetch2.BBFetchException:
pass
}
python package_qa_check_dev () {
def package_qa_check_dev(path, name, d, elf, messages):
"""
Check for ".so" library symlinks in non-dev packages
"""
if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-nativesdk") and path.endswith(".so") and os.path.islink(path):
messages.append("non -dev/-dbg/-nativesdk package contains symlink .so: %s path '%s'" % \
(name, package_qa_clean_path(path,d)))
}
python prserv_get_pr_auto () {
def prserv_get_pr_auto(d):
import oe.prservice
if d.getVar('USE_PR_SERV', True) != "1":
bb.warn("Not using network based PR service")
return None
version = d.getVar("PRAUTOINX", True)
pkgarch = d.getVar("PACKAGE_ARCH", True)
checksum = d.getVar("BB_TASKHASH", True)
if d.getVar('PRSERV_LOCKDOWN', True):
auto_rev = d.getVar('PRAUTO_' + version + '_' + pkgarch, True) or d.getVar('PRAUTO_' + version, True) or None
else:
conn = d.getVar("__PRSERV_CONN", True)
if conn is None:
conn = oe.prservice.prserv_make_conn(d)
if conn is None:
return None
auto_rev = conn.getPR(version, pkgarch, checksum)
return auto_rev}
python do_fetch () {
bb.build.exec_func('base_do_fetch', d)
}
python write_specfile () {
import textwrap
import oe.packagedata
# append information for logs and patches to %prep
def add_prep(d,spec_files_bottom):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
spec_files_bottom.append('%%prep -n %s' % d.getVar('PN', True) )
spec_files_bottom.append('%s' % "echo \"include logs and patches, Please check them in SOURCES\"")
spec_files_bottom.append('')
# get the name of tarball for sources, patches and logs
def get_tarballs(d):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
return get_package(d)
# append the name of tarball to key word 'SOURCE' in xxx.spec.
def tail_source(d,source_list=[],patch_list=None):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
source_number = 0
patch_number = 0
for source in source_list:
spec_preamble_top.append('Source' + str(source_number) + ': %s' % source)
source_number += 1
if patch_list:
for patch in patch_list:
print_deps(patch, "Patch" + str(patch_number), spec_preamble_top, d)
patch_number += 1
# We need a simple way to remove the MLPREFIX from the package name,
# and dependency information...
def strip_multilib(name, d):
multilibs = d.getVar('MULTILIBS', True) or ""
for ext in multilibs.split():
eext = ext.split(':')
if len(eext) > 1 and eext[0] == 'multilib' and name and name.find(eext[1] + '-') >= 0:
name = "".join(name.split(eext[1] + '-'))
return name
# ml = d.getVar("MLPREFIX", True)
# if ml and name and len(ml) != 0 and name.find(ml) == 0:
# return ml.join(name.split(ml, 1)[1:])
# return name
# In RPM, dependencies are of the format: pkg <>= Epoch:Version-Release
# This format is similar to OE, however there are restrictions on the
# characters that can be in a field. In the Version field, "-"
# characters are not allowed. "-" is allowed in the Release field.
#
# We translate the "-" in the version to a "+", by loading the PKGV
# from the dependent recipe, replacing the - with a +, and then using
# that value to do a replace inside of this recipe's dependencies.
# This preserves the "-" separator between the version and release, as
# well as any "-" characters inside of the release field.
#
# All of this has to happen BEFORE the mapping_rename_hook as
# after renaming we cannot look up the dependencies in the packagedata
# store.
def translate_vers(varname, d):
depends = d.getVar(varname, True)
if depends:
depends_dict = bb.utils.explode_dep_versions(depends)
newdeps_dict = {}
for dep in depends_dict:
ver = depends_dict[dep]
if dep and ver:
if '-' in ver:
subd = oe.packagedata.read_subpkgdata_dict(dep, d)
if 'PKGV' in subd:
pv = subd['PKGV']
reppv = pv.replace('-', '+')
ver = ver.replace(pv, reppv)
newdeps_dict[dep] = ver
depends = bb.utils.join_deps(newdeps_dict)
d.setVar(varname, depends.strip())
# We need to change the style the dependency from BB to RPM
# This needs to happen AFTER the mapping_rename_hook
def print_deps(variable, tag, array, d):
depends = variable
if depends:
depends_dict = bb.utils.explode_dep_versions(depends)
for dep in depends_dict:
ver = depends_dict[dep]
if dep and ver:
ver = ver.replace('(', '')
ver = ver.replace(')', '')
array.append("%s: %s %s" % (tag, dep, ver))
else:
array.append("%s: %s" % (tag, dep))
def walk_files(walkpath, target, conffiles):
import os
for rootpath, dirs, files in os.walk(walkpath):
path = rootpath.replace(walkpath, "")
for dir in dirs:
# All packages own the directories their files are in...
target.append('%dir "' + path + '/' + dir + '"')
for file in files:
if conffiles.count(path + '/' + file):
target.append('%config "' + path + '/' + file + '"')
else:
target.append('"' + path + '/' + file + '"')
# Prevent the prerm/postrm scripts from being run during an upgrade
def wrap_uninstall(scriptvar):
scr = scriptvar.strip()
if scr.startswith("#!"):
pos = scr.find("\n") + 1
else:
pos = 0
scr = scr[:pos] + 'if [ "$1" = "0" ] ; then\n' + scr[pos:] + '\nfi'
return scr
packages = d.getVar('PACKAGES', True)
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
pkgdest = d.getVar('PKGDEST', True)
if not pkgdest:
bb.fatal("No PKGDEST")
return
outspecfile = d.getVar('OUTSPECFILE', True)
if not outspecfile:
bb.fatal("No OUTSPECFILE")
return
# Construct the SPEC file...
srcname = strip_multilib(d.getVar('PN', True), d)
srcsummary = (d.getVar('SUMMARY', True) or d.getVar('DESCRIPTION', True) or ".")
srcversion = d.getVar('PKGV', True).replace('-', '+')
srcrelease = d.getVar('PKGR', True)
srcepoch = (d.getVar('PKGE', True) or "")
srclicense = d.getVar('LICENSE', True)
srcsection = d.getVar('SECTION', True)
srcmaintainer = d.getVar('MAINTAINER', True)
srchomepage = d.getVar('HOMEPAGE', True)
srcdescription = d.getVar('DESCRIPTION', True) or "."
srcdepends = strip_multilib(d.getVar('DEPENDS', True), d)
srcrdepends = []
srcrrecommends = []
srcrsuggests = []
srcrprovides = []
srcrreplaces = []
srcrconflicts = []
srcrobsoletes = []
srcpreinst = []
srcpostinst = []
srcprerm = []
srcpostrm = []
spec_preamble_top = []
spec_preamble_bottom = []
spec_scriptlets_top = []
spec_scriptlets_bottom = []
spec_files_top = []
spec_files_bottom = []
for pkg in packages.split():
localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg)
lf = bb.utils.lockfile(root + ".lock")
localdata.setVar('ROOT', '')
localdata.setVar('ROOT_%s' % pkg, root)
pkgname = localdata.getVar('PKG_%s' % pkg, True)
if not pkgname:
pkgname = pkg
localdata.setVar('PKG', pkgname)
localdata.setVar('OVERRIDES', pkg)
bb.data.update_data(localdata)
conffiles = (localdata.getVar('CONFFILES', True) or "").split()
splitname = strip_multilib(pkgname, d)
splitsummary = (localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or ".")
splitversion = (localdata.getVar('PKGV', True) or "").replace('-', '+')
splitrelease = (localdata.getVar('PKGR', True) or "")
splitepoch = (localdata.getVar('PKGE', True) or "")
splitlicense = (localdata.getVar('LICENSE', True) or "")
splitsection = (localdata.getVar('SECTION', True) or "")
splitdescription = (localdata.getVar('DESCRIPTION', True) or ".")
translate_vers('RDEPENDS', localdata)
translate_vers('RRECOMMENDS', localdata)
translate_vers('RSUGGESTS', localdata)
translate_vers('RPROVIDES', localdata)
translate_vers('RREPLACES', localdata)
translate_vers('RCONFLICTS', localdata)
# Map the dependencies into their final form
mapping_rename_hook(localdata)
splitrdepends = strip_multilib(localdata.getVar('RDEPENDS', True), d) or ""
splitrrecommends = strip_multilib(localdata.getVar('RRECOMMENDS', True), d) or ""
splitrsuggests = strip_multilib(localdata.getVar('RSUGGESTS', True), d) or ""
splitrprovides = strip_multilib(localdata.getVar('RPROVIDES', True), d) or ""
splitrreplaces = strip_multilib(localdata.getVar('RREPLACES', True), d) or ""
splitrconflicts = strip_multilib(localdata.getVar('RCONFLICTS', True), d) or ""
splitrobsoletes = []
# Gather special src/first package data
if srcname == splitname:
srcrdepends = splitrdepends
srcrrecommends = splitrrecommends
srcrsuggests = splitrsuggests
srcrprovides = splitrprovides
srcrreplaces = splitrreplaces
srcrconflicts = splitrconflicts
srcpreinst = localdata.getVar('pkg_preinst', True)
srcpostinst = localdata.getVar('pkg_postinst', True)
srcprerm = localdata.getVar('pkg_prerm', True)
srcpostrm = localdata.getVar('pkg_postrm', True)
file_list = []
walk_files(root, file_list, conffiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.append('%files')
spec_files_top.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
spec_files_top.extend(file_list)
else:
bb.note("Creating EMPTY RPM Package for %s" % splitname)
spec_files_top.append('')
bb.utils.unlockfile(lf)
continue
# Process subpackage data
spec_preamble_bottom.append('%%package -n %s' % splitname)
spec_preamble_bottom.append('Summary: %s' % splitsummary)
if srcversion != splitversion:
spec_preamble_bottom.append('Version: %s' % splitversion)
if srcrelease != splitrelease:
spec_preamble_bottom.append('Release: %s' % splitrelease)
if srcepoch != splitepoch:
spec_preamble_bottom.append('Epoch: %s' % splitepoch)
if srclicense != splitlicense:
spec_preamble_bottom.append('License: %s' % splitlicense)
spec_preamble_bottom.append('Group: %s' % splitsection)
# Replaces == Obsoletes && Provides
if splitrreplaces and splitrreplaces.strip() != "":
for dep in splitrreplaces.split(','):
if splitrprovides:
splitrprovides = splitrprovides + ", " + dep
else:
splitrprovides = dep
if splitrobsoletes:
splitrobsoletes = splitrobsoletes + ", " + dep
else:
splitrobsoletes = dep
print_deps(splitrdepends, "Requires", spec_preamble_bottom, d)
# Suggests in RPM are like recommends in OE-core!
print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
# While there is no analog for suggests... (So call them recommends for now)
print_deps(splitrsuggests, "Recommends", spec_preamble_bottom, d)
print_deps(splitrprovides, "Provides", spec_preamble_bottom, d)
print_deps(splitrobsoletes, "Obsoletes", spec_preamble_bottom, d)
# conflicts can not be in a provide! We will need to filter it.
if splitrconflicts:
depends_dict = bb.utils.explode_dep_versions(splitrconflicts)
newdeps_dict = {}
for dep in depends_dict:
if dep not in splitrprovides:
newdeps_dict[dep] = depends_dict[dep]
if newdeps_dict:
splitrconflicts = bb.utils.join_deps(newdeps_dict)
else:
splitrconflicts = ""
print_deps(splitrconflicts, "Conflicts", spec_preamble_bottom, d)
spec_preamble_bottom.append('')
spec_preamble_bottom.append('%%description -n %s' % splitname)
dedent_text = textwrap.dedent(splitdescription).strip()
spec_preamble_bottom.append('%s' % textwrap.fill(dedent_text, width=75))
spec_preamble_bottom.append('')
# Now process scriptlets
for script in ["preinst", "postinst", "prerm", "postrm"]:
scriptvar = localdata.getVar('pkg_%s' % script, True)
if not scriptvar:
continue
if script == 'preinst':
spec_scriptlets_bottom.append('%%pre -n %s' % splitname)
elif script == 'postinst':
spec_scriptlets_bottom.append('%%post -n %s' % splitname)
elif script == 'prerm':
spec_scriptlets_bottom.append('%%preun -n %s' % splitname)
scriptvar = wrap_uninstall(scriptvar)
elif script == 'postrm':
spec_scriptlets_bottom.append('%%postun -n %s' % splitname)
scriptvar = wrap_uninstall(scriptvar)
spec_scriptlets_bottom.append('# %s - %s' % (splitname, script))
spec_scriptlets_bottom.append(scriptvar)
spec_scriptlets_bottom.append('')
# Now process files
file_list = []
walk_files(root, file_list, conffiles)
if not file_list and localdata.getVar('ALLOW_EMPTY') != "1":
bb.note("Not creating empty RPM package for %s" % splitname)
else:
spec_files_bottom.append('%%files -n %s' % splitname)
spec_files_bottom.append('%defattr(-,-,-,-)')
if file_list:
bb.note("Creating RPM package for %s" % splitname)
spec_files_bottom.extend(file_list)
else:
bb.note("Creating EMPTY RPM Package for %s" % splitname)
spec_files_bottom.append('')
del localdata
bb.utils.unlockfile(lf)
add_prep(d,spec_files_bottom)
spec_preamble_top.append('Summary: %s' % srcsummary)
spec_preamble_top.append('Name: %s' % srcname)
spec_preamble_top.append('Version: %s' % srcversion)
spec_preamble_top.append('Release: %s' % srcrelease)
if srcepoch and srcepoch.strip() != "":
spec_preamble_top.append('Epoch: %s' % srcepoch)
spec_preamble_top.append('License: %s' % srclicense)
spec_preamble_top.append('Group: %s' % srcsection)
spec_preamble_top.append('Packager: %s' % srcmaintainer)
spec_preamble_top.append('URL: %s' % srchomepage)
source_list = get_tarballs(d)
tail_source(d,source_list,None)
# Replaces == Obsoletes && Provides
if srcrreplaces and srcrreplaces.strip() != "":
for dep in srcrreplaces.split(','):
if srcrprovides:
srcrprovides = srcrprovides + ", " + dep
else:
srcrprovides = dep
if srcrobsoletes:
srcrobsoletes = srcrobsoletes + ", " + dep
else:
srcrobsoletes = dep
print_deps(srcdepends, "BuildRequires", spec_preamble_top, d)
print_deps(srcrdepends, "Requires", spec_preamble_top, d)
# Suggests in RPM are like recommends in OE-core!
print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
# While there is no analog for suggests... (So call them recommends for now)
print_deps(srcrsuggests, "Recommends", spec_preamble_top, d)
print_deps(srcrprovides, "Provides", spec_preamble_top, d)
print_deps(srcrobsoletes, "Obsoletes", spec_preamble_top, d)
# conflicts can not be in a provide! We will need to filter it.
if srcrconflicts:
depends_dict = bb.utils.explode_dep_versions(srcrconflicts)
newdeps_dict = {}
for dep in depends_dict:
if dep not in srcrprovides:
newdeps_dict[dep] = depends_dict[dep]
if newdeps_dict:
srcrconflicts = bb.utils.join_deps(newdeps_dict)
else:
srcrconflicts = ""
print_deps(srcrconflicts, "Conflicts", spec_preamble_top, d)
spec_preamble_top.append('')
spec_preamble_top.append('%description')
dedent_text = textwrap.dedent(srcdescription).strip()
spec_preamble_top.append('%s' % textwrap.fill(dedent_text, width=75))
spec_preamble_top.append('')
if srcpreinst:
spec_scriptlets_top.append('%pre')
spec_scriptlets_top.append('# %s - preinst' % srcname)
spec_scriptlets_top.append(srcpreinst)
spec_scriptlets_top.append('')
if srcpostinst:
spec_scriptlets_top.append('%post')
spec_scriptlets_top.append('# %s - postinst' % srcname)
spec_scriptlets_top.append(srcpostinst)
spec_scriptlets_top.append('')
if srcprerm:
spec_scriptlets_top.append('%preun')
spec_scriptlets_top.append('# %s - prerm' % srcname)
scriptvar = wrap_uninstall(srcprerm)
spec_scriptlets_top.append(scriptvar)
spec_scriptlets_top.append('')
if srcpostrm:
spec_scriptlets_top.append('%postun')
spec_scriptlets_top.append('# %s - postrm' % srcname)
scriptvar = wrap_uninstall(srcpostrm)
spec_scriptlets_top.append(scriptvar)
spec_scriptlets_top.append('')
# Write the SPEC file
try:
from __builtin__ import file
specfile = file(outspecfile, 'w')
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
# RPMSPEC_PREAMBLE is a way to add arbitrary text to the top
# of the generated spec file
external_preamble = d.getVar("RPMSPEC_PREAMBLE", True)
if external_preamble:
specfile.write(external_preamble + "\n")
for line in spec_preamble_top:
specfile.write(line + "\n")
for line in spec_preamble_bottom:
specfile.write(line + "\n")
for line in spec_scriptlets_top:
specfile.write(line + "\n")
for line in spec_scriptlets_bottom:
specfile.write(line + "\n")
for line in spec_files_top:
specfile.write(line + "\n")
for line in spec_files_bottom:
specfile.write(line + "\n")
specfile.close()
}
python base_get_metadata_git_branch () {
def base_get_metadata_git_branch(path, d):
branch = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path).read()
if len(branch) != 0:
return branch
return "<unknown>"
}
python check_sanity_eventhandler () {
if bb.event.getName(e) == "BuildStarted" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
sanity_data = copy_data(e)
check_sanity(sanity_data)
elif bb.event.getName(e) == "SanityCheck":
sanity_data = copy_data(e)
sanity_data.setVar("SANITY_USE_EVENTS", "1")
check_sanity(sanity_data)
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
return
}
python oe_filter () {
def oe_filter(f, str, d):
return oe.utils.str_filter(f, str, d)
}
python sstate_cleanall () {
import fnmatch
bb.note("Removing shared state for package %s" % d.getVar('PN', True))
manifest_dir = d.getVar('SSTATE_MANIFESTS', True)
manifest_prefix = d.getVar("SSTATE_MANFILEPREFIX", True)
manifest_pattern = os.path.basename(manifest_prefix) + ".*"
if not os.path.exists(manifest_dir):
return
for manifest in (os.listdir(manifest_dir)):
if fnmatch.fnmatch(manifest, manifest_pattern):
name = manifest.replace(manifest_pattern[:-1], "")
namemap = d.getVar('SSTATETASKNAMES', True).split()
tasks = d.getVar('SSTATETASKS', True).split()
if name not in namemap:
continue
taskname = tasks[namemap.index(name)]
shared_state = sstate_state_fromvars(d, taskname[3:])
sstate_clean(shared_state, d)
}
python do_checkuri () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.checkstatus()
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python is_machine_specific () {
def is_machine_specific(d):
"""Determine whether the current recipe is machine specific"""
machinepaths = set(machine_paths(d))
srcuri = d.getVar("SRC_URI", True).split()
for url in srcuri:
fetcher = bb.fetch2.Fetch([srcuri], d)
if url.startswith("file://"):
if any(fetcher.localpath(url).startswith(mp + "/") for mp in machinepaths):
return True
}
python package_qa_check_useless_rpaths () {
def package_qa_check_useless_rpaths(file, name, d, elf, messages):
"""
Check for RPATHs that are useless but not dangerous
"""
if not elf:
return
objdump = d.getVar('OBJDUMP', True)
env_path = d.getVar('PATH', True)
libdir = d.getVar("libdir", True)
base_libdir = d.getVar("base_libdir", True)
import re
rpath_re = re.compile("\s+RPATH\s+(.*)")
for line in os.popen("LC_ALL=C PATH=%s %s -p '%s' 2> /dev/null" % (env_path, objdump, file), "r"):
m = rpath_re.match(line)
if m:
rpath = m.group(1)
if rpath == libdir or rpath == base_libdir:
# The dynamic linker searches both these places anyway. There is no point in
# looking there again.
messages.append("%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
}
python oe_filter_out () {
def oe_filter_out(f, str, d):
return oe.utils.str_filter_out(f, str, d)
}
python oe_terminal () {
def oe_terminal(command, title, d):
import oe.data
import oe.terminal
for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
value = d.getVar(export, True)
if value is not None:
os.environ[export] = str(value)
terminal = oe.data.typed_value('OE_TERMINAL', d).lower()
if terminal == 'none':
bb.fatal('Devshell usage disabled with OE_TERMINAL')
elif terminal != 'auto':
try:
oe.terminal.spawn(terminal, command, title)
return
except oe.terminal.UnsupportedTerminal:
bb.warn('Unsupported terminal "%s", defaulting to "auto"' %
terminal)
except oe.terminal.ExecutionError as exc:
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))
try:
oe.terminal.spawn_preferred(command, title)
except oe.terminal.NoSupportedTerminals:
bb.fatal('No valid terminal found, unable to open devshell')
except oe.terminal.ExecutionError as exc:
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))}
python package_qa_get_machine_dict () {
def package_qa_get_machine_dict():
return {
"darwin9" : {
"arm" : (40, 0, 0, True, 32),
},
"linux" : {
"arm" : (40, 97, 0, True, 32),
"armeb": (40, 97, 0, False, 32),
"powerpc": (20, 0, 0, False, 32),
"powerpc64": (21, 0, 0, False, 64),
"i386": ( 3, 0, 0, True, 32),
"i486": ( 3, 0, 0, True, 32),
"i586": ( 3, 0, 0, True, 32),
"i686": ( 3, 0, 0, True, 32),
"x86_64": (62, 0, 0, True, 64),
"ia64": (50, 0, 0, True, 64),
"alpha": (36902, 0, 0, True, 64),
"hppa": (15, 3, 0, False, 32),
"m68k": ( 4, 0, 0, False, 32),
"mips": ( 8, 0, 0, False, 32),
"mipsel": ( 8, 0, 0, True, 32),
"mips64": ( 8, 0, 0, False, 64),
"mips64el": ( 8, 0, 0, True, 64),
"s390": (22, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
"sparc": ( 2, 0, 0, False, 32),
},
"linux-uclibc" : {
"arm" : ( 40, 97, 0, True, 32),
"armeb": ( 40, 97, 0, False, 32),
"powerpc": ( 20, 0, 0, False, 32),
"i386": ( 3, 0, 0, True, 32),
"i486": ( 3, 0, 0, True, 32),
"i586": ( 3, 0, 0, True, 32),
"i686": ( 3, 0, 0, True, 32),
"x86_64": ( 62, 0, 0, True, 64),
"mips": ( 8, 0, 0, False, 32),
"mipsel": ( 8, 0, 0, True, 32),
"mips64": ( 8, 0, 0, False, 64),
"mips64el": ( 8, 0, 0, True, 64),
"avr32": (6317, 0, 0, False, 32),
"sh4": (42, 0, 0, True, 32),
},
"uclinux-uclibc" : {
"bfin": ( 106, 0, 0, True, 32),
},
"linux-gnueabi" : {
"arm" : (40, 0, 0, True, 32),
"armeb" : (40, 0, 0, False, 32),
},
"linux-uclibceabi" : {
"arm" : (40, 0, 0, True, 32),
"armeb" : (40, 0, 0, False, 32),
},
"linux-gnu" : {
"powerpc": (20, 0, 0, False, 32),
},
"linux-gnuspe" : {
"powerpc": (20, 0, 0, False, 32),
},
"linux-uclibcspe" : {
"powerpc": (20, 0, 0, False, 32),
},
"linux-gnu" : {
"microblaze": (47787, 0, 0, False, 32),
"microblazeel": (47787, 0, 0, True, 32),
},
"linux-gnux32" : {
"x86_64": (62, 0, 0, True, 32),
},
}
}
python base_detect_revision () {
def base_detect_revision(d):
path = base_get_scmbasepath(d)
scms = [base_get_metadata_git_revision, \
base_get_metadata_svn_revision]
for scm in scms:
rev = scm(path, d)
if rev <> "<unknown>":
return rev
return "<unknown>"
}
python read_shlibdeps () {
packages = d.getVar('PACKAGES', True).split()
for pkg in packages:
rdepends = bb.utils.explode_dep_versions(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "")
for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
depsfile = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/packages-split/" + pkg + extension)
if os.access(depsfile, os.R_OK):
fd = file(depsfile)
lines = fd.readlines()
fd.close()
for l in lines:
rdepends[l.rstrip()] = ""
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
}
python sstate_installpkg () {
def sstate_installpkg(ss, d):
import oe.path
import subprocess
def prepdir(dir):
# remove dir if it exists, ensure any parent directories do exist
if os.path.exists(dir):
oe.path.remove(dir)
bb.mkdirhier(dir)
oe.path.remove(dir)
sstateinst = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/sstate-install-%s/" % ss['name'])
sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz"
if not os.path.exists(sstatepkg):
pstaging_fetch(sstatepkg, d)
if not os.path.isfile(sstatepkg):
bb.note("Staging package %s does not exist" % sstatepkg)
return False
sstate_clean(ss, d)
d.setVar('SSTATE_INSTDIR', sstateinst)
d.setVar('SSTATE_PKG', sstatepkg)
for preinst in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split():
bb.build.exec_func(preinst, d)
bb.build.exec_func('sstate_unpack_package', d)
# Fixup hardcoded paths
#
# Note: The logic below must match the reverse logic in
# sstate_hardcode_path(d)
fixmefn = sstateinst + "fixmepath"
if os.path.isfile(fixmefn):
staging = d.getVar('STAGING_DIR', True)
staging_target = d.getVar('STAGING_DIR_TARGET', True)
staging_host = d.getVar('STAGING_DIR_HOST', True)
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross-canadian', d):
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIR:%s:g'" % (staging)
elif bb.data.inherits_class('cross', d):
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIR:%s:g'" % (staging_target, staging)
else:
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
# Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
print "Replacing fixme paths in sstate package: %s" % (sstate_hardcode_cmd)
subprocess.call(sstate_hardcode_cmd, shell=True)
# Need to remove this or we'd copy it into the target directory and may
# conflict with another writer
os.remove(fixmefn)
for state in ss['dirs']:
prepdir(state[1])
os.rename(sstateinst + state[0], state[1])
sstate_install(ss, d)
for plain in ss['plaindirs']:
workdir = d.getVar('WORKDIR', True)
src = sstateinst + "/" + plain.replace(workdir, '')
dest = plain
bb.mkdirhier(src)
prepdir(dest)
os.rename(src, dest)
return True
}
python sstate_clean_cachefile () {
def sstate_clean_cachefile(ss, d):
import oe.path
sstatepkgdir = d.getVar('SSTATE_DIR', True)
sstatepkgfile = sstatepkgdir + '/' + d.getVar('SSTATE_PKGSPEC', True) + "*_" + ss['name'] + ".tgz*"
bb.note("Removing %s" % sstatepkgfile)
oe.path.remove(sstatepkgfile)
}
python base_read_file () {
def base_read_file(filename):
return oe.utils.read_file(filename)
}
python set_bn () {
def set_bn(e):
bn = e.getPkgs()[0] + "-" + e.data.getVar('MACHINE', True)
try:
os.remove(e.data.getVar('BNFILE', True))
except:
pass
file = open(e.data.getVar('BNFILE', True), "w")
file.write(os.path.join(bn, e.data.getVar('BUILDNAME', True)))
file.close()
}
python do_clean () {
"""clear the build and temp directories"""
dir = d.expand("/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0")
bb.note("Removing " + dir)
oe.path.remove(dir)
dir = "%s.*" % bb.data.expand(d.getVar('STAMP'), d)
bb.note("Removing " + dir)
oe.path.remove(dir)
for f in (d.getVar('CLEANFUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
python do_package_write_rpm_setscene () {
sstate_setscene(d)
}
python package_qa_write_error () {
def package_qa_write_error(error, d):
logfile = d.getVar('QA_LOGFILE', True)
if logfile:
p = d.getVar('P', True)
f = file( logfile, "a+")
print >> f, "%s: %s" % (p, error)
f.close()
}
python write_task_data () {
def write_task_data(status, logfile, dev, e):
bn = get_bn(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("linux-xilinx-3.3.0-r0"))
file = open(os.path.join(logfile), "a")
timedata = get_timedata("__timedata_task", e.data)
if timedata:
elapsedtime, cpu = timedata
file.write(bb.data.expand("linux-xilinx-3.3.0-r0: %s: Elapsed time: %0.2f seconds \n" %
(e.task, elapsedtime), e.data))
if cpu:
file.write("CPU usage: %0.1f%% \n" % cpu)
############################################################################
# Here we gather up disk data. In an effort to avoid lying with stats
# I do a bare minimum of analysis of collected data.
# The simple fact is, doing disk io collection on a per process basis
# without effecting build time would be difficult.
# For the best information, running things with BB_TOTAL_THREADS = "1"
# would return accurate per task results.
############################################################################
if dev != "NoLogicalDevice":
diskdata = get_diskdata("__diskdata_task", dev, e.data)
if diskdata:
for key in sorted(diskdata.iterkeys()):
file.write(key + ": " + diskdata[key] + "\n")
if status is "passed":
file.write("Status: PASSED \n")
else:
file.write("Status: FAILED \n")
file.write("Ended: %0.2f \n" % time.time())
file.close()
}
python device_tree () {
def device_tree(a, d):
# Device tree helper function
import re
board = bb.data.getVar('XILINX_BOARD', d, 1)
cpu = bb.data.getVar('TARGET_CPU', d, 1)
if re.match('powerpc', a):
target = cpu + '-' + board
dts = 'arch/' + a + '/boot/dts/virtex' + target + '.dts'
else:
target = 'system'
dts = 'arch/' + a + '/boot/dts/' + target + '.dts'
bb.data.setVar('KERNEL_TARGET', target, d)
return dts
}
python package_qa_check_staged () {
def package_qa_check_staged(path,d):
"""
Check staged la and pc files for sanity
-e.g. installed being false
As this is run after every stage we should be able
to find the one responsible for the errors easily even
if we look at every .pc and .la file
"""
sane = True
tmpdir = d.getVar('TMPDIR', True)
workdir = os.path.join(tmpdir, "work")
installed = "installed=yes"
if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d):
pkgconfigcheck = workdir
else:
pkgconfigcheck = tmpdir
# find all .la and .pc files
# read the content
# and check for stuff that looks wrong
for root, dirs, files in os.walk(path):
for file in files:
path = os.path.join(root,file)
if file.endswith(".la"):
file_content = open(path).read()
if workdir in file_content:
error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
sane = package_qa_handle_error("la", error_msg, d)
elif file.endswith(".pc"):
file_content = open(path).read()
if pkgconfigcheck in file_content:
error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root)
sane = package_qa_handle_error("pkgconfig", error_msg, d)
return sane
}
python base_both_contain () {
def base_both_contain(variable1, variable2, checkvalue, d):
return oe.utils.both_contain(variable1, variable2, checkvalue, d)
}
python sysroot_cleansstate () {
ss = sstate_state_fromvars(d, "populate_sysroot")
sstate_clean(ss, d)
}
python sstate_checkhashes () {
def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d):
ret = []
# This needs to go away, FIXME
mapping = {
"do_populate_sysroot" : "populate-sysroot",
"do_populate_lic" : "populate-lic",
"do_package_write_ipk" : "deploy-ipk",
"do_package_write_deb" : "deploy-deb",
"do_package_write_rpm" : "deploy-rpm",
"do_package" : "package",
"do_deploy" : "deploy",
}
for task in range(len(sq_fn)):
sstatefile = d.expand("/tool/yocto/poky/build/sstate-cache/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz")
sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task])
if os.path.exists(sstatefile):
bb.debug(2, "SState: Found valid sstate file %s" % sstatefile)
ret.append(task)
continue
else:
bb.debug(2, "SState: Looked for but didn't find file %s" % sstatefile)
mirrors = d.getVar("SSTATE_MIRRORS", True)
if mirrors:
# Copy the data object and override DL_DIR and SRC_URI
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
dldir = localdata.expand("/tool/yocto/poky/build/sstate-cache")
localdata.setVar('DL_DIR', dldir)
localdata.setVar('PREMIRRORS', mirrors)
bb.debug(2, "SState using premirror of: %s" % mirrors)
for task in range(len(sq_fn)):
if task in ret:
continue
sstatefile = d.expand("/tool/yocto/poky/build/sstate-cache/" + sq_hashfn[task] + "_" + mapping[sq_task[task]] + ".tgz")
sstatefile = sstatefile.replace("${BB_TASKHASH}", sq_hash[task])
srcuri = "file://" + os.path.basename(sstatefile)
localdata.setVar('SRC_URI', srcuri)
bb.debug(2, "SState: Attempting to fetch %s" % srcuri)
try:
fetcher = bb.fetch2.Fetch(srcuri.split(), localdata)
fetcher.checkstatus()
bb.debug(2, "SState: Successful fetch test for %s" % srcuri)
ret.append(task)
except:
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
pass
return ret
}
python __anonymous () {
None}
python base_prune_suffix () {
def base_prune_suffix(var, suffixes, d):
return oe.utils.prune_suffix(var, suffixes, d)
}
python base_ifelse () {
def base_ifelse(condition, iftrue = True, iffalse = False):
return oe.utils.ifelse(condition, iftrue, iffalse)
}
python package_qa_check_arch () {
def package_qa_check_arch(path,name,d, elf, messages):
"""
Check if archs are compatible
"""
if not elf:
return
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
provides = d.getVar('PROVIDES', d, True)
bpn = d.getVar('BPN', True)
# FIXME: Cross package confuse this check, so just skip them
for s in ['cross', 'nativesdk', 'cross-canadian']:
if bb.data.inherits_class(s, d):
return
# avoid following links to /usr/bin (e.g. on udev builds)
# we will check the files pointed to anyway...
if os.path.islink(path):
return
#if this will throw an exception, then fix the dict above
(machine, osabi, abiversion, littleendian, bits) \
= package_qa_get_machine_dict()[target_os][target_arch]
# Check the architecture and endiannes of the binary
if not ((machine == elf.machine()) or \
("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
messages.append("Architecture did not match (%d to %d) on %s" % \
(machine, elf.machine(), package_qa_clean_path(path,d)))
elif not ((bits == elf.abiSize()) or \
("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
messages.append("Bit size did not match (%d to %d) %s on %s" % \
(bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
elif not littleendian == elf.isLittleEndian():
messages.append("Endiannes did not match (%d to %d) on %s" % \
(littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
}
python package_qa_check_license () {
def package_qa_check_license(workdir, d):
"""
Check for changes in the license files
"""
import tempfile
sane = True
lic_files = d.getVar('LIC_FILES_CHKSUM', True)
lic = d.getVar('LICENSE', True)
pn = d.getVar('PN', True)
if lic == "CLOSED":
return True
if not lic_files:
# just throw a warning now. Once licensing data in entered for enough of the recipes,
# this will be converted into error and False will be returned.
bb.error(pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)")
return False
srcdir = d.getVar('S', True)
for url in lic_files.split():
(type, host, path, user, pswd, parm) = bb.decodeurl(url)
srclicfile = os.path.join(srcdir, path)
if not os.path.isfile(srclicfile):
raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
if 'md5' not in parm:
bb.error(pn + ": md5 checksum is not specified for ", url)
return False
beginline, endline = 0, 0
if 'beginline' in parm:
beginline = int(parm['beginline'])
if 'endline' in parm:
endline = int(parm['endline'])
if (not beginline) and (not endline):
md5chksum = bb.utils.md5_file(srclicfile)
else:
fi = open(srclicfile, 'r')
fo = tempfile.NamedTemporaryFile(mode='wb', prefix='poky.', suffix='.tmp', delete=False)
tmplicfile = fo.name;
lineno = 0
linesout = 0
for line in fi:
lineno += 1
if (lineno >= beginline):
if ((lineno <= endline) or not endline):
fo.write(line)
linesout += 1
else:
break
fo.flush()
fo.close()
fi.close()
md5chksum = bb.utils.md5_file(tmplicfile)
os.unlink(tmplicfile)
if parm['md5'] == md5chksum:
bb.note (pn + ": md5 checksum matched for ", url)
else:
bb.error (pn + ": md5 data is not matching for ", url)
bb.error (pn + ": The new md5 checksum is ", md5chksum)
bb.error (pn + ": Check if the license information has changed in")
sane = False
return sane
}
python do_package_qa () {
import subprocess
bb.note("DO PACKAGE QA")
logdir = d.getVar('T', True)
pkg = d.getVar('PN', True)
# Check the compile log for host contamination
compilelog = os.path.join(logdir,"log.do_compile")
if os.path.exists(compilelog):
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % compilelog
if subprocess.call(statement, shell=True) == 0:
bb.warn("%s: The compile log indicates that host include and/or library paths were used.\n \
Please check the log '%s' for more information." % (pkg, compilelog))
# Check the install log for host contamination
installlog = os.path.join(logdir,"log.do_install")
if os.path.exists(installlog):
statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % installlog
if subprocess.call(statement, shell=True) == 0:
bb.warn("%s: The install log indicates that host include and/or library paths were used.\n \
Please check the log '%s' for more information." % (pkg, installlog))
# Scan the packages...
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
# no packages should be scanned
if not packages:
return
testmatrix = d.getVarFlags("QAPATHTEST")
g = globals()
walk_sane = True
rdepends_sane = True
for package in packages.split():
skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
if skip:
bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
warnchecks = []
for w in (d.getVar("WARN_QA", True) or "").split():
if w in skip:
continue
if w in testmatrix and testmatrix[w] in g:
warnchecks.append(g[testmatrix[w]])
errorchecks = []
for e in (d.getVar("ERROR_QA", True) or "").split():
if e in skip:
continue
if e in testmatrix and testmatrix[e] in g:
errorchecks.append(g[testmatrix[e]])
bb.note("Checking Package: %s" % package)
path = "%s/%s" % (pkgdest, package)
if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
walk_sane = False
if not package_qa_check_rdepends(package, pkgdest, skip, d):
rdepends_sane = False
if not walk_sane or not rdepends_sane:
bb.fatal("QA run found fatal errors. Please consider fixing them.")
bb.note("DONE with PACKAGE QA")
}
python do_package_rpm () {
import os
def creat_srpm_dir(d):
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
clean_licenses = get_licenses(d)
pkgwritesrpmdir = bb.data.expand('/tool/yocto/poky/build/tmp/deploy/sources/deploy-srpm/${PACKAGE_ARCH_EXTEND}', d)
pkgwritesrpmdir = pkgwritesrpmdir + '/' + clean_licenses
bb.mkdirhier(pkgwritesrpmdir)
os.chmod(pkgwritesrpmdir, 0755)
return pkgwritesrpmdir
# We need a simple way to remove the MLPREFIX from the package name,
# and dependency information...
def strip_multilib(name, d):
ml = d.getVar("MLPREFIX", True)
if ml and name and len(ml) != 0 and name.find(ml) >= 0:
return "".join(name.split(ml))
return name
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR_IPK', True)
tmpdir = d.getVar('TMPDIR', True)
pkgd = d.getVar('PKGD', True)
pkgdest = d.getVar('PKGDEST', True)
if not workdir or not outdir or not pkgd or not tmpdir:
bb.error("Variables incorrectly set, unable to package")
return
packages = d.getVar('PACKAGES', True)
if not packages or packages == '':
bb.debug(1, "No packages; nothing to do")
return
# Construct the spec file...
srcname = strip_multilib(d.getVar('PN', True), d)
outspecfile = workdir + "/" + srcname + ".spec"
d.setVar('OUTSPECFILE', outspecfile)
bb.build.exec_func('write_specfile', d)
# Construct per file dependencies file
def dump_filerdeps(varname, outfile, d):
outfile.write("#!/usr/bin/env python\n\n")
outfile.write("# Dependency table\n")
outfile.write('deps = {\n')
for pkg in packages.split():
dependsflist_key = 'FILE' + varname + 'FLIST' + "_" + pkg
dependsflist = (d.getVar(dependsflist_key, True) or "")
for dfile in dependsflist.split():
key = "FILE" + varname + "_" + dfile + "_" + pkg
depends_dict = bb.utils.explode_dep_versions(d.getVar(key, True) or "")
file = dfile.replace("@underscore@", "_")
file = file.replace("@closebrace@", "]")
file = file.replace("@openbrace@", "[")
file = file.replace("@tab@", "\t")
file = file.replace("@space@", " ")
file = file.replace("@at@", "@")
outfile.write('"' + pkgd + file + '" : "')
for dep in depends_dict:
ver = depends_dict[dep]
if dep and ver:
ver = ver.replace("(","")
ver = ver.replace(")","")
outfile.write(dep + " " + ver + " ")
else:
outfile.write(dep + " ")
outfile.write('",\n')
outfile.write('}\n\n')
outfile.write("import sys\n")
outfile.write("while 1:\n")
outfile.write("\tline = sys.stdin.readline().strip()\n")
outfile.write("\tif not line:\n")
outfile.write("\t\tsys.exit(0)\n")
outfile.write("\tif line in deps:\n")
outfile.write("\t\tprint(deps[line] + '\\n')\n")
# OE-core dependencies a.k.a. RPM requires
outdepends = workdir + "/" + srcname + ".requires"
try:
from __builtin__ import file
dependsfile = file(outdepends, 'w')
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
dump_filerdeps('RDEPENDS', dependsfile, d)
dependsfile.close()
os.chmod(outdepends, 0755)
# OE-core / RPM Provides
outprovides = workdir + "/" + srcname + ".provides"
try:
from __builtin__ import file
providesfile = file(outprovides, 'w')
except OSError:
raise bb.build.FuncFailed("unable to open spec file for writing.")
dump_filerdeps('RPROVIDES', providesfile, d)
providesfile.close()
os.chmod(outprovides, 0755)
# Setup the rpmbuild arguments...
rpmbuild = d.getVar('RPMBUILD', True)
targetsys = d.getVar('TARGET_SYS', True)
targetvendor = d.getVar('TARGET_VENDOR', True)
package_arch = d.getVar('PACKAGE_ARCH', True) or ""
if package_arch not in "all any noarch".split():
ml_prefix = (d.getVar('MLPREFIX', True) or "").replace("-", "_")
d.setVar('PACKAGE_ARCH_EXTEND', ml_prefix + package_arch)
else:
d.setVar('PACKAGE_ARCH_EXTEND', package_arch)
pkgwritedir = d.expand('/tool/yocto/poky/build/tmp/work/virtex5-poky-linux/linux-xilinx-3.3.0-r0/deploy-rpms/${PACKAGE_ARCH_EXTEND}')
pkgarch = d.expand('${PACKAGE_ARCH_EXTEND}-poky-linux')
magicfile = d.expand('/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share/misc/magic.mgc')
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
cmd = rpmbuild
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " --define '_use_internal_dependency_generator 0'"
cmd = cmd + " --define '__find_requires " + outdepends + "'"
cmd = cmd + " --define '__find_provides " + outprovides + "'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " --define '_tmppath " + workdir + "'"
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
cmdsrpm = cmd + " --define '_sourcedir " + workdir + "' --define '_srcrpmdir " + creat_srpm_dir(d) + "'"
cmdsrpm = 'fakeroot ' + cmdsrpm + " -bs " + outspecfile
cmd = cmd + " -bb " + outspecfile
# Build the source rpm package !
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
d.setVar('SBUILDSPEC', cmdsrpm + "\n")
d.setVarFlag('SBUILDSPEC', 'func', '1')
bb.build.exec_func('SBUILDSPEC', d)
# Build the rpm package!
d.setVar('BUILDSPEC', cmd + "\n")
d.setVarFlag('BUILDSPEC', 'func', '1')
bb.build.exec_func('BUILDSPEC', d)
}
python map_uboot_arch () {
def map_uboot_arch(a, d):
import re
if re.match('p(pc|owerpc)(|64)', a): return 'ppc'
elif re.match('i.86$', a): return 'x86'
return a
}
python buildcfg_neededvars () {
def buildcfg_neededvars(d):
needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
pesteruser = []
for v in needed_vars:
val = d.getVar(v, True)
if not val or val == 'INVALID':
pesteruser.append(v)
if pesteruser:
bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
}
python get_timedata () {
def get_timedata(var, data):
import time
timedata = data.getVar(var, False)
if timedata is None:
return
oldtime, oldcpu, oldproc = timedata
procdiff = get_process_cputime(os.getpid()) - oldproc
cpudiff = get_cputime() - oldcpu
timediff = time.time() - oldtime
if cpudiff > 0:
cpuperc = float(procdiff) * 100 / cpudiff
else:
cpuperc = None
return timediff, cpuperc
}
python do_package () {
# Change the following version to cause sstate to invalidate the package
# cache. This is useful if an item this class depends on changes in a
# way that the output of this class changes. rpmdeps is a good example
# as any change to rpmdeps requires this to be rerun.
# PACKAGE_BBCLASS_VERSION = "1"
packages = (d.getVar('PACKAGES', True) or "").split()
if len(packages) < 1:
bb.debug(1, "No packages to build, skipping do_package")
return
workdir = d.getVar('WORKDIR', True)
outdir = d.getVar('DEPLOY_DIR', True)
dest = d.getVar('D', True)
dvar = d.getVar('PKGD', True)
pn = d.getVar('PN', True)
if not workdir or not outdir or not dest or not dvar or not pn or not packages:
bb.error("WORKDIR, DEPLOY_DIR, D, PN and PKGD all must be defined, unable to package")
return
for f in (d.getVar('PACKAGEFUNCS', True) or '').split():
bb.build.exec_func(f, d)
}
python package_do_shlibs () {
import re, pipes
exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', 0)
if exclude_shlibs:
bb.note("not generating shlibs")
return
lib_re = re.compile("^.*\.so")
libdir_re = re.compile(".*/lib$")
packages = d.getVar('PACKAGES', True)
targetos = d.getVar('TARGET_OS', True)
workdir = d.getVar('WORKDIR', True)
ver = d.getVar('PKGV', True)
if not ver:
bb.error("PKGV not defined")
return
pkgdest = d.getVar('PKGDEST', True)
shlibs_dir = d.getVar('SHLIBSDIR', True)
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("/tool/yocto/poky/build/tmp/sysroots/package-output.lock"))
def linux_so(root, path, file):
needs_ldconfig = False
cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
for l in lines:
m = re.match("\s+NEEDED\s+([^\s]*)", l)
if m:
if m.group(1) not in needed[pkg]:
needed[pkg].append(m.group(1))
m = re.match("\s+SONAME\s+([^\s]*)", l)
if m:
this_soname = m.group(1)
if not this_soname in sonames:
# if library is private (only used by package) then do not build shlib for it
if not private_libs or -1 == private_libs.find(this_soname):
sonames.append(this_soname)
if libdir_re.match(root):
needs_ldconfig = True
if snap_symlinks and (file != this_soname):
renames.append((os.path.join(root, file), os.path.join(root, this_soname)))
return needs_ldconfig
def darwin_so(root, path, file):
fullpath = os.path.join(root, file)
if not os.path.exists(fullpath):
return
def get_combinations(base):
#
# Given a base library name, find all combinations of this split by "." and "-"
#
combos = []
options = base.split(".")
for i in range(1, len(options) + 1):
combos.append(".".join(options[0:i]))
options = base.split("-")
for i in range(1, len(options) + 1):
combos.append("-".join(options[0:i]))
return combos
if (file.endswith('.dylib') or file.endswith('.so')) and not pkg.endswith('-dev') and not pkg.endswith('-dbg'):
# Drop suffix
name = file.rsplit(".",1)[0]
# Find all combinations
combos = get_combinations(name)
for combo in combos:
if not combo in sonames:
sonames.append(combo)
if file.endswith('.dylib') or file.endswith('.so'):
lafile = fullpath.replace(os.path.join(pkgdest, pkg), d.getVar('PKGD', True))
# Drop suffix
lafile = lafile.rsplit(".",1)[0]
lapath = os.path.dirname(lafile)
lafile = os.path.basename(lafile)
# Find all combinations
combos = get_combinations(lafile)
for combo in combos:
if os.path.exists(lapath + '/' + combo + '.la'):
break
lafile = lapath + '/' + combo + '.la'
#bb.note("Foo2: %s" % lafile)
#bb.note("Foo %s %s" % (file, fullpath))
if os.path.exists(lafile):
fd = open(lafile, 'r')
lines = fd.readlines()
fd.close()
for l in lines:
m = re.match("\s*dependency_libs=\s*'(.*)'", l)
if m:
deps = m.group(1).split(" ")
for dep in deps:
#bb.note("Trying %s for %s" % (dep, pkg))
name = None
if dep.endswith(".la"):
name = os.path.basename(dep).replace(".la", "")
elif dep.startswith("-l"):
name = dep.replace("-l", "lib")
if pkg not in needed:
needed[pkg] = []
if name and name not in needed[pkg]:
needed[pkg].append(name)
#bb.note("Adding %s for %s" % (name, pkg))
if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS', True) == "1":
snap_symlinks = True
else:
snap_symlinks = False
if (d.getVar('USE_LDCONFIG', True) or "1") == "1":
use_ldconfig = True
else:
use_ldconfig = False
needed = {}
shlib_provider = {}
for pkg in packages.split():
private_libs = d.getVar('PRIVATE_LIBS_' + pkg, True) or d.getVar('PRIVATE_LIBS', True)
needs_ldconfig = False
bb.debug(2, "calculating shlib provides for %s" % pkg)
pkgver = d.getVar('PKGV_' + pkg, True)
if not pkgver:
pkgver = d.getVar('PV_' + pkg, True)
if not pkgver:
pkgver = ver
needed[pkg] = []
sonames = list()
renames = list()
top = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(top):
for file in files:
soname = None
path = os.path.join(root, file)
if os.path.islink(path):
continue
if targetos == "darwin" or targetos == "darwin8":
darwin_so(root, dirs, file)
elif os.access(path, os.X_OK) or lib_re.match(file):
ldconfig = linux_so(root, dirs, file)
needs_ldconfig = needs_ldconfig or ldconfig
for (old, new) in renames:
bb.note("Renaming %s to %s" % (old, new))
os.rename(old, new)
shlibs_file = os.path.join(shlibswork_dir, pkg + ".list")
shver_file = os.path.join(shlibswork_dir, pkg + ".ver")
if len(sonames):
fd = open(shlibs_file, 'w')
for s in sonames:
fd.write(s + '\n')
shlib_provider[s] = (pkg, pkgver)
fd.close()
fd = open(shver_file, 'w')
fd.write(pkgver + '\n')
fd.close()
if needs_ldconfig and use_ldconfig:
bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
if not postinst:
postinst = '#!/bin/sh\n'
postinst += d.getVar('ldconfig_postinst_fragment', True)
d.setVar('pkg_postinst_%s' % pkg, postinst)
list_re = re.compile('^(.*)\.list$')
for dir in [shlibs_dir]:
if not os.path.exists(dir):
continue
for file in os.listdir(dir):
m = list_re.match(file)
if m:
dep_pkg = m.group(1)
fd = open(os.path.join(dir, file))
lines = fd.readlines()
fd.close()
ver_file = os.path.join(dir, dep_pkg + '.ver')
lib_ver = None
if os.path.exists(ver_file):
fd = open(ver_file)
lib_ver = fd.readline().rstrip()
fd.close()
for l in lines:
shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
bb.utils.unlockfile(lf)
assumed_libs = d.getVar('ASSUME_SHLIBS', True)
if assumed_libs:
for e in assumed_libs.split():
l, dep_pkg = e.split(":")
lib_ver = None
dep_pkg = dep_pkg.rsplit("_", 1)
if len(dep_pkg) == 2:
lib_ver = dep_pkg[1]
dep_pkg = dep_pkg[0]
shlib_provider[l] = (dep_pkg, lib_ver)
for pkg in packages.split():
bb.debug(2, "calculating shlib requirements for %s" % pkg)
deps = list()
for n in needed[pkg]:
if n in shlib_provider.keys():
(dep_pkg, ver_needed) = shlib_provider[n]
bb.debug(2, '%s: Dependency %s requires package %s' % (pkg, n, dep_pkg))
if dep_pkg == pkg:
continue
if ver_needed:
dep = "%s (>= %s)" % (dep_pkg, ver_needed)
else:
dep = dep_pkg
if not dep in deps:
deps.append(dep)
else:
bb.note("Couldn't find shared library provider for %s" % n)
deps_file = os.path.join(pkgdest, pkg + ".shlibdeps")
if os.path.exists(deps_file):
os.remove(deps_file)
if len(deps):
fd = open(deps_file, 'w')
for dep in deps:
fd.write(dep + '\n')
fd.close()
}
python base_contains () {
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
return oe.utils.contains(variable, checkvalues, truevalue, falsevalue, d)
}
python package_qa_check_perm () {
def package_qa_check_perm(path,name,d, elf, messages):
"""
Check the permission of files
"""
return
}
python oe_import () {
def oe_import(d):
import os, sys
bbpath = d.getVar("BBPATH", True).split(":")
sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
def inject(name, value):
"""Make a python object accessible from the metadata"""
if hasattr(bb.utils, "_context"):
bb.utils._context[name] = value
else:
__builtins__[name] = value
import oe.data
for toimport in oe.data.typed_value("OE_IMPORTS", d):
imported = __import__(toimport)
inject(toimport.split(".", 1)[0], imported)
}
python package_qa_walk () {
def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
import oe.qa
#if this will throw an exception, then fix the dict above
target_os = d.getVar('TARGET_OS', True)
target_arch = d.getVar('TARGET_ARCH', True)
warnings = []
errors = []
for root, dirs, files in os.walk(path):
for file in files:
path = os.path.join(root,file)
elf = oe.qa.ELFFile(path)
try:
elf.open()
except:
elf = None
for func in warnfuncs:
func(path, package, d, elf, warnings)
for func in errorfuncs:
func(path, package, d, elf, errors)
for w in warnings:
bb.warn("QA Issue: %s" % w)
package_qa_write_error(w, d)
for e in errors:
bb.error("QA Issue: %s" % e)
package_qa_write_error(e, d)
return len(errors) == 0
}
python do_unpack () {
bb.build.exec_func('base_do_unpack', d)
}
python runstrip () {
def runstrip(file, elftype, d):
# Function to strip a single file, called from split_and_strip_files below
# A working 'file' (one which works on the target architecture)
#
# The elftype is a bit pattern (explained in split_and_strip_files) to tell
# us what type of file we're processing...
# 4 - executable
# 8 - shared library
import commands, stat, subprocess
pathprefix = "export PATH=%s; " % d.getVar('PATH', True)
strip = d.getVar("STRIP", True)
# Handle kernel modules specifically - .debug directories here are pointless
if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
return subprocess.call("%s'%s' --strip-debug --remove-section=.comment --remove-section=.note --preserve-dates '%s'" % (pathprefix, strip, file), shell=True)
newmode = None
if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
origmode = os.stat(file)[stat.ST_MODE]
newmode = origmode | stat.S_IWRITE | stat.S_IREAD
os.chmod(file, newmode)
extraflags = ""
# .so and shared library
if ".so" in file and elftype & 8:
extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
# shared or executable:
elif elftype & 8 or elftype & 4:
extraflags = "--remove-section=.comment --remove-section=.note"
stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
bb.debug(1, "runstrip: %s" % stripcmd)
ret = subprocess.call("%s%s" % (pathprefix, stripcmd), shell=True)
if newmode:
os.chmod(file, origmode)
if ret:
bb.error("runstrip: '%s' strip command failed" % stripcmd)
return 0
}
python check_sanity_validmachine () {
def check_sanity_validmachine(sanity_data):
from bb import data
messages = ""
# Check TUNE_ARCH is set
if sanity_data.getVar('TUNE_ARCH', True) == 'INVALID':
messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
# Check TARGET_OS is set
if sanity_data.getVar('TARGET_OS', True) == 'INVALID':
messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
# Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
pkgarchs = sanity_data.getVar('PACKAGE_ARCHS', True)
tunepkg = sanity_data.getVar('TUNE_PKGARCH', True)
tunefound = False
seen = {}
dups = []
for pa in pkgarchs.split():
if seen.get(pa, 0) == 1:
dups.append(pa)
else:
seen[pa] = 1
if pa == tunepkg:
tunefound = True
if len(dups):
messages = messages + "Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: %s" % " ".join(dups)
if tunefound == False:
messages = messages + "Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH (%s)." % tunepkg
return messages
}
python package_qa_check_desktop () {
def package_qa_check_desktop(path, name, d, elf, messages):
"""
Run all desktop files through desktop-file-validate.
"""
if path.endswith(".desktop"):
desktop_file_validate = os.path.join(d.getVar('STAGING_BINDIR_NATIVE',True),'desktop-file-validate')
output = os.popen("%s %s" % (desktop_file_validate, path))
# This only produces output on errors
for l in output:
messages.append("Desktop file issue: " + l.strip())
}
python get_diskstats () {
def get_diskstats(dev):
import itertools
############################################################################
# For info on what these are, see kernel doc file iostats.txt
############################################################################
DSTAT_KEYS = ['ReadsComp', 'ReadsMerged', 'SectRead', 'TimeReads', 'WritesComp', 'SectWrite', 'TimeWrite', 'IOinProgress', 'TimeIO', 'WTimeIO']
try:
for x in open("/proc/diskstats", "r"):
if dev in x:
diskstats_val = x.rstrip().split()[4:]
except IOError as e:
return
diskstats = dict(itertools.izip(DSTAT_KEYS, diskstats_val))
return diskstats
}
python do_menuconfig () {
try:
mtime = os.path.getmtime(".config")
except OSError:
mtime = 0
oe_terminal("/bin/bash -c \"make menuconfig; echo 'Pausing for 5 seconds'; sleep 5\"", 'linux-xilinx Configuration', d)
# FIXME this check can be removed when the minimum bitbake version has been bumped
if hasattr(bb.build, 'write_taint'):
try:
newmtime = os.path.getmtime(".config")
except OSError:
newmtime = 0
if newmtime > mtime:
bb.note("Configuration changed, recompile will be forced")
bb.build.write_taint('do_compile', d)
}
python src_patches () {
def src_patches(d, all = False ):
workdir = d.getVar('WORKDIR', True)
fetch = bb.fetch2.Fetch([], d)
patches = []
sources = []
for url in fetch.urls:
local = patch_path(url, fetch, workdir)
if not local:
if all:
local = fetch.localpath(url)
sources.append(local)
continue
urldata = fetch.ud[url]
parm = urldata.parm
patchname = parm.get('pname') or os.path.basename(local)
apply, reason = should_apply(parm, d)
if not apply:
if reason:
bb.note("Patch %s %s" % (patchname, reason))
continue
patchparm = {'patchname': patchname}
if "striplevel" in parm:
striplevel = parm["striplevel"]
elif "pnum" in parm:
#bb.msg.warn(None, "Deprecated usage of 'pnum' url parameter in '%s', please use 'striplevel'" % url)
striplevel = parm["pnum"]
else:
striplevel = '1'
patchparm['striplevel'] = striplevel
patchdir = parm.get('patchdir')
if patchdir:
patchparm['patchdir'] = patchdir
localurl = bb.encodeurl(('file', '', local, '', '', patchparm))
patches.append(localurl)
if all:
return sources
return patches
}
python get_device () {
def get_device(e):
file = open(e.data.getVar('DEVFILE', True))
device = file.readline()
file.close()
return device
}
python check_conf_exists () {
def check_conf_exists(fn, data):
bbpath = []
fn = data.expand(fn)
vbbpath = data.getVar("BBPATH")
if vbbpath:
bbpath += vbbpath.split(":")
for p in bbpath:
currname = os.path.join(data.expand(p), fn)
if os.access(currname, os.R_OK):
return True
return False
}
python package_qa_hash_style () {
def package_qa_hash_style(path, name, d, elf, messages):
"""
Check if the binary has the right hash style...
"""
if not elf:
return
if os.path.islink(path):
return
gnu_hash = "--hash-style=gnu" in d.getVar('LDFLAGS', True)
if not gnu_hash:
gnu_hash = "--hash-style=both" in d.getVar('LDFLAGS', True)
if not gnu_hash:
return
objdump = d.getVar('OBJDUMP', True)
env_path = d.getVar('PATH', True)
sane = False
has_syms = False
# If this binary has symbols, we expect it to have GNU_HASH too.
for line in os.popen("LC_ALL=C PATH=%s %s -p '%s' 2> /dev/null" % (env_path, objdump, path), "r"):
if "SYMTAB" in line:
has_syms = True
if "GNU_HASH" in line:
sane = True
if "[mips32]" in line or "[mips64]" in line:
sane = True
if has_syms and not sane:
messages.append("No GNU_HASH in the elf binary: '%s'" % path)
}
python base_set_filespath () {
def base_set_filespath(path, d):
filespath = []
extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "")
# Don't prepend empty strings to the path list
if extrapaths != "":
path = extrapaths.split(":") + path
# The ":" ensures we have an 'empty' override
overrides = (d.getVar("OVERRIDES", True) or "") + ":"
for p in path:
if p != "":
for o in overrides.split(":"):
filespath.append(os.path.join(p, o))
return ":".join(filespath)
}
python mapping_rename_hook () {
def mapping_rename_hook(d):
"""
Rewrite variables to account for package renaming in things
like debian.bbclass or manual PKG variable name changes
"""
runtime_mapping_rename("RDEPENDS", d)
runtime_mapping_rename("RRECOMMENDS", d)
runtime_mapping_rename("RSUGGESTS", d)
runtime_mapping_rename("RPROVIDES", d)
runtime_mapping_rename("RREPLACES", d)
runtime_mapping_rename("RCONFLICTS", d)
}
python linux_module_packages () {
def linux_module_packages(s, d):
suffix = ""
return " ".join(map(lambda s: "kernel-module-%s%s" % (s.lower().replace('_', '-').replace('@', '+'), suffix), s.split()))
}
python base_do_unpack () {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
rootdir = localdata.getVar('WORKDIR', True)
try:
fetcher = bb.fetch2.Fetch(src_uri, localdata)
fetcher.unpack(rootdir)
except bb.fetch2.BBFetchException, e:
raise bb.build.FuncFailed(e)
}
python do_populate_sysroot_setscene () {
sstate_setscene(d)
}
python get_layers_branch_rev () {
def get_layers_branch_rev(d):
layers = (d.getVar("BBLAYERS", True) or "").split()
layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
base_get_metadata_git_branch(i, None).strip(), \
base_get_metadata_git_revision(i, None)) \
for i in layers]
i = len(layers_branch_rev)-1
p1 = layers_branch_rev[i].find("=")
s1 = layers_branch_rev[i][p1:]
while i > 0:
p2 = layers_branch_rev[i-1].find("=")
s2= layers_branch_rev[i-1][p2:]
if s1 == s2:
layers_branch_rev[i-1] = layers_branch_rev[i-1][0:p2]
i -= 1
else:
i -= 1
p1 = layers_branch_rev[i].find("=")
s1= layers_branch_rev[i][p1:]
return layers_branch_rev
}
python base_get_scmbasepath () {
def base_get_scmbasepath(d):
return d.getVar( 'COREBASE', True)
}
python check_license_flags () {
def check_license_flags(d):
"""
This function checks if a recipe has any LICENSE_FLAGs that
aren't whitelisted.
If it does, it returns the first LICENSE_FLAG missing from the
whitelist, or all the LICENSE_FLAGs if there is no whitelist.
If everything is is properly whitelisted, it returns None.
"""
def license_flag_matches(flag, whitelist, pn):
"""
Return True if flag matches something in whitelist, None if not.
Before we test a flag against the whitelist, we append _linux-xilinx
to it. We then try to match that string against the
whitelist. This covers the normal case, where we expect
LICENSE_FLAGS to be a simple string like 'commercial', which
the user typically matches exactly in the whitelist by
explicitly appending the package name e.g 'commercial_foo'.
If we fail the match however, we then split the flag across
'_' and append each fragment and test until we either match or
run out of fragments.
"""
flag_pn = ("%s_%s" % (flag, pn))
for candidate in whitelist:
if flag_pn == candidate:
return True
flag_cur = ""
flagments = flag_pn.split("_")
flagments.pop() # we've already tested the full string
for flagment in flagments:
if flag_cur:
flag_cur += "_"
flag_cur += flagment
for candidate in whitelist:
if flag_cur == candidate:
return True
return False
def all_license_flags_match(license_flags, whitelist):
""" Return first unmatched flag, None if all flags match """
pn = d.getVar('PN', True)
split_whitelist = whitelist.split()
for flag in license_flags.split():
if not license_flag_matches(flag, split_whitelist, pn):
return flag
return None
license_flags = d.getVar('LICENSE_FLAGS', True)
if license_flags:
whitelist = d.getVar('LICENSE_FLAGS_WHITELIST', True)
if not whitelist:
return license_flags
unmatched_flag = all_license_flags_match(license_flags, whitelist)
if unmatched_flag:
return unmatched_flag
return None
}
python check_sanity_version_change () {
def check_sanity_version_change(data):
# Sanity checks to be done when SANITY_VERSION changes
return ""
}
python package_do_pkgconfig () {
import re
packages = d.getVar('PACKAGES', True)
workdir = d.getVar('WORKDIR', True)
pkgdest = d.getVar('PKGDEST', True)
shlibs_dir = d.getVar('SHLIBSDIR', True)
shlibswork_dir = d.getVar('SHLIBSWORKDIR', True)
pc_re = re.compile('(.*)\.pc$')
var_re = re.compile('(.*)=(.*)')
field_re = re.compile('(.*): (.*)')
pkgconfig_provided = {}
pkgconfig_needed = {}
for pkg in packages.split():
pkgconfig_provided[pkg] = []
pkgconfig_needed[pkg] = []
top = os.path.join(pkgdest, pkg)
for root, dirs, files in os.walk(top):
for file in files:
m = pc_re.match(file)
if m:
pd = bb.data.init()
name = m.group(1)
pkgconfig_provided[pkg].append(name)
path = os.path.join(root, file)
if not os.access(path, os.R_OK):
continue
f = open(path, 'r')
lines = f.readlines()
f.close()
for l in lines:
m = var_re.match(l)
if m:
name = m.group(1)
val = m.group(2)
pd.setVar(name, pd.expand(val))
continue
m = field_re.match(l)
if m:
hdr = m.group(1)
exp = bb.data.expand(m.group(2), pd)
if hdr == 'Requires':
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("/tool/yocto/poky/build/tmp/sysroots/package-output.lock"))
for pkg in packages.split():
pkgs_file = os.path.join(shlibswork_dir, pkg + ".pclist")
if pkgconfig_provided[pkg] != []:
f = open(pkgs_file, 'w')
for p in pkgconfig_provided[pkg]:
f.write('%s\n' % p)
f.close()
for dir in [shlibs_dir]:
if not os.path.exists(dir):
continue
for file in os.listdir(dir):
m = re.match('^(.*)\.pclist$', file)
if m:
pkg = m.group(1)
fd = open(os.path.join(dir, file))
lines = fd.readlines()
fd.close()
pkgconfig_provided[pkg] = []
for l in lines:
pkgconfig_provided[pkg].append(l.rstrip())
for pkg in packages.split():
deps = []
for n in pkgconfig_needed[pkg]:
found = False
for k in pkgconfig_provided.keys():
if n in pkgconfig_provided[k]:
if k != pkg and not (k in deps):
deps.append(k)
found = True
if found == False:
bb.note("couldn't find pkgconfig module '%s' in any package" % n)
deps_file = os.path.join(pkgdest, pkg + ".pcdeps")
if len(deps):
fd = open(deps_file, 'w')
for dep in deps:
fd.write(dep + '\n')
fd.close()
bb.utils.unlockfile(lf)
}
python base_eventhandler () {
if isinstance(e, bb.event.ConfigParsed):
e.data.setVar('BB_VERSION', bb.__version__)
generate_git_config(e)
pkgarch_mapping(e.data)
preferred_ml_updates(e.data)
if isinstance(e, bb.event.BuildStarted):
statuslines = []
for func in oe.data.typed_value('BUILDCFG_FUNCS', e.data):
g = globals()
if func not in g:
bb.warn("Build configuration function '%s' does not exist" % func)
else:
flines = g[func](e.data)
if flines:
statuslines.extend(flines)
statusheader = e.data.getVar('BUILDCFG_HEADER', True)
bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
}
python sstate_init () {
def sstate_init(name, task, d):
ss = {}
ss['task'] = task
ss['name'] = name
ss['dirs'] = []
ss['plaindirs'] = []
ss['lockfiles'] = []
ss['lockfiles-shared'] = []
return ss
}
python sstate_clean () {
def sstate_clean(ss, d):
import oe.path
manifest = d.expand("/tool/yocto/poky/build/tmp/sstate-control/manifest-virtex5-linux-xilinx.%s" % ss['name'])
if os.path.exists(manifest):
locks = []
for lock in ss['lockfiles-shared']:
locks.append(bb.utils.lockfile(lock))
for lock in ss['lockfiles']:
locks.append(bb.utils.lockfile(lock))
sstate_clean_manifest(manifest, d)
for lock in locks:
bb.utils.unlockfile(lock)
stfile = d.getVar("STAMP", True) + ".do_" + ss['task']
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
oe.path.remove(stfile)
oe.path.remove(stfile + "_setscene")
if extrainf:
oe.path.remove(stfile + ".*" + extrainf)
oe.path.remove(stfile + "_setscene" + ".*" + extrainf)
else:
oe.path.remove(stfile + ".*")
oe.path.remove(stfile + "_setscene" + ".*")
}
python emit_pkgdata () {
from glob import glob
def write_if_exists(f, pkg, var):
def encode(str):
import codecs
c = codecs.getencoder("string_escape")
return c(str)[0]
val = d.getVar('%s_%s' % (var, pkg), True)
if val:
f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
return
val = d.getVar('%s' % (var), True)
if val:
f.write('%s: %s\n' % (var, encode(val)))
return
def get_directory_size(dir):
if os.listdir(dir):
size = int(os.popen('du -sk %s' % dir).readlines()[0].split('\t')[0])
else:
size = 0
return size
packages = d.getVar('PACKAGES', True)
pkgdest = d.getVar('PKGDEST', True)
pkgdatadir = d.getVar('PKGDESTWORK', True)
# Take shared lock since we're only reading, not writing
lf = bb.utils.lockfile(d.expand("/tool/yocto/poky/build/tmp/sysroots/package-output.lock"), True)
data_file = pkgdatadir + d.expand("/linux-xilinx" )
f = open(data_file, 'w')
f.write("PACKAGES: %s\n" % packages)
f.close()
workdir = d.getVar('WORKDIR', True)
for pkg in packages.split():
subdata_file = pkgdatadir + "/runtime/%s" % pkg
sf = open(subdata_file, 'w')
write_if_exists(sf, pkg, 'PN')
write_if_exists(sf, pkg, 'PV')
write_if_exists(sf, pkg, 'PR')
write_if_exists(sf, pkg, 'PKGV')
write_if_exists(sf, pkg, 'PKGR')
write_if_exists(sf, pkg, 'LICENSE')
write_if_exists(sf, pkg, 'DESCRIPTION')
write_if_exists(sf, pkg, 'SUMMARY')
write_if_exists(sf, pkg, 'RDEPENDS')
write_if_exists(sf, pkg, 'RPROVIDES')
write_if_exists(sf, pkg, 'RRECOMMENDS')
write_if_exists(sf, pkg, 'RSUGGESTS')
write_if_exists(sf, pkg, 'RREPLACES')
write_if_exists(sf, pkg, 'RCONFLICTS')
write_if_exists(sf, pkg, 'SECTION')
write_if_exists(sf, pkg, 'PKG')
write_if_exists(sf, pkg, 'ALLOW_EMPTY')
write_if_exists(sf, pkg, 'FILES')
write_if_exists(sf, pkg, 'pkg_postinst')
write_if_exists(sf, pkg, 'pkg_postrm')
write_if_exists(sf, pkg, 'pkg_preinst')
write_if_exists(sf, pkg, 'pkg_prerm')
write_if_exists(sf, pkg, 'FILERPROVIDESFLIST')
for dfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or "").split():
write_if_exists(sf, pkg, 'FILERPROVIDES_' + dfile)
write_if_exists(sf, pkg, 'FILERDEPENDSFLIST')
for dfile in (d.getVar('FILERDEPENDSFLIST_' + pkg, True) or "").split():
write_if_exists(sf, pkg, 'FILERDEPENDS_' + dfile)
sf.write('%s_%s: %s\n' % ('PKGSIZE', pkg, get_directory_size(pkgdest + "/%s" % pkg)))
sf.close()
allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True)
if not allow_empty:
allow_empty = d.getVar('ALLOW_EMPTY', True)
root = "%s/%s" % (pkgdest, pkg)
os.chdir(root)
g = glob('*')
if g or allow_empty == "1":
packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg
file(packagedfile, 'w').close()
bb.utils.unlockfile(lf)
}
python package_qa_check_dbg () {
def package_qa_check_dbg(path, name, d, elf, messages):
"""
Check for ".debug" files or directories outside of the dbg package
"""
if not "-dbg" in name:
if '.debug' in path.split(os.path.sep):
messages.append("non debug package contains .debug directory: %s path %s" % \
(name, package_qa_clean_path(path,d)))
}
python package_do_filedeps () {
import re
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
rpmdeps = d.expand("/tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/rpmdeps-oecore --macros /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/macros --define '_rpmfc_magic_path /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/share/misc/magic.mgc' --rpmpopt /tool/yocto/poky/build/tmp/sysroots/x86_64-linux/usr/lib/rpm/rpmpopt")
r = re.compile(r'[<>=]+ +[^ ]*')
def file_translate(file):
ft = file.replace("@", "@at@")
ft = ft.replace(" ", "@space@")
ft = ft.replace("\t", "@tab@")
ft = ft.replace("[", "@openbrace@")
ft = ft.replace("]", "@closebrace@")
ft = ft.replace("_", "@underscore@")
return ft
# Quick routine to process the results of the rpmdeps call...
def process_deps(pipe, pkg, provides_files, requires_files):
provides = {}
requires = {}
for line in pipe:
f = line.split(" ", 1)[0].strip()
line = line.split(" ", 1)[1].strip()
if line.startswith("Requires:"):
i = requires
elif line.startswith("Provides:"):
i = provides
else:
continue
file = f.replace(pkgdest + "/" + pkg, "")
file = file_translate(file)
value = line.split(":", 1)[1].strip()
value = r.sub(r'(\g<0>)', value)
if value.startswith("rpmlib("):
continue
if value == "python":
continue
if file not in i:
i[file] = []
i[file].append(value)
for file in provides:
provides_files.append(file)
key = "FILERPROVIDES_" + file + "_" + pkg
d.setVar(key, " ".join(provides[file]))
for file in requires:
requires_files.append(file)
key = "FILERDEPENDS_" + file + "_" + pkg
d.setVar(key, " ".join(requires[file]))
def chunks(files, n):
return [files[i:i+n] for i in range(0, len(files), n)]
# Determine dependencies
for pkg in packages.split():
if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
continue
provides_files = []
requires_files = []
rpfiles = []
for root, dirs, files in os.walk(pkgdest + "/" + pkg):
for file in files:
rpfiles.append(os.path.join(root, file))
for files in chunks(rpfiles, 100):
dep_pipe = os.popen(rpmdeps + " " + " ".join(files))
process_deps(dep_pipe, pkg, provides_files, requires_files)
d.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files))
d.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files))
}
python copy_data () {
def copy_data(e):
sanity_data = bb.data.createCopy(e.data)
sanity_data.finalize()
return sanity_data
}
python raise_sanity_error () {
def raise_sanity_error(msg, d):
if d.getVar("SANITY_USE_EVENTS", True) == "1":
# FIXME: handle when BitBake version is too old to support bb.event.SanityCheckFailed
# We can just fire the event directly once the minimum version is bumped beyond 1.15.1
try:
bb.event.fire(bb.event.SanityCheckFailed(msg), d)
return
except AttributeError:
pass
bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
%s""" % msg)
}
python base_detect_branch () {
def base_detect_branch(d):
path = base_get_scmbasepath(d)
scms = [base_get_metadata_git_branch]
for scm in scms:
rev = scm(path, d)
if rev <> "<unknown>":
return rev.strip()
return "<unknown>"
}
python debian_package_name_hook () {
import glob, copy, stat, errno, re
pkgdest = d.getVar('PKGDEST', True)
packages = d.getVar('PACKAGES', True)
bin_re = re.compile(".*/s?" + os.path.basename(d.getVar("bindir", True)) + "$")
lib_re = re.compile(".*/" + os.path.basename(d.getVar("libdir", True)) + "$")
so_re = re.compile("lib.*\.so")
def socrunch(s):
s = s.lower().replace('_', '-')
m = re.match("^(.*)(.)\.so\.(.*)$", s)
if m is None:
return None
if m.group(2) in '0123456789':
bin = '%s%s-%s' % (m.group(1), m.group(2), m.group(3))
else:
bin = m.group(1) + m.group(2) + m.group(3)
dev = m.group(1) + m.group(2)
return (bin, dev)
def isexec(path):
try:
s = os.stat(path)
except (os.error, AttributeError):
return 0
return (s[stat.ST_MODE] & stat.S_IEXEC)
def auto_libname(packages, orig_pkg):
sonames = []
has_bins = 0
has_libs = 0
pkg_dir = os.path.join(pkgdest, orig_pkg)
for root, dirs, files in os.walk(pkg_dir):
if bin_re.match(root) and files:
has_bins = 1
if lib_re.match(root) and files:
has_libs = 1
for f in files:
if so_re.match(f):
fp = os.path.join(root, f)
cmd = (d.getVar('TARGET_PREFIX', True) or "") + "objdump -p " + fp + " 2>/dev/null"
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
for l in lines:
m = re.match("\s+SONAME\s+([^\s]*)", l)
if m and not m.group(1) in sonames:
sonames.append(m.group(1))
bb.debug(1, 'LIBNAMES: pkg %s libs %d bins %d sonames %s' % (orig_pkg, has_libs, has_bins, sonames))
soname = None
if len(sonames) == 1:
soname = sonames[0]
elif len(sonames) > 1:
lead = d.getVar('LEAD_SONAME', True)
if lead:
r = re.compile(lead)
filtered = []
for s in sonames:
if r.match(s):
filtered.append(s)
if len(filtered) == 1:
soname = filtered[0]
elif len(filtered) > 1:
bb.note("Multiple matches (%s) for LEAD_SONAME '%s'" % (", ".join(filtered), lead))
else:
bb.note("Multiple libraries (%s) found, but LEAD_SONAME '%s' doesn't match any of them" % (", ".join(sonames), lead))
else:
bb.note("Multiple libraries (%s) found and LEAD_SONAME not defined" % ", ".join(sonames))
if has_libs and not has_bins and soname:
soname_result = socrunch(soname)
if soname_result:
(pkgname, devname) = soname_result
for pkg in packages.split():
if (d.getVar('PKG_' + pkg) or d.getVar('DEBIAN_NOAUTONAME_' + pkg)):
continue
debian_pn = d.getVar('DEBIANNAME_' + pkg)
if debian_pn:
newpkg = debian_pn
elif pkg == orig_pkg:
newpkg = pkgname
else:
newpkg = pkg.replace(orig_pkg, devname, 1)
mlpre=d.getVar('MLPREFIX', True)
if mlpre:
if not newpkg.find(mlpre) == 0:
newpkg = mlpre + newpkg
if newpkg != pkg:
d.setVar('PKG_' + pkg, newpkg)
# reversed sort is needed when some package is substring of another
# ie in ncurses we get without reverse sort:
# DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libtic orig_pkg ncurses-libtic debian_pn None newpkg libtic5
# and later
# DEBUG: LIBNAMES: pkgname libtic5 devname libtic pkg ncurses-libticw orig_pkg ncurses-libtic debian_pn None newpkg libticw
# so we need to handle ncurses-libticw->libticw5 before ncurses-libtic->libtic5
for pkg in sorted((d.getVar('AUTO_LIBNAME_PKGS', True) or "").split(), reverse=True):
auto_libname(packages, pkg)
}
python check_toolchain_tune () {
def check_toolchain_tune(data, tune, multilib):
tune_errors = []
if not tune:
return "No tuning found for %s multilib." % multilib
bb.debug(2, "Sanity-checking tuning '%s' (%s) features:" % (tune, multilib))
features = (data.getVar("TUNE_FEATURES_tune-%s" % tune, True) or "").split()
if not features:
return "Tuning '%s' has no defined features, and cannot be used." % tune
valid_tunes = data.getVarFlags('TUNEVALID') or {}
conflicts = data.getVarFlags('TUNECONFLICTS') or {}
# [doc] is the documentation for the variable, not a real feature
if 'doc' in valid_tunes:
del valid_tunes['doc']
if 'doc' in conflicts:
del conflicts['doc']
for feature in features:
if feature in conflicts:
for conflict in conflicts[feature].split():
if conflict in features:
tune_errors.append("Feature '%s' conflicts with '%s'." %
(feature, conflict))
if feature in valid_tunes:
bb.debug(2, " %s: %s" % (feature, valid_tunes[feature]))
else:
tune_errors.append("Feature '%s' is not defined." % feature)
whitelist = data.getVar("TUNEABI_WHITELIST", True) or ''
override = data.getVar("TUNEABI_OVERRIDE", True) or ''
if whitelist:
tuneabi = data.getVar("TUNEABI_tune-%s" % tune, True) or ''
if not tuneabi:
tuneabi = tune
if True not in [x in whitelist.split() for x in tuneabi.split()]:
tune_errors.append("Tuning '%s' (%s) cannot be used with any supported tuning/ABI." %
(tune, tuneabi))
if tune_errors:
return "Tuning '%s' has the following errors:\n" + '\n'.join(tune_errors)
}
python read_subpackage_metadata () {
import oe.packagedata
data = oe.packagedata.read_pkgdata(d.getVar('PN', True), d)
for key in data.keys():
d.setVar(key, data[key])
for pkg in d.getVar('PACKAGES', True).split():
sdata = oe.packagedata.read_subpkgdata(pkg, d)
for key in sdata.keys():
d.setVar(key, sdata[key])
}
python get_diskdata () {
def get_diskdata(var, dev, data):
olddiskdata = data.getVar(var, False)
diskdata = {}
if olddiskdata is None:
return
newdiskdata = get_diskstats(dev)
for key in olddiskdata.iterkeys():
diskdata["Start"+key] = str(int(olddiskdata[key]))
diskdata["End"+key] = str(int(newdiskdata[key]))
return diskdata
}
python base_get_metadata_git_revision () {
def base_get_metadata_git_revision(path, d):
f = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>&1" % path)
data = f.read()
if f.close() is None:
rev = data.split(" ")[0]
if len(rev) != 0:
return rev
return "<unknown>"
}
python package_rpm_install () {
bb.fatal("package_rpm_install not implemented!")
}
^ permalink raw reply [flat|nested] 8+ messages in thread