diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-10 14:47:41 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-10 14:47:41 +0100 |
commit | d3630f81747157198316fef874d59f9f120969d4 (patch) | |
tree | fa4428e0ff8a726e670775a6cc242b02310b2f32 /meta | |
parent | 708db1ef52a49098a0ab7972211b9beac74d7654 (diff) | |
download | openembedded-core-d3630f81747157198316fef874d59f9f120969d4.tar.gz openembedded-core-d3630f81747157198316fef874d59f9f120969d4.tar.bz2 openembedded-core-d3630f81747157198316fef874d59f9f120969d4.zip |
kernel/package.bbclass: Handle kernel module stripping centrally
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/kernel.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/module_strip.bbclass | 22 | ||||
-rw-r--r-- | meta/classes/package.bbclass | 4 | ||||
-rw-r--r-- | meta/packages/linux/linux-wrs_git.bb | 2 |
4 files changed, 6 insertions, 26 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 3963e38eb8..1390afce3f 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -218,15 +218,13 @@ EXPORT_FUNCTIONS do_compile do_install do_configure # kernel-base becomes kernel-${KERNEL_VERSION} # kernel-image becomes kernel-image-${KERNEL_VERISON} -PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux kernel-misc kernel-dbg" +PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux kernel-misc" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*" FILES_kernel-vmlinux = "/boot/vmlinux*" # misc is a package to contain files we need in staging FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media" -# We don't care about dbg files for the kernel but split them out here to keep the packaging clean -FILES_kernel-dbg = "/lib/modules/${KERNEL_VERSION}/kernel/*/*/.debug /lib/modules/${KERNEL_VERSION}/kernel/*/.debug /lib/modules/${KERNEL_VERSION}/kernel/*/*/*/.debug" RDEPENDS_kernel = "kernel-base" # Allow machines to override this dependency if kernel image files are # not wanted in images as standard diff --git a/meta/classes/module_strip.bbclass b/meta/classes/module_strip.bbclass index 7636f1f403..e69de29bb2 100644 --- a/meta/classes/module_strip.bbclass +++ b/meta/classes/module_strip.bbclass @@ -1,22 +0,0 @@ -#DEPENDS_append = " module-strip" - -do_strip_modules () { - for p in ${PACKAGES}; do - if test -e ${WORKDIR}/install/$p/lib/modules; then - modules="`find ${WORKDIR}/install/$p/lib/modules -name \*${KERNEL_OBJECT_SUFFIX}`" - if [ -n "$modules" ]; then - for module in $modules ; do - if ! [ -d "$module" ] ; then - ${STRIP} -v -g $module - fi - done -# NM="${STAGING_BINDIR_NATIVE}/${HOST_PREFIX}nm" OBJCOPY="${STAGING_BINDIR_NATIVE}/${HOST_PREFIX}objcopy" strip_module $modules - fi - fi - done -} - -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/meta/classes/package.bbclass b/meta/classes/package.bbclass index 8611d94774..d8e480f1ff 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -155,6 +155,10 @@ def runstrip(file, d): strip = bb.data.getVar("STRIP", d, True) objcopy = bb.data.getVar("OBJCOPY", d, True) + # Handle kernel modules specifically - .debug directories here are pointless + if file.find("/lib/modules/") != -1 and file.endswith(".ko"): + return os.system("%s'%s' -g --remove-section=.comment --remove-section=.note '%s'" % (pathprefix, strip, file)) + newmode = None if not os.access(file, os.W_OK): origmode = os.stat(file)[stat.ST_MODE] diff --git a/meta/packages/linux/linux-wrs_git.bb b/meta/packages/linux/linux-wrs_git.bb index 930c903c44..72ceb74291 100644 --- a/meta/packages/linux/linux-wrs_git.bb +++ b/meta/packages/linux/linux-wrs_git.bb @@ -24,7 +24,7 @@ COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips)" LINUX_VERSION = "v2.6.34" LINUX_VERSION_EXTENSION = "-wr-${LINUX_KERNEL_TYPE}" -PR = "r4" +PR = "r5" S = "${WORKDIR}/linux" B = "${WORKDIR}/linux-${WRMACHINE}-${LINUX_KERNEL_TYPE}-build" |