| Message ID | 20251230141540.1974380-3-Harish.Sadineni@windriver.com |
|---|---|
| State | Changes Requested |
| Headers | show |
| Series | Enable rust support for linux kernel | expand |
On Wed, Dec 31, 2025 at 12:16 AM Sadineni, Harish via lists.openembedded.org <Harish.Sadineni=windriver.com@lists.openembedded.org> wrote: > > From: Harish Sadineni <Harish.Sadineni@windriver.com> > > Conditionally add 'clang-native', 'rust-native' and 'bindgen-cli-native' to 'DEPENDS' > when rust-kernel distro feature is enabled to support Rust-based kernel modules or > features that require generating Rust FFI bindings using bindgen during the kernel > build process. > > Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > meta/recipes-kernel/linux/linux-yocto.inc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc > index 4d0a726bb6..41b12b6f14 100644 > --- a/meta/recipes-kernel/linux/linux-yocto.inc > +++ b/meta/recipes-kernel/linux/linux-yocto.inc > @@ -81,6 +81,8 @@ KERNEL_DEBUG ?= "" > DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64", "powerpc" ], "elfutils-native", "", d)}' > DEPENDS += "openssl-native util-linux-native" > DEPENDS += "gmp-native libmpc-native" > +RUST_KERNEL_DEPENDS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', 'clang-native rust-native bindgen-cli-native', '', d)}" > +DEPENDS += "${RUST_KERNEL_DEPENDS}" > > # Some options depend on CONFIG_PAHOLE_VERSION, so need to make pahole-native available before do_kernel_configme > do_kernel_configme[depends] += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native:do_populate_sysroot", "", d)}' > -- > 2.49.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#228668): https://lists.openembedded.org/g/openembedded-core/message/228668 > Mute This Topic: https://lists.openembedded.org/mt/116997863/3619028 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alistair23@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc index 4d0a726bb6..41b12b6f14 100644 --- a/meta/recipes-kernel/linux/linux-yocto.inc +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -81,6 +81,8 @@ KERNEL_DEBUG ?= "" DEPENDS += '${@bb.utils.contains_any("ARCH", [ "x86", "arm64", "powerpc" ], "elfutils-native", "", d)}' DEPENDS += "openssl-native util-linux-native" DEPENDS += "gmp-native libmpc-native" +RUST_KERNEL_DEPENDS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', 'clang-native rust-native bindgen-cli-native', '', d)}" +DEPENDS += "${RUST_KERNEL_DEPENDS}" # Some options depend on CONFIG_PAHOLE_VERSION, so need to make pahole-native available before do_kernel_configme do_kernel_configme[depends] += '${@bb.utils.contains("KERNEL_DEBUG", "True", "pahole-native:do_populate_sysroot", "", d)}'