@@ -10,12 +10,15 @@ deltask do_unpack
do_patch[depends] += "virtual/kernel:do_shared_workdir"
do_patch[noexec] = "1"
do_package[depends] += "virtual/kernel:do_populate_sysroot"
-KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}")}"
-LOCAL_VERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}")}"
inherit linux-kernel-base
+KERNEL_VERSION = "${@get_kernelversion_file("${STAGING_KERNEL_BUILDDIR}", "${KERNEL_PACKAGE_NAME}")}"
+LOCAL_VERSION = "${@get_kernellocalversion_file("${STAGING_KERNEL_BUILDDIR}", "${KERNEL_PACKAGE_NAME}")}"
+
# The final packages get the kernel version instead of the default 1.0
python do_package:prepend() {
+ kernel_version = oe.utils.read_file('%s/%s-abiversion' % (d.getVar("STAGING_KERNEL_BUILDDIR"), d.getVar("KERNEL_PACKAGE_NAME")))
+ d.setVar('KERNEL_VERSION', kernel_version)
d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
}
get_kernellocalversion_file and get_kernelversion_file relies on hard coded kernel-localversion and kernel-abiversion files. The kernel- prefix changes when you modify KERNEL_PACKAGE_NAME. Update to account for the modification of KERNEL_PACKAGE_NAME. There also appears to be an issue in the do_package task. The KERNEL_VERSION variable appears to be empty. Reseting the variable fixes issues with PKGV not being set. Signed-off-by: Vincent Davis Jr <vince@underview.tech> --- meta/classes-recipe/kernelsrc.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)