[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    [OE-core] [PATCH 6/9] linux-yocto: move build / debug dependencies to .inc
From:       "Bruce Ashfield" <bruce.ashfield () gmail ! com>
Date:       2023-05-31 18:48:58
Message-ID: 1cf98743e9d0e70fad6a2881c37f7aa39fe2c895.1685558432.git.bruce.ashfield () gmail ! com
[Download RAW message or body]

Content-Transfer-Encoding: 8bit

From: Bruce Ashfield <bruce.ashfield@gmail.com>

When the architecture and debug specific build and runtime dependencies
were introduced, they were only applicable to "newer" kernel versions
and were enabled in the version specific recipes.

These are now common dependencies, so we can avoid the duplication and
move them to a common location.

We also change the adhoc nature of the existing elfutils definition,
as it is now detected by the kernel build and we no longer need the
work around to the native sysroot.

Finally, we change the undocumented KERNEL_DEBUG_OPTIONS to KERNEL_DEBUG
and use it to conditionally enable features that need extended support
(and support sometimes out of oe-core).

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 meta/recipes-kernel/linux/linux-yocto.inc    | 10 ++++++++--
 meta/recipes-kernel/linux/linux-yocto_6.1.bb |  4 ----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto.inc \
b/meta/recipes-kernel/linux/linux-yocto.inc index 934591ff1c..04a8105e17 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -59,8 +59,14 @@ do_install:append(){
 # enable kernel-sample for oeqa/runtime/cases's ksample.py test
 KERNEL_FEATURES:append:qemuall=" features/kernel-sample/kernel-sample.scc"
 
-KERNEL_DEBUG_OPTIONS ?= "stack"
-KERNEL_EXTRA_ARGS:append:x86-64 = " ${@bb.utils.contains('KERNEL_DEBUG_OPTIONS', \
'stack', 'HOST_LIBELF_LIBS="-L${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig/../../../usr/lib/ \
-lelf"', '', d)}" +KERNEL_DEBUG ?= ""
+# These used to be version specific, but are now common dependencies.  New
+# tools / dependencies will continue to be added in version specific recipes.
+DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64" ], "elfutils-native", \
"", d)}' +DEPENDS += "openssl-native util-linux-native"
+DEPENDS += "gmp-native libmpc-native"
+DEPENDS += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native", "", d)}'
+EXTRA_OEMAKE += '${@bb.utils.contains("KERNEL_DEBUG", "True", "", "PAHOLE=false", \
d)}'  
 do_devshell:prepend() {
     # setup native pkg-config variables (kconfig scripts call pkg-config directly, \
                cannot generically be overriden to pkg-config-native)
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.1.bb \
b/meta/recipes-kernel/linux/linux-yocto_6.1.bb index 7600f45522..7e7edf82c3 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.1.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.1.bb
@@ -46,10 +46,6 @@ SRC_URI += \
"file://0001-perf-cpumap-Make-counter-as-unsigned-ints.patch"  LIC_FILES_CHKSUM = \
"file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"  LINUX_VERSION ?= "6.1.27"
 
-DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
-DEPENDS += "openssl-native util-linux-native"
-DEPENDS += "gmp-native libmpc-native"
-
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 KMETA = "kernel-meta"
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182029): https://lists.openembedded.org/g/openembedded-core/message/182029
Mute This Topic: https://lists.openembedded.org/mt/99248935/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic