summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Barker <paul@pbarker.dev>2024-11-06 21:29:06 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-07 13:31:26 +0000
commitb40851ec039baf93c6ba56ddf41d42e8da8ff071 (patch)
tree0047050b3140828cff261b26256b7bd5b7ccac06
parent78f25d9a9c5b5f87d3dcf76d1356d1c906e82103 (diff)
downloadpoky-b40851ec039baf93c6ba56ddf41d42e8da8ff071.tar.gz
kernel-yocto: Support in-tree config fragments
[This is currently an RFC as it depends on a separate patch to add support for config fragments with .config file extensions in yocto-kernel-tools: https://lists.yoctoproject.org/g/linux-yocto/message/14431] In Linux 6.8, the in-tree rv32_defconfig file for 32-bit RISC-V support was dropped in favour of a Makefile target which combines the RISC-V defconfig with a config fragment '32-bit.config'. So to build for 32-bit RISC-V using the in-tree configuration from an upstream kernel, we need to be able to enable this 32-bit config fragment. We can support this via KERNEL_FEATURES if we add the in-tree arch config directory (arch/${ARCH}/configs) to the search path. While we're here, let's also add the generic config directory (kernel/configs) to the search path so in-tree config fragments such as 'hardening.config' can be used. (From OE-Core rev: e4e50a9a93d606ba5fef8f10f1ec20deaed7ab9c) Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/kernel-yocto.bbclass3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass
index 6d5c3b6327..66602d3594 100644
--- a/meta/classes-recipe/kernel-yocto.bbclass
+++ b/meta/classes-recipe/kernel-yocto.bbclass
@@ -248,6 +248,9 @@ do_kernel_metadata() {
248 fi 248 fi
249 done 249 done
250 250
251 # allow in-tree config fragments to be used in KERNEL_FEATURES
252 includes="$includes -I${S}/arch/${ARCH}/configs -I${S}/kernel/configs"
253
251 # expand kernel features into their full path equivalents 254 # expand kernel features into their full path equivalents
252 bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) 255 bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE})
253 if [ -z "$bsp_definition" ]; then 256 if [ -z "$bsp_definition" ]; then