diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-06-16 01:31:07 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-19 13:18:56 +0100 |
commit | 0ef2e5081b9c7250d2755e038f911a99ebe43a65 (patch) | |
tree | 108a99949aa27eeb5d2ae7ab1025fa0e8dfc43cd /meta/classes-recipe/kernel.bbclass | |
parent | 8502913bd3a653031943d8b1045153196ee30406 (diff) | |
download | poky-0ef2e5081b9c7250d2755e038f911a99ebe43a65.tar.gz |
kernel: Add kernel specific STRIP variable
strip can be coming from binutils or from llvm
in some cases llvm-strip can fail on kernel
Subprocess output:aarch64-yoe-linux-llvm-strip: error: Link field value 28 in section .rela.dyn is not a symbol table
This helps in selecting which strip is used when building kernel
(From OE-Core rev: 03973c8c1c93ddb1c8e05b773bfcc45aed73a99f)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/kernel.bbclass')
-rw-r--r-- | meta/classes-recipe/kernel.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass index 9c8036f4df..e82b696d1a 100644 --- a/meta/classes-recipe/kernel.bbclass +++ b/meta/classes-recipe/kernel.bbclass | |||
@@ -235,7 +235,7 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" | |||
235 | # Some Linux kernel configurations need additional parameters on the command line | 235 | # Some Linux kernel configurations need additional parameters on the command line |
236 | KERNEL_EXTRA_ARGS ?= "" | 236 | KERNEL_EXTRA_ARGS ?= "" |
237 | 237 | ||
238 | EXTRA_OEMAKE += ' CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}"' | 238 | EXTRA_OEMAKE += ' CC="${KERNEL_CC}" LD="${KERNEL_LD}" OBJCOPY="${KERNEL_OBJCOPY}" STRIP="${KERNEL_STRIP}"' |
239 | EXTRA_OEMAKE += ' HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"' | 239 | EXTRA_OEMAKE += ' HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"' |
240 | EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"' | 240 | EXTRA_OEMAKE += ' HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"' |
241 | 241 | ||
@@ -334,6 +334,10 @@ kernel_do_transform_bundled_initramfs() { | |||
334 | } | 334 | } |
335 | do_transform_bundled_initramfs[dirs] = "${B}" | 335 | do_transform_bundled_initramfs[dirs] = "${B}" |
336 | 336 | ||
337 | python do_package:prepend () { | ||
338 | os.environ['STRIP'] = d.getVar('KERNEL_STRIP') | ||
339 | } | ||
340 | |||
337 | python do_devshell:prepend () { | 341 | python do_devshell:prepend () { |
338 | os.environ["LDFLAGS"] = '' | 342 | os.environ["LDFLAGS"] = '' |
339 | } | 343 | } |