kernel-yocto-rust: skip recipe for riscv64 when Rust support is enabled
PATCH 1/1 kernel-yocto-rust: skip recipe for riscv64 when Rust support is enabled
From: Harish Sadineni <[email protected]>
Kernel Rust support on riscv64 requires building the kernel with Clang. Since Wrynose does not provide Clang toolchian support for kernel builds, skip the recipe when TARGET_ARCH is riscv64.
This avoids attempting an unsupported kernel Rust build and provides a clear parse-time error explaining the limitation.
--- meta/classes-recipe/kernel-yocto-rust.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)
meta/classes-recipe/kernel-yocto-rust.bbclass +9 -0
@@ -25,3 +25,12 @@ do_kernel_configme:append () { # More details in: https://lists.openembedded.org/g/openembedded-core/message/229336 # Disable ccache for kernel build if kernel rust support is enabled to workaround this. CCACHE_DISABLE ?= "1" + +python () { + if d.getVar('TARGET_ARCH') == 'riscv64' : + raise bb.parse.SkipRecipe( + "Rust support in the kernel on riscv64 requires kernel to build with clang, " + "Wrynose doesn't have clang toolchain support for kernel. See " + "https://docs.kernel.org/rust/arch-support.html for details." + ) +}
Signature · 1 line
2.53.0
Quoted 5 lines · Harish via lists.openembedded.org Sadineni
From: Harish Sadineni <[email protected]>
Kernel Rust support on riscv64 requires building the kernel with Clang. Since Wrynose does not provide Clang toolchian support for kernel builds, skip the recipe when
TARGET_ARCHis riscv64.
Hello,
OE-Core/wrynose indeed does not but meta-clang seem to do that:
https://github.com/kraj/meta-clang/blob/wrynose/conf/nonclangable.conf#L369
Wouldn't this patch needlessly prevent user from using meta-clang to get a RISCV rust-enabled kernel?
I wonder if we need a patch more like master's:2b228490b7e (kernel-yocto-rust: Add clang toolchain check for riscv64, 2026-08-05)
What do you think?
Quoted 16 lines
This avoids attempting an unsupported kernel Rust build and provides a clear parse-time error explaining the limitation.
Signed-off-by Harish Sadineni <[email protected]>--- meta/classes-recipe/kernel-yocto-rust.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)meta/classes-recipe/kernel-yocto-rust.bbclass +0
-0@@ -25,3 +25,12 @@ do_kernel_configme:append () { # More details in: https://lists.openembedded.org/g/openembedded-core/message/229336 # Disable ccache for kernel build if kernel rust support is enabled to workaround this.
meta/classes-recipe/kernel-yocto-rust.bbclass do_kernel_configme:append () { · line 36
Quoted 10 lines
meta/classes-recipe/kernel-yocto-rust.bbclass +9
-0CCACHE_DISABLE ?= "1" + +python () { + if d.getVar('TARGET_ARCH') == 'riscv64' : + raise bb.parse.SkipRecipe( + "Rust support in the kernel on riscv64 requires kernel to build with clang, " + "Wrynose doesn't have clang toolchain support for kernel. See " + "https://docs.kernel.org/rust/arch-support.html for details." + ) +}
Regards,
Signature · 2 lines
Yoann Congal Smile ECS
Quoted 14 lines · Yoann Congal
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.Quoted 5 lines · Harish via lists.openembedded.org Sadineni
From: Harish Sadineni <[email protected]>
Kernel Rust support on riscv64 requires building the kernel with Clang. Since Wrynose does not provide Clang toolchian support for kernel builds, skip the recipe when
TARGET_ARCHis riscv64.Hello,
OE-Core/wrynose indeed does not but meta-clang seem to do that:
https://github.com/kraj/meta-clang/blob/wrynose/conf/nonclangable.conf#L369
Quoted 7 lines
Wouldn't this patch needlessly prevent user from using meta-clang to get a RISCV rust-enabled kernel?
I wonder if we need a patch more like master's:
2b228490b7e(kernel-yocto-rust: Add clang toolchain check for riscv64, 2026-08-05)What do you think?
Hi Yoann,
I understood what you meant, If someone uses 'linux-yocto_%.bbappend' to build the kernel with the clang toolchain [1], this patch would prevent them from using rust in the kernel. Is my understanding correct?
If so, I'll implement the same clang toolchain check as 'kernel-yocto-rust: Add clang toolchain check for riscv64' for wrynose, and just adjust the error message accordingly.
[1]https://github.com/kraj/meta-clang/blob/wrynose/README.md#kernel-build-with-clang
<https://github.com/kraj/meta-clang/blob/wrynose/README.md#kernel-build-with-clang>Thanks,
harish
Quoted 29 lines
Quoted 15 lines
This avoids attempting an unsupported kernel Rust build and provides a clear parse-time error explaining the limitation.
Signed-off-by Harish Sadineni <[email protected]>--- meta/classes-recipe/kernel-yocto-rust.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)meta/classes-recipe/kernel-yocto-rust.bbclass +0
-0@@ -25,3 +25,12 @@ do_kernel_configme:append () { # More details in: https://lists.openembedded.org/g/openembedded-core/message/229336 # Disable ccache for kernel build if kernel rust support is enabled to workaround this.meta/classes-recipe/kernel-yocto-rust.bbclass do_kernel_configme:append () { · line 36
Quoted 10 lines
meta/classes-recipe/kernel-yocto-rust.bbclass +9
-0CCACHE_DISABLE ?= "1" + +python () { + if d.getVar('TARGET_ARCH') == 'riscv64' : + raise bb.parse.SkipRecipe( + "Rust support in the kernel on riscv64 requires kernel to build with clang, " + "Wrynose doesn't have clang toolchain support for kernel. See " + "https://docs.kernel.org/rust/arch-support.html for details." + ) +}Regards,
--
Yoann Congal
Smile ECS
Quoted 22 lines · Harish Sadineni
Quoted 20 lines · Yoann Congal
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.Quoted 5 lines · Harish via lists.openembedded.org Sadineni
From: Harish Sadineni <[email protected]>
Kernel Rust support on riscv64 requires building the kernel with Clang. Since Wrynose does not provide Clang toolchian support for kernel builds, skip the recipe when
TARGET_ARCHis riscv64.Hello,
OE-Core/wrynose indeed does not but meta-clang seem to do that:
https://github.com/kraj/meta-clang/blob/wrynose/conf/nonclangable.conf#L369Wouldn't this patch needlessly prevent user from using meta-clang to get a RISCV rust-enabled kernel?
I wonder if we need a patch more like master's:
2b228490b7e(kernel-yocto-rust: Add clang toolchain check for riscv64, 2026-08-05)
Quoted 7 lines
Quoted 1 line
What do you think?
Hi Yoann,
I understood what you meant, If someone uses 'linux-yocto_%.bbappend' to build the kernel with the clang toolchain [1],
this patch would prevent them from using rust in the kernel. Is my understanding correct?
Yes, we don't know how downstream users derive our recipe, we have to try to not break their use-case. In this case, it is even documented! Thanks for the link!
Quoted 3 lines
If so, I'll implement the same clang toolchain check as 'kernel-yocto-rust: Add clang toolchain check for riscv64' for wrynose, and just adjust the error message accordingly.
Yes, I think e should do that.
Thanks!
Quoted 34 lines
[1]https://github.com/kraj/meta-clang/blob/wrynose/README.md#kernel-build-with-clang
<https://github.com/kraj/meta-clang/blob/wrynose/README.md#kernel-build-with-clang>Thanks,
harishQuoted 29 lines
Quoted 15 lines
This avoids attempting an unsupported kernel Rust build and provides a clear parse-time error explaining the limitation.
Signed-off-by Harish Sadineni <[email protected]>--- meta/classes-recipe/kernel-yocto-rust.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+)meta/classes-recipe/kernel-yocto-rust.bbclass +0
-0@@ -25,3 +25,12 @@ do_kernel_configme:append () { # More details in: https://lists.openembedded.org/g/openembedded-core/message/229336 # Disable ccache for kernel build if kernel rust support is enabled to workaround this.meta/classes-recipe/kernel-yocto-rust.bbclass do_kernel_configme:append () { · line 36
Quoted 10 lines
meta/classes-recipe/kernel-yocto-rust.bbclass +9
-0CCACHE_DISABLE ?= "1" + +python () { + if d.getVar('TARGET_ARCH') == 'riscv64' : + raise bb.parse.SkipRecipe( + "Rust support in the kernel on riscv64 requires kernel to build with clang, " + "Wrynose doesn't have clang toolchain support for kernel. See " + "https://docs.kernel.org/rust/arch-support.html for details." + ) +}Regards,
--
Yoann Congal
Smile ECS
Signature · 2 lines
Yoann Congal Smile ECS