]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-yocto-rust: Move rust kernel dependencies to bbclass
authorHarish Sadineni <Harish.Sadineni@windriver.com>
Tue, 17 Mar 2026 18:07:53 +0000 (11:07 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Mar 2026 10:57:13 +0000 (10:57 +0000)
Move the rust kernel dpendencies from linux-yocto.inc to
kernel-yocto-rust.bbclass.

This centralizes Rust-specific configuration in the dedicated class,
which is intended to be inherited only when Rust kernel support is
enabled (e.g. via KERNEL_FEATURES).

Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/kernel-yocto-rust.bbclass
meta/recipes-kernel/linux/linux-yocto.inc

index 608ccc46096bda232319cb24cf0cb2646888f67c..49f2bfc1ae82f4f2a8f329711bf64dd5c08b433f 100644 (file)
@@ -10,6 +10,8 @@ RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=${TARGET_DBGSRC_DIR} \
 KRUSTFLAGS = " ${RUST_DEBUG_REMAP}"
 EXTRA_OEMAKE:append = " KRUSTFLAGS='${KRUSTFLAGS}'"
 
+RUST_KERNEL_DEPENDS ?= "clang-native rust-native bindgen-cli-native"
+DEPENDS += "${RUST_KERNEL_DEPENDS}"
 RUST_KERNEL_TASK_DEPENDS ?=  "rust-native:do_populate_sysroot clang-native:do_populate_sysroot bindgen-cli-native:do_populate_sysroot"
 do_kernel_configme[depends] += "${RUST_KERNEL_TASK_DEPENDS}"
 
index f47873348a9a5b4a391c7e7027a5c890dff77784..4e230d405aa996fb093e58160d63c4cc92a0b587 100644 (file)
@@ -81,8 +81,6 @@ 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('KERNEL_FEATURES', 'rust', '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)}'