public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Harish Sadineni <Harish.Sadineni@windriver.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: openembedded-core@lists.openembedded.org,
	Randy.MacLeod@windriver.com, Sundeep.Kokkonda@windriver.com,
	yoann.congal@smile.fr, elmehdi.younes@smile.fr
Subject: Re: [PATCH 00/16] Enable rust support for linux kernel
Date: Mon, 29 Dec 2025 16:21:59 +0530	[thread overview]
Message-ID: <2d51fa16-5dd9-41b8-9acd-c1bfe7a26eb4@windriver.com> (raw)
In-Reply-To: <CADkTA4MoSUEOqqoY08-8NS9TE1NSkbpJaAoYgSNDP0bE+6DJ9g@mail.gmail.com>


On 12/27/2025 8:29 PM, Bruce Ashfield wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Sat, Dec 27, 2025 at 7:33 AM <Harish.Sadineni@windriver.com> wrote:
>> From: Harish Sadineni <Harish.Sadineni@windriver.com>
>>
>> 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 and also provide support to build
>> rust kernel modules in sdk.
>>
>> And this series adds test for Linux Rust sample and also added support for out-of-tree kernel
>> module written in Rust as well as associated test.
> What are the changes in this version compared to the last ?
>
> I didn't get a chance to look at the previous series in detail, but will look
> at this one. Knowing what was done in the different iterations is
> helpful in guiding what I look at.

The previous series was RFC v4, "Enable Rust support for Linux kernel"
(https://lists.openembedded.org/g/openembedded-core/message/226623).

In addition, Yoann Congal posted RFC v2, "Kernel Rust out-of-tree module 
support"
(https://lists.openembedded.org/g/openembedded-core/message/227281), 
which builds on top of RFC v4.

The current patch series is a unified version that combines both efforts.

Compared to the earlier series, the main changes are:

*Kernel configuration fragments have been moved to yocto-kernel-cache.

*The kernel fragments have been removed from SRC_URI and from the files 
directory previously stored under recipes-kernel/linux/files.

*Updated the "[PATCH 11/16] selftest/cases/runtime_test: Add test for 
Linux Rust sample" by appending KERNEL_EXTRA_FEATURES:append = ' 
features/kernel-sample/kernel-rust-sample.scc' instead of adding this 
directly in the linux-yocto recipe.

Thanks,
Harish

>
> Bruce
>
>> Summary of patches:
>>
>> - Patch 01: Extend 'bindgen-cli' to support 'nativesdk', allowing it to be available in the SDK environment.
>> - Patch 02: Add required dependencies ('clang-native', 'rust-native', 'bindgen-cli-native') to the kernel to support Rust binding generation.
>> - Patch 03: Install the Rust standard library source ('library/') into `work-shared` and which will be later copied to
>>             linux-yocto recipe-sysroot-native.
>> - Patch 04: Added 'rust-kernel' to DISTRO_FEATURES_FILTER_NATIVE and DISTRO_FEATURES_FILTER_NATIVESDK, the 'rust-kernel' feature automatically
>>             propagates from target DISTRO_FEATURES to native/nativesdk builds
>> - Patch 05: Stage the Rust sources into `recipe-sysroot-native` for kernel build compatibility, making them visible during native builds.
>> - Patch 06: Update `kernel-yocto.bbclass` to invoke `make rustavailable` during 'do_kernel_configme', ensuring Rust readiness.
>> - Patch 07: Add kernel configuration support for Rust (via 'kernel-rust.scc'), enabling the Rust build options in kernel config.
>> - Patch 08: Fixed buildpaths errors when rust is enabled for kernel by appending --remap-path-prefix to RUST_DEBUG_REMAP
>> - Patch 09: Disabling ccache when rust-kernel is enabled for linux-yocto.
>> - Patch 10: Copy Rust kernel sources into kernel-devsrc build directory which will be required while running 'make prepare' in sdk.
>> - Patch 11: Added oe-selftest case for the Linux Rust sample.
>> - patch 12: Copying include/config/auto.conf in STAGING_KERNEL_BUILDDIR
>> - patch 13: Export artifacts needed for out-of-tree Rust compilation
>> - patch 14: Prepare out-of-tree rust module compilation
>> - patch 15: Added rust-out-of-tree-module recipe in meta-skeleton layer
>> - patch 16: Added rust-out-of-tree selftest
>>
>> Patches have been build-tested successfully on:
>> - qemuarm64
>> - qemux86-64
>>
>> Benchmark test-result for x86-64:
>> +-------------------------------+------------+-----------+-----------+-----------+
>> | DISTRO_FEATURES               |   real     |   user    |    sys    |  FS usage |
>> +-------------------------------+------------+-----------+-----------+-----------+
>> | rust-kernel (enabled)         | 46m1.720s  | 0m28.864s | 0m3.696s  |   58 GB   |
>> | rust-kernel (disabled)        | 30m1.053s  | 0m20.091s | 0m2.748s  |   33 GB   |
>> +-------------------------------+------------+-----------+-----------+-----------+
>>
>> The increased in time & fs is due to kernel rust dependencies in
>> linux-yocto.
>>
>>
>> Harish Sadineni (9):
>>    bindgen-cli: extend BBCLASSEXTEND to include nativesdk
>>    linux-yocto: conditionally add clang/rust/bindgen-cli-native to
>>      DEPENDS
>>    rust: install Rust library sources for 'make rustavailable' support
>>    bitbake.conf: Include "rust-kernel" in native/nativesdk feature
>>      filters
>>    kernel-yocto: 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 source to $kerneldir/build
>>
>> Yoann Congal (7):
>>    kernel-yocto.bbclass: Disable ccache when rust-kernel is enabled
>>    selftest/cases/runtime_test: Add test for Linux Rust sample
>>    kernel.bbclass: Copy include/config/auto.conf in
>>      STAGING_KERNEL_BUILDDIR
>>    kernel.bbclass: Export artifacts needed for out-of-tree Rust
>>      compilation
>>    module.bbclass: Prepare out-of-tree rust module compilation
>>    meta-skeleton: Add rust-out-of-tree-module recipe
>>    runtime_test: Add rust-out-of-tree selftest
>>
>>   .../rust-out-of-tree-module_git.bb            | 18 ++++++++++
>>   meta/classes-recipe/kernel-yocto.bbclass      | 28 +++++++++++++++
>>   meta/classes-recipe/kernel.bbclass            | 19 ++++++++++
>>   meta/classes-recipe/module.bbclass            |  8 +++++
>>   meta/conf/bitbake.conf                        |  4 +--
>>   meta/lib/oeqa/selftest/cases/runtime_test.py  | 35 +++++++++++++++++++
>>   .../bindgen-cli/bindgen-cli_0.72.1.bb         |  2 +-
>>   meta/recipes-devtools/rust/rust_1.91.1.bb     | 17 +++++++++
>>   meta/recipes-kernel/linux/kernel-devsrc.bb    |  4 +++
>>   meta/recipes-kernel/linux/linux-yocto.inc     |  2 ++
>>   meta/recipes-kernel/linux/linux-yocto_6.16.bb |  1 +
>>   meta/recipes-kernel/linux/linux-yocto_6.18.bb |  1 +
>>   12 files changed, 136 insertions(+), 3 deletions(-)
>>   create mode 100644 meta-skeleton/recipes-kernel/rust-out-of-tree-module/rust-out-of-tree-module_git.bb
>>
>> --
>> 2.49.0
>>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II


      reply	other threads:[~2025-12-29 10:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-27 11:32 [PATCH 00/16] Enable rust support for linux kernel Harish.Sadineni
2025-12-27 11:32 ` [PATCH 01/16] bindgen-cli: extend BBCLASSEXTEND to include nativesdk Harish.Sadineni
2025-12-27 11:32 ` [PATCH 02/16] linux-yocto: conditionally add clang/rust/bindgen-cli-native to DEPENDS Harish.Sadineni
2025-12-27 11:32 ` [PATCH 03/16] rust: install Rust library sources for 'make rustavailable' support Harish.Sadineni
2025-12-27 11:32 ` [PATCH 04/16] bitbake.conf: Include "rust-kernel" in native/nativesdk feature filters Harish.Sadineni
2025-12-27 11:32 ` [PATCH 05/16] kernel-yocto: stage rustlib sources for linux-yocto 'make rustavailable' support Harish.Sadineni
2025-12-27 15:03   ` Bruce Ashfield
2025-12-27 11:32 ` [PATCH 06/16] kernel-yocto: add rust support via "make rustavailable" in do_kernel_configme Harish.Sadineni
2025-12-27 15:05   ` Bruce Ashfield
2025-12-29 10:59     ` Harish Sadineni
2025-12-27 11:32 ` [PATCH 07/16] linux-yocto: enable Rust support in kernel configuration Harish.Sadineni
2025-12-27 11:32 ` [PATCH 08/16] kernel-yocto: Fix for buildpaths errors when rust is enabled for kernel Harish.Sadineni
2025-12-27 11:32 ` [PATCH 09/16] kernel-yocto.bbclass: Disable ccache when rust-kernel is enabled Harish.Sadineni
2025-12-27 11:32 ` [PATCH 10/16] kernel-devsrc: copying rust-kernel source to $kerneldir/build Harish.Sadineni
2025-12-27 15:09   ` Bruce Ashfield
2025-12-29 11:25     ` Harish Sadineni
2025-12-29 12:49       ` Bruce Ashfield
2025-12-27 11:32 ` [PATCH 11/16] selftest/cases/runtime_test: Add test for Linux Rust sample Harish.Sadineni
2025-12-27 11:32 ` [PATCH 12/16] kernel.bbclass: Copy include/config/auto.conf in STAGING_KERNEL_BUILDDIR Harish.Sadineni
2025-12-27 11:32 ` [PATCH 13/16] kernel.bbclass: Export artifacts needed for out-of-tree Rust compilation Harish.Sadineni
2025-12-27 11:32 ` [PATCH 14/16] module.bbclass: Prepare out-of-tree rust module compilation Harish.Sadineni
2025-12-27 11:32 ` [PATCH 15/16] meta-skeleton: Add rust-out-of-tree-module recipe Harish.Sadineni
2025-12-27 11:32 ` [PATCH 16/16] runtime_test: Add rust-out-of-tree selftest Harish.Sadineni
2025-12-27 14:59 ` [PATCH 00/16] Enable rust support for linux kernel Bruce Ashfield
2025-12-29 10:51   ` Harish Sadineni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d51fa16-5dd9-41b8-9acd-c1bfe7a26eb4@windriver.com \
    --to=harish.sadineni@windriver.com \
    --cc=Randy.MacLeod@windriver.com \
    --cc=Sundeep.Kokkonda@windriver.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=elmehdi.younes@smile.fr \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=yoann.congal@smile.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox