From 8581bc05f43d81179added7909e99d3afde1f447 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 23 Nov 2009 00:45:02 +0000 Subject: package.bbclass: Make sure PKGD is empty before populating fixing certain bugs (from Poky) Signed-off-by: Richard Purdie --- classes/package.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index bb81f33b29..8892fa9084 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -334,6 +334,7 @@ python perform_packagecopy () { # Start by package population by taking a copy of the installed # files to operate on + os.system('rm -rf %s/*' % (dvar)) os.system('cp -pPR %s/* %s/' % (dest, dvar)) } -- cgit v1.2.3 From d35cf88e849ccad6fce5ab4bbf4cbe96f6e513b9 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 23 Nov 2009 01:18:03 +0000 Subject: kernel.bbclass: do_deploy modules.tgz should operating on PKGD Signed-off-by: Richard Purdie --- classes/kernel.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 637805e6e3..82719ac22c 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -527,8 +527,8 @@ do_deploy() { install -m 0644 ${KERNEL_OUTPUT} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin - if [ -d "${D}/lib" ]; then - fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${D} lib + if [ -d "${PKGD}/lib" ]; then + fakeroot tar -cvzf ${DEPLOY_DIR_IMAGE}/${MODULES_IMAGE_BASE_NAME}.tgz -C ${PKGD} lib fi cd ${DEPLOY_DIR_IMAGE} -- cgit v1.2.3 From 18a377dcf50c5c10ebc73a36963a6e83d1bbad5d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 23 Nov 2009 01:20:04 +0000 Subject: package.bbclass/module-strip.bbclass: Various strip fixes * Turn striping functionality into functions and call in the appropriate place * Removing various races and ordering issues * Should mean kernel modules are correctly stripped (and stripping can be disabled) * Addresses bug 1182 * kernel module stripping applied to ${PKGD} (the correct place) Signed-off-by: Richard Purdie --- classes/module_strip.bbclass | 36 +++++++++++++++--------------------- classes/package.bbclass | 37 ++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 34 deletions(-) (limited to 'classes') diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass index 17409190ed..ce36e213ff 100644 --- a/classes/module_strip.bbclass +++ b/classes/module_strip.bbclass @@ -1,26 +1,20 @@ -#DEPENDS_append = " module-strip" +PACKAGESTRIPFUNCS += "do_strip_modules" do_strip_modules () { - for p in ${PACKAGES}; do - if test -e ${PKGDEST}/$p/lib/modules; then - if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then - modules="`find ${PKGDEST}/${p}/lib/modules -name \*.ko`" - else - modules="`find ${PKGDEST}/${p}/lib/modules -name \*.o`" - fi - if [ -n "$modules" ]; then - for module in $modules ; do - if ! [ -d "$module" ] ; then - ${STRIP} -v -g $module - fi - done -# NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules - fi + if test -e ${PKGDEST}/lib/modules; then + if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then + modules="`find ${PKGD}/lib/modules -name \*.ko`" + else + modules="`find ${PKGD}/lib/modules -name \*.o`" fi - done + if [ -n "$modules" ]; then + for module in $modules ; do + if ! [ -d "$module" ] ; then + ${STRIP} -v -g $module + fi + done + fi + fi } -python do_package_append () { - if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'): - bb.build.exec_func('do_strip_modules', d) -} + diff --git a/classes/package.bbclass b/classes/package.bbclass index 8892fa9084..4196135710 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -201,6 +201,26 @@ def runstrip(file, d): return 1 +PACKAGESTRIPFUNCS += "do_runstrip" +python do_runstrip() { + import stat + + dvar = bb.data.getVar('PKGD', d, True) + def isexec(path): + try: + s = os.stat(path) + except (os.error, AttributeError): + return 0 + return (s[stat.ST_MODE] & stat.S_IEXEC) + + for root, dirs, files in os.walk(dvar): + for f in files: + file = os.path.join(root, f) + if not os.path.islink(file) and not os.path.isdir(file) and isexec(file): + runstrip(file, d) +} + + def write_package_md5sums (root, outfile, ignorepaths): # For each regular file under root, writes an md5sum to outfile. # With thanks to patch.bbclass. @@ -339,7 +359,7 @@ python perform_packagecopy () { } python populate_packages () { - import glob, stat, errno, re,os + import glob, errno, re,os workdir = bb.data.getVar('WORKDIR', d, True) outdir = bb.data.getVar('DEPLOY_DIR', d, True) @@ -350,13 +370,6 @@ python populate_packages () { bb.mkdirhier(outdir) os.chdir(dvar) - def isexec(path): - try: - s = os.stat(path) - except (os.error, AttributeError): - return 0 - return (s[stat.ST_MODE] & stat.S_IEXEC) - # Sanity check PACKAGES for duplicates - should be moved to # sanity.bbclass once we have the infrastucture package_list = [] @@ -369,12 +382,10 @@ python populate_packages () { else: package_list.append(pkg) + if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'): - for root, dirs, files in os.walk(dvar): - for f in files: - file = os.path.join(root, f) - if not os.path.islink(file) and not os.path.isdir(file) and isexec(file): - runstrip(file, d) + for f in (bb.data.getVar('PACKAGESTRIPFUNCS', d, True) or '').split(): + bb.build.exec_func(f, d) pkgdest = bb.data.getVar('PKGDEST', d, True) os.system('rm -rf %s' % pkgdest) -- cgit v1.2.3 From 302420650446bc7b33723a1e1f10929e99bef0fa Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 23 Nov 2009 08:20:46 +0100 Subject: module-strip.bbclass: fix typo, last PKGDEST should be PKGD too --- classes/module_strip.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass index ce36e213ff..2650f71d50 100644 --- a/classes/module_strip.bbclass +++ b/classes/module_strip.bbclass @@ -1,7 +1,7 @@ PACKAGESTRIPFUNCS += "do_strip_modules" do_strip_modules () { - if test -e ${PKGDEST}/lib/modules; then + if test -e ${PKGD}/lib/modules; then if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then modules="`find ${PKGD}/lib/modules -name \*.ko`" else -- cgit v1.2.3 From a55e9a527a8c9823044196d031f2da2783ff8f35 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 23 Nov 2009 11:29:05 +0100 Subject: kernel.bbclass, linux.inc: move do_deploy task after do_package * Move do_deploy after do_package in kernel.bbclass as RP said * Move devicetree_image before do_deploy in linux.inc, because it creates dependency loop if its between after do_package and before do_deploy. Signed-off-by: Martin Jansa --- classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 82719ac22c..dedd5a6962 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -540,4 +540,4 @@ do_deploy() { do_deploy[dirs] = "${S}" do_deploy[depends] += "fakeroot-native:do_populate_staging" -addtask deploy before do_package after do_install +addtask deploy after do_package -- cgit v1.2.3 From bc2bddb71d8c5db25b80aa6435392ec1c8df39f9 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 23 Nov 2009 13:53:04 +0100 Subject: kernel.bbclass: force do_deploy call before do_build Signed-off-by: Martin Jansa --- classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index dedd5a6962..edeaa660bb 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -540,4 +540,4 @@ do_deploy() { do_deploy[dirs] = "${S}" do_deploy[depends] += "fakeroot-native:do_populate_staging" -addtask deploy after do_package +addtask deploy before do_build after do_package -- cgit v1.2.3 From 32b754e45f81ec369258a0417271535770d12aa3 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Tue, 24 Nov 2009 15:53:50 -0200 Subject: chicken: added support for cross compilation with chicken Added the chicken-cross recipe and a chicken class for translating architectures to the Chicken nomenclature. Signed-off-by: Mario Domenech Goulart Signed-off-by: Otavio Salvador --- classes/chicken.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 classes/chicken.bbclass (limited to 'classes') diff --git a/classes/chicken.bbclass b/classes/chicken.bbclass new file mode 100644 index 0000000000..5ebe1ff462 --- /dev/null +++ b/classes/chicken.bbclass @@ -0,0 +1,11 @@ +def chicken_arch(bb, d): + import re + arch_pattern = re.compile('^i.*86$') + target_arch = d.getVar("TARGET_ARCH", 1) + if arch_pattern.match(target_arch): + return 'x86' + else: + return target_arch + +CHICKEN_ARCH = "${@chicken_arch(bb, d)}" + -- cgit v1.2.3 From 2c8134baa56ad047f5c37069379c0e560dd6477e Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Nov 2009 13:11:43 +0100 Subject: pkgconfig bbclass: also sed out bogus includes RP says: In theory the recipes themselves should be patched to stop this nonesense getting in there in the first place but that is appropriate for pkgconfig.bbclass --- classes/pkgconfig.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index 5844461fb4..f3d93716d7 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -3,7 +3,7 @@ DEPENDS_prepend = "pkgconfig-native " do_install_prepend () { for i in `find ${S}/ -name "*.pc" -type f` ; do \ - sed -i -e 's:-L${STAGING_LIBDIR}::g' $i + sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i done } -- cgit v1.2.3 From 51f172ce530a7718c1cf628333ba0904120ea1e2 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Nov 2009 14:20:22 +0100 Subject: e17: bump SRCREV and start adapting it to new-style staging --- classes/efl.bbclass | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/efl.bbclass b/classes/efl.bbclass index d4c3baa9cf..900d9c7f0d 100644 --- a/classes/efl.bbclass +++ b/classes/efl.bbclass @@ -11,16 +11,19 @@ PE = "2" ARM_INSTRUCTION_SET = "arm" -AUTOTOOLS_STAGE_PKGCONFIG = "1" -# do NOT inherit pkgconfig here, see note in autotools_stage_all inherit autotools +# evas-native looks at this var, so keep it +AUTOTOOLS_STAGE_PKGCONFIG = "1" + do_configure_prepend() { touch config.rpath } -do_stage() { - autotools_stage_all +do_install_prepend () { + for i in `find ${S}/ -name "*.pc" -type f` ; do \ + sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i + done } # This construction is stupid, someone with more E knowledge should change it to =+ or something -- cgit v1.2.3 From e6c9a9740bdbe3a86b3ef0c25cc37b3d9d844c0f Mon Sep 17 00:00:00 2001 From: Kristoffer Ericson Date: Thu, 26 Nov 2009 19:11:11 +0100 Subject: Fix so package_tar yet again produces tar packages. This closes bug 5339. Thx to Pb for fix. Signed-off-by: Kristoffer Ericson --- classes/package_tar.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index 9c9ae4ff0a..b905e170f4 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -56,7 +56,8 @@ python do_package_tar () { for pkg in packages.split(): localdata = bb.data.createCopy(d) - root = "%s/install/%s" % (workdir, pkg) + pkgdest = bb.data.getVar('PKGDEST', d, 1) + root = "%s/%s" % (pkgdest, pkg) bb.data.setVar('ROOT', '', localdata) bb.data.setVar('ROOT_%s' % pkg, root, localdata) -- cgit v1.2.3