On 2/12/2026 4:55 PM, Yoann Congal 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 Wed Feb 11, 2026 at 5:19 PM CET, Harish Sadineni wrote:
On 1/29/2026 10:09 PM, Sadineni, Harish via lists.openembedded.org wrote:
From: Yoann Congal <[email protected]>
Publish artifacts from kernel compilation to allow out-of-tree Rust
compilation:
* scripts/target.json: target definition: architecture, ABI, compiler
options, ...
* rust/: the crates compiled by the kernel available to
out-of-tree-modules
Hi Yoann,
I am dropping this patch “kernel.bbclass: Export artifacts needed for
out-of-tree Rust compilation” from my v6 patch series.
Without this patch, target.json and the rust/ directory were already
getting published for x86_64. On arm64, target.json will not be created,
yet the module is still generated and works fine.
When building rust-out-f-tree-module for arm64 with this patch applied,
it emits a warning that Out-of-tree rust modules build will fail due to
a missing target.json in kernel. However, in practice, the build
completes successfully.
I have tested without this patch on both arm64 and x86_64, both tests
were successful.
So, this patch does not appear to be necessary. Are you OK with dropping
this patch?
Yes, as long as it builds without warnings and test succesfully, I'm fine with
it.
I have pushed the updated changes to the below oe-contrib branch:
https://git.openembedded.org/openembedded-core-contrib/log/?h=deepesh/rust-in-kernel-v6
Additionally, I have extended the ccache disabling to make-mod-scripts
(as part of "kernel: Disable ccache when kernel rust support is enabled"
patch) and updated "meta-skeleton: Add rust-out-of-tree-module recipe"
to align with the new changes.
Shouldn't the KERNEL_RUST_SUPPORT check in
rust-out-of-tree-module_git.bb be moved to the module-rust class?
Yes, that should be doable. Moving the 'KERNEL_RUST_SUPPORT' check to
the 'module-rust' class makes sense to centralize the logic.
I'll update that change.
Generally, If you think that you rewrote some patches, I'm OK with you
taking authorship (leaving me as Co-developed-by). That should allow you
to edit patches more freely.
Thanks. I’ll take authorship for the rewritten patches and add you as
Co-developed-by.
Thanks,
Harish
Regards,
Thanks,
Harish
Signed-off-by: Yoann Congal <[email protected]>
Signed-off-by: Harish Sadineni <[email protected]>
---
meta/classes-recipe/kernel.bbclass | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/meta/classes-recipe/kernel.bbclass
b/meta/classes-recipe/kernel.bbclass
index 30a10b0801..dfb8604a68 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -632,6 +632,24 @@ do_shared_workdir () {
cp -r scripts/gcc-plugins ${kerneldir}/scripts
fi
+ if ${@bb.utils.contains("DISTRO_FEATURES", "rust-kernel", "true", "false",
d)}; then
+ # Copy target.json file needed for out-of-tree rust modules
+ if [ -e scripts/target.json ]; then
+ bbnote "Copying scripts/target.json"
+ mkdir -p ${kerneldir}/scripts
+ cp scripts/target.json ${kerneldir}/scripts
+ else
+ bbwarn "scripts/target.json not found in compiled kernel.
Out-of-tree rust modules will fail to build."
+ fi
+
+ # Copy rust/ needed by out-of-tree module (firstly for the core
rust crate)
+ if [ -e rust/ ]; then
+ bbnote "Copying rust/"
+ cp -r rust ${kerneldir}/
+ else
+ bbwarn "rust/ not found in compiled kernel. Out-of-tree rust
modules will fail to build."
+ fi
+ fi
}
# We don't need to stage anything, not the modules/firmware since those
would clash with linux-firmware
--
Yoann Congal
Smile ECS
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#231028):
https://lists.openembedded.org/g/openembedded-core/message/231028
Mute This Topic: https://lists.openembedded.org/mt/117759084/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-