module_strip.bbclass: set KERNEL_MAJOR_VERSION
authorEric BENARD <eric@eukrea.com>
Fri, 14 May 2010 04:59:21 +0000 (04:59 +0000)
committerTom Rini <tom_rini@mentor.com>
Fri, 14 May 2010 15:28:42 +0000 (08:28 -0700)
KERNEL_MAJOR_VERSION may not be set (for example when building a module)
and this was preventing modules from being stripped.

Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/module_strip.bbclass

index 2650f71..998fb86 100644 (file)
@@ -1,5 +1,8 @@
 PACKAGESTRIPFUNCS += "do_strip_modules"
 
+# may be inherited by kernel.bbclass which sets KERNEL_MAJOR_VERSION
+KERNEL_MAJOR_VERSION ?= "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
+
 do_strip_modules () {
        if test -e ${PKGD}/lib/modules; then
                if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then