Skip to contentSkip to conversation

kernel_do_compile uses wrong kernel version

PATCH Detlef Vollmann 1 participant 1 message Jul 12, 2010

lore
Share & tools
lore
#0 lore raw

kernel_do_compile in kernel.bbclass uses KERNEL_MAJOR_VERSION, which is computed based on files that don't exist at that point in time.
It's not a real problem, as a 'make dep' is still defined and just gives a warning, but I attached a patch nevertheless.

BTW, I'm not sure how useful get_kernelversion() really is, as for the DEPENDS the "2.6" or "2.4" needs to be computed based on PV anyway.

Detlef

classes/kernel.bbclass +1 -1
@@ -85,7 +85,7 @@
 kernel_do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
-	if [ "${KERNEL_MAJOR_VERSION}" != "2.6" ]; then
+	if [ "${@get_kernelmajorversion('${PV}')}" != "2.6" ]; then
 		oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}"
 	fi
 	oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"