diff mbox series

[RFC,4/4] linux-yocto-dev: Add temporary Rust kernel feature

Message ID 20251104171611.2227798-5-elmehdi.younes@smile.fr
State New
Headers show
Series Add rust-for-linux option for linux-yocto | expand

Commit Message

El Mehdi YOUNES Nov. 4, 2025, 5:16 p.m. UTC
This commit introduces the 'rust.scc' and 'rust.cfg' files, adding
them to the 'SRC_URI' of the 'linux-yocto-dev'.

Ideally, these kernel feature files belong in the separate
'yocto-kernel-cache' repository.

However, for the purpose of this RFC series,they are being added directly
to 'meta/recipes-kernel/linux/files/' to allow the entire feature set to
be tested and reviewed in a single repository.

Once this approach is discussed and approved, these files will be
removed and submitted as a separate patch to the 'yocto-kernel-cache'
project.

Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
---
 meta/recipes-kernel/linux/files/rust.cfg     | 6 ++++++
 meta/recipes-kernel/linux/files/rust.scc     | 2 ++
 meta/recipes-kernel/linux/linux-yocto-dev.bb | 2 ++
 3 files changed, 10 insertions(+)
 create mode 100644 meta/recipes-kernel/linux/files/rust.cfg
 create mode 100644 meta/recipes-kernel/linux/files/rust.scc
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux/files/rust.cfg b/meta/recipes-kernel/linux/files/rust.cfg
new file mode 100644
index 0000000000..dc31c9efbc
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/rust.cfg
@@ -0,0 +1,6 @@ 
+CONFIG_RUST=y
+# --- RFC TEST ONLY - REMOVE FOR FINAL PATCH ---
+# Enabled samples to validate the Rust build.
+# Users should enable these via their own config fragments.
+CONFIG_SAMPLES_RUST=y
+CONFIG_SAMPLE_RUST_MINIMAL=m
diff --git a/meta/recipes-kernel/linux/files/rust.scc b/meta/recipes-kernel/linux/files/rust.scc
new file mode 100644
index 0000000000..8b81971be2
--- /dev/null
+++ b/meta/recipes-kernel/linux/files/rust.scc
@@ -0,0 +1,2 @@ 
+# SPDX-License-Identifier: MIT
+kconf non-hardware rust.cfg
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index fb4e0864d2..a1c9940219 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -59,3 +59,5 @@  KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " fe
 KERNEL_FEATURES:append = " ${@bb.utils.contains("DISTRO_FEATURES", "ptest", " features/gpio/mockup.scc features/gpio/sim.scc", "", d)}"
 
 KERNEL_VERSION_SANITY_SKIP = "1"
+
+SRC_URI += "file://rust.scc"