[oe] [PATCH] module_strip.bbclass: set KERNEL_MAJOR_VERSION

Eric Benard eric at eukrea.com
Fri May 14 14:59:21 UTC 2010


KERNEL_MAJOR_VERSION may not be set (for example when building a module)
, this was preventing modules from being stripped.

Signed-off-by: Eric Benard <eric at eukrea.com>
---
v2: moved to module_strip.bbclass following an advice from Tom Rini

 classes/module_strip.bbclass |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass
index 2650f71..998fb86 100644
--- a/classes/module_strip.bbclass
+++ b/classes/module_strip.bbclass
@@ -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
-- 
1.6.3.3





More information about the Openembedded-devel mailing list