kernel-yocto: Support in-tree config fragments
RFC PATCH 1/1 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.
--- meta/classes-recipe/kernel-yocto.bbclass | 3 +++ 1 file changed, 3 insertions(+)
meta/classes-recipe/kernel-yocto.bbclass +3 -0
@@ -248,6 +248,9 @@ do_kernel_metadata() { fi done + # allow in-tree config fragments to be used in KERNEL_FEATURES + includes="$includes -I${S}/arch/${ARCH}/configs -I${S}/kernel/configs" + # expand kernel features into their full path equivalents bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) if [ -z "$bsp_definition" ]; then
Signature · 1 line
2.39.5
Quoted 6 lines · Paul Barker via lists.openembedded.org
[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]
Quoted 8 lines
In Linux 6.8, the in-tree
rv32_defconfigfile for 32-bit RISC-V support was dropped in favour of aMakefiletarget 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_FEATURESif we add the in-tree arch config directory (arch/${ARCH}/configs) to the search path.
Agreed, that this is a more consistent way to bring in these types of fragments (versus being hidden under the build/make, etc).
The only issue is that the audit won't react correctly to these fragments, so we'll potentially end up with silent failure of them to apply and/or options that are not valid, etc.
Let me queue this patch locally, do some audit testing (and changes if necessary) and I'll send it along in my next pull request.
(Same goes for the kern-tools patch).
Bruce
Quoted 28 lines
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.
Signed-off-by Paul Barker <[email protected]>--- meta/classes-recipe/kernel-yocto.bbclass | 3 +++ 1 file changed, 3 insertions(+)meta/classes-recipe/kernel-yocto.bbclass +3
-1@@ -248,6 +248,9 @@ do_kernel_metadata() { fi done + # allow in-tree config fragments to be used in KERNEL_FEATURES + includes="$includes -I${S}/arch/${ARCH}/configs -I${S}/kernel/configs" + # expand kernel features into their full path equivalents bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) if [ -z "$bsp_definition" ]; then --2.39.5
Quoted 8 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#205183): https://lists.openembedded.org/g/openembedded-core/message/205183
Mute This Topic: https://lists.openembedded.org/mt/108776739/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · Bruce Ashfield via lists.openembedded.org
Quoted 6 lines · Paul Barker via lists.openembedded.org
[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]Quoted 8 lines
In Linux 6.8, the in-tree
rv32_defconfigfile for 32-bit RISC-V support was dropped in favour of aMakefiletarget 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_FEATURESif we add the in-tree arch config directory (arch/${ARCH}/configs) to the search path.Agreed, that this is a more consistent way to bring in these types of fragments (versus being hidden under the build/make, etc).
Quoted 8 lines
The only issue is that the audit won't react correctly to these fragments, so we'll potentially end up with silent failure of them to apply and/or options that are not valid, etc.
Let me queue this patch locally, do some audit testing (and changes if necessary) and I'll send it along in my next pull request.
(Same goes for the kern-tools patch).
I just saw your ping on another patch, so I thought I'd follow up here!
I have the changes queued, but have been out on holiday the past few days (Canadian Thanksgiving). My audit addition is almost done (I just have to make it conditional now) and then a bit of final testing.
I do expect to submit this as part of my next pull request, hopefully by the end of this week.
Bruce
Quoted 48 lines
Bruce
Quoted 25 lines
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.
Signed-off-by Paul Barker <[email protected]>--- meta/classes-recipe/kernel-yocto.bbclass | 3 +++ 1 file changed, 3 insertions(+)meta/classes-recipe/kernel-yocto.bbclass +3
-1@@ -248,6 +248,9 @@ do_kernel_metadata() { fi done + # allow in-tree config fragments to be used in KERNEL_FEATURES + includes="$includes -I${S}/arch/${ARCH}/configs -I${S}/kernel/configs" + # expand kernel features into their full path equivalents bsp_definition=$(spp ${includes} --find -DKMACHINE=${KMACHINE} -DKTYPE=${LINUX_KERNEL_TYPE}) if [ -z "$bsp_definition" ]; then --Quoted 5 lines
2.39.5
--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#205201): https://lists.openembedded.org/g/openembedded-core/message/205201
Mute This Topic: https://lists.openembedded.org/mt/108776739/1050810
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II