]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel.bbclass: Fix the do_strip() malfunction
authorKevin Hao <kexin.hao@windriver.com>
Sat, 9 Apr 2022 06:04:40 +0000 (14:04 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 12 Apr 2022 08:43:38 +0000 (09:43 +0100)
The BB variable can't be referenced directly in a python function,
this misusage of the variable reference causes strip function to be
always skipped.

Fixed: b9c3db4953e4 ("kernel.bbclass: Use KERNEL_IMAGEDEST instead of hardcoded boot path")
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 7ca847f0a3419d02be23a267f013f84d4643bd31..bc52419e0945f0665eb433608b98b8514b54ad93 100644 (file)
@@ -711,7 +711,7 @@ python do_strip() {
     extra_sections = d.getVar('KERNEL_IMAGE_STRIP_EXTRA_SECTIONS')
     kernel_image = d.getVar('B') + "/" + d.getVar('KERNEL_OUTPUT_DIR') + "/vmlinux"
 
-    if (extra_sections and kernel_image.find('${KERNEL_IMAGEDEST}/vmlinux') != -1):
+    if (extra_sections and kernel_image.find(d.getVar('KERNEL_IMAGEDEST') + '/vmlinux') != -1):
         kernel_image_stripped = kernel_image + ".stripped"
         shutil.copy2(kernel_image, kernel_image_stripped)
         oe.package.runstrip((kernel_image_stripped, 8, strip, extra_sections))