On Sat, Dec 27, 2025 at 7:33 AM <[email protected]> wrote:
>
> From: Harish Sadineni <[email protected]>
>
> When building the Linux kernel with Rust support enabled (e.g., via `make 
> rustavailable`),
> the build system expects the Rust standard library sources to be available 
> under:
> ${STAGING_DIR_NATIVE}/usr/lib/rustlib/src/rust
>
> Signed-off-by: Harish Sadineni <[email protected]>
> ---
>  meta/classes-recipe/kernel-yocto.bbclass | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/meta/classes-recipe/kernel-yocto.bbclass 
> b/meta/classes-recipe/kernel-yocto.bbclass
> index e53bf15194..2584cadf0d 100644
> --- a/meta/classes-recipe/kernel-yocto.bbclass
> +++ b/meta/classes-recipe/kernel-yocto.bbclass
> @@ -465,6 +465,13 @@ do_kernel_configme[depends] += 
> "bc-native:do_populate_sysroot bison-native:do_po
>  do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot"
>  do_kernel_configme[dirs] += "${S} ${B}"
>  do_kernel_configme() {
> +       if ${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', 'true', 
> 'false', d)}; then
> +               if [ ! -d ${STAGING_LIBDIR_NATIVE}/rustlib/src/rust ]; then
> +                       mkdir -p ${STAGING_LIBDIR_NATIVE}/rustlib/src/
> +                       cp -r ${TMPDIR}/work-shared/rust 
> ${STAGING_LIBDIR_NATIVE}/rustlib/src/.
> +               fi
> +       fi

There should be a comment both here, and in the commit message
about why this is done in the configme task.  i.e. is it related to
configuration ?

Bruce

> +
>         do_kernel_metadata config
>
>         # translate the kconfig_mode into something that merge_config.sh
> --
> 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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#228573): 
https://lists.openembedded.org/g/openembedded-core/message/228573
Mute This Topic: https://lists.openembedded.org/mt/116959151/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to