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>
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