diff options
Diffstat (limited to 'classes/module_strip.bbclass')
-rw-r--r-- | classes/module_strip.bbclass | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass index 3316e20c80..2650f71d50 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 ${WORKDIR}/install/$p/lib/modules; then - if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then - modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.ko`" - else - modules="`find ${WORKDIR}/install/$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 ${PKGD}/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) -} + |