angstrom: prefer the git version of tslib
[openembedded.git] / classes / module_strip.bbclass
blob9c17e4cddc8ddcb95a0fd79926d8b90df399d466
1 PACKAGESTRIPFUNCS += "do_strip_modules"
3 # inherit to get get_kernelmajorversion();
4 inherit linux-kernel-base
6 # may be inherited by kernel.bbclass which sets KERNEL_MAJOR_VERSION
7 KERNEL_MAJOR_VERSION ?= "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
9 do_strip_modules () {
10         if test -e ${PKGD}/lib/modules; then
11                 if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then
12                         modules="`find ${PKGD}/lib/modules -name \*.ko`"
13                 else
14                         modules="`find ${PKGD}/lib/modules -name \*.o`"
15                 fi
16                 if [ -n "$modules" ]; then
17                         for module in $modules ; do
18                                 if ! [ -d "$module"  ] ; then
19                                         ${STRIP} -v -g $module
20                                 fi
21                         done    
22                 fi
23         fi