| Message ID | 20251104171611.2227798-3-elmehdi.younes@smile.fr |
|---|---|
| State | New |
| Headers | show |
| Series | Add rust-for-linux option for linux-yocto | expand |
On Tue, Nov 4, 2025 at 12:16 PM El Mehdi YOUNES via lists.openembedded.org <elmehdi.younes=smile.fr@lists.openembedded.org> wrote: > This adds the mechanism to enable the Rust for Linux kernel feature > via a DISTRO_FEATURE. > > When 'rust-kernel' is present in DISTRO_FEATURES, the 'rust.scc' > kernel feature is appended to the KERNEL_FEATURES list. > > Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr> > --- > meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta/recipes-kernel/linux/linux-yocto.inc > b/meta/recipes-kernel/linux/linux-yocto.inc > index 4d0a726bb6..40e5bf214b 100644 > --- a/meta/recipes-kernel/linux/linux-yocto.inc > +++ b/meta/recipes-kernel/linux/linux-yocto.inc > @@ -95,3 +95,7 @@ do_devshell:prepend() { > d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1") > d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH > PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") > } > + > +KERNEL_FEATURES:append = " ${@bb.utils.contains('DISTRO_FEATURES', > 'rust-kernel', ' rust.scc', '', d)}" > +# TODO: Kernel rust code compilation breaks under ccache, disable it for > now > +CCACHE_DISABLE = "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', > '1', '', d)}" > Make this a ?= assignment as well. Since once this is set someone needs to hack around it if they are working on debugging ccache + rust in the kernel. Bruce > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#225738): > https://lists.openembedded.org/g/openembedded-core/message/225738 > Mute This Topic: https://lists.openembedded.org/mt/116120517/1050810 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > >
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 4d0a726bb6..40e5bf214b 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -95,3 +95,7 @@ do_devshell:prepend() { d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1") d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR") } + +KERNEL_FEATURES:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', ' rust.scc', '', d)}" +# TODO: Kernel rust code compilation breaks under ccache, disable it for now +CCACHE_DISABLE = "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', '1', '', d)}"
This adds the mechanism to enable the Rust for Linux kernel feature via a DISTRO_FEATURE. When 'rust-kernel' is present in DISTRO_FEATURES, the 'rust.scc' kernel feature is appended to the KERNEL_FEATURES list. Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr> --- meta/recipes-kernel/linux/linux-yocto.inc | 4 ++++ 1 file changed, 4 insertions(+)