From: Khem Raj Date: Mon, 14 Aug 2023 02:25:50 +0000 (-0700) Subject: kernel.bbclass: Use KERNEL_STRIP instead of STRIP X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2db0ef8fe6381c893791ad645748f6e7c8134e5f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git kernel.bbclass: Use KERNEL_STRIP instead of STRIP Kernel uses its own variables KERNEL_* instead of general toolchain env variables, therefore use KERNEL_STRIP here explicitly, Problems happen when using llvm-strip as default STRIP in distro settings, since kernel defaults to using gcc, system does not stage llvm/clang toolchain into kernel's staging sysroot and this function ends up with FileNotFoundError: [Errno 2] No such file or directory: 'riscv64-yoe-linux-llvm-strip' Signed-off-by: Khem Raj Cc: Bruce Ashfield Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index bb5995b4954..acb43bd4d57 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass @@ -760,7 +760,7 @@ addtask kernel_link_images after do_compile before do_strip python do_strip() { import shutil - strip = d.getVar('STRIP') + strip = d.getVar('KERNEL_STRIP') extra_sections = d.getVar('KERNEL_IMAGE_STRIP_EXTRA_SECTIONS') kernel_image = d.getVar('B') + "/" + d.getVar('KERNEL_OUTPUT_DIR') + "/vmlinux"