Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/8] Enable rust support for linux kernel
@ 2025-11-05 13:09 Harish.Sadineni
  2025-11-05 13:09 ` [PATCH RFC v2 1/8] bindgen-cli: extend BBCLASSEXTEND to include nativesdk Harish.Sadineni
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Harish.Sadineni @ 2025-11-05 13:09 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, bruce.ashfield, sundeep.kokkonda, elmehdi.younes

From: Harish Sadineni <Harish.Sadineni@windriver.com>

v2: 
 - Addressed Bruce review comments for Making rust support for linux kernel as optional via distro feature.
 - Fixed buildpaths errors by appending --remap-path-prefix to RUST_DEBUG_REMAP
 - Removed unnecessary flags from rust.cfg 

This patch series introduces Rust support into the linux-yocto kernel recipe
and related build infrastructure in the Yocto Project. The goal is to enable
building the Linux kernel with Rust components and provide support for
building kernel module which is written in rust inside sdk.

Summary of changes:

- Patch 1: Extend 'bindgen-cli' to support 'nativesdk', allowing it to be available in the SDK environment.
- Patch 2: Add required dependencies ('clang-native', 'rust-native', 'bindgen-cli-native') to the kernel to support Rust binding generation.
- Patch 3: Install the Rust standard library source ('library/') into `work-shared` and which will be later copied to
           linux-yocto recipe-sysroot-native.
- Patch 4: Stage the Rust sources into `recipe-sysroot-native` for kernel build compatibility, making them visible during native builds.
- Patch 5: Update `kernel-yocto.bbclass` to invoke `make rustavailable` during 'do_kernel_configme', ensuring Rust readiness.
- Patch 6: Add kernel configuration support for Rust (via 'rust.cfg' and 'rust.scc'), enabling the Rust build options in kernel config.
- Patch 7: Fixed buildpaths errors when rust is enabled for kernel by appending --remap-path-prefix to RUST_DEBUG_REMAP 
- patch 8: Copy Rust kernel sources into kernel-devsrc build directory which will be required while running 'make prepare' in sdk.

Harish Sadineni (8):
  bindgen-cli: extend BBCLASSEXTEND to include nativesdk
  linux-yocto: add clang-native,rust-native and bindgen-cli-native to
    DEPENDS
  rust: install Rust library sources for 'make rustavailable' support
  rust: stage rustlib sources for linux-yocto make rustavailable support
  kernel-yocto: add rust support via make rustavailable in
    do_kernel_configme
  linux-yocto: enable Rust support in kernel configuration
  kernel-yocto: Fix for buildpaths errors when rust is enabled for
    kernel
  kernel-devsrc: copying rust-kernel soucre to $kerneldir/build

 meta/classes-recipe/kernel-yocto.bbclass         | 16 ++++++++++++++++
 .../bindgen-cli/bindgen-cli_0.72.1.bb            |  2 +-
 meta/recipes-devtools/rust/rust_1.90.0.bb        | 12 ++++++++++++
 meta/recipes-kernel/linux/files/rust.cfg         |  9 +++++++++
 meta/recipes-kernel/linux/files/rust.scc         |  1 +
 meta/recipes-kernel/linux/kernel-devsrc.bb       |  4 ++++
 meta/recipes-kernel/linux/linux-yocto.inc        |  9 +++++++++
 meta/recipes-kernel/linux/linux-yocto_6.16.bb    |  3 +++
 8 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/linux/files/rust.cfg
 create mode 100644 meta/recipes-kernel/linux/files/rust.scc

-- 
2.49.0



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-11-06 21:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 13:09 [PATCH RFC v2 0/8] Enable rust support for linux kernel Harish.Sadineni
2025-11-05 13:09 ` [PATCH RFC v2 1/8] bindgen-cli: extend BBCLASSEXTEND to include nativesdk Harish.Sadineni
2025-11-05 13:09 ` [PATCH RFC v2 2/8] linux-yocto: add clang-native,rust-native and bindgen-cli-native to DEPENDS Harish.Sadineni
2025-11-05 13:30   ` Bruce Ashfield
2025-11-05 16:25     ` Randy MacLeod
2025-11-05 13:09 ` [PATCH RFC v2 3/8] rust: install Rust library sources for 'make rustavailable' support Harish.Sadineni
2025-11-06 20:49   ` [OE-core] " Yoann Congal
2025-11-05 13:09 ` [PATCH RFC v2 4/8] rust: stage rustlib sources for linux-yocto make rustavailable support Harish.Sadineni
2025-11-05 13:32   ` Bruce Ashfield
2025-11-05 17:03     ` Randy MacLeod
2025-11-05 13:09 ` [PATCH RFC v2 5/8] kernel-yocto: add rust support via make rustavailable in do_kernel_configme Harish.Sadineni
2025-11-05 13:34   ` Bruce Ashfield
2025-11-06 20:52   ` [OE-core] " Yoann Congal
2025-11-05 13:09 ` [PATCH RFC v2 6/8] linux-yocto: enable Rust support in kernel configuration Harish.Sadineni
2025-11-05 13:34   ` Bruce Ashfield
2025-11-05 20:39   ` [OE-core] " Gyorgy Sarvari
2025-11-06  7:11     ` Harish Sadineni
2025-11-05 13:09 ` [PATCH RFC v2 7/8] kernel-yocto: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
2025-11-06 21:09   ` [OE-core] " Yoann Congal
2025-11-05 13:09 ` [PATCH RFC v2 8/8] kernel-devsrc: copying rust-kernel soucre to $kerneldir/build Harish.Sadineni
2025-11-06 21:29 ` [OE-core] [PATCH RFC v2 0/8] Enable rust support for linux kernel Yoann Congal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox