]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
kernel-devsrc: copying rust-kernel source to $kerneldir/build
authorHarish Sadineni <Harish.Sadineni@windriver.com>
Fri, 13 Mar 2026 15:59:14 +0000 (08:59 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Mar 2026 10:16:08 +0000 (10:16 +0000)
commita38b7a1be656d3f353a8f09a27eb70e549e1df79
tree9887906d0b4d7338080fa62e7cd1b3a231a9ed11
parentd80d006ae85172eb5125b7e1b44d4dee48615c92
kernel-devsrc: copying rust-kernel source to $kerneldir/build

When CONFIG_RUST is enabled, running 'make prepare' in the  target & SDK
fails because the Rust kernel infrastructure is incomplete in the staged
kernel sources.

The Rust build system requires a wider set of interdependent sources
during make prepare, including bindgen inputs, C helper sources,
generated headers, and other support files. These are all located under
the kernel rust/ directory.

To ensure make prepare succeeds and to support building Rust-based
kernel modules from the  target & SDK, copy the full rust/ directory
(of size 2.5MB) into $kerneldir/build when the rust-kernel distro feature
is enabled.

Additionally, when Rust support is enabled, 'make prepare' generates
.rmeta files (crate metadata in a custom binary format) and shared
objects (.so) that are required for compiling Rust kernel modules.

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/linux/kernel-devsrc.bb