@@ -463,8 +463,20 @@ do_kernel_configme[depends] += "virtual/cross-binutils:do_populate_sysroot"
do_kernel_configme[depends] += "virtual/cross-cc:do_populate_sysroot"
do_kernel_configme[depends] += "bc-native:do_populate_sysroot bison-native:do_populate_sysroot"
do_kernel_configme[depends] += "kern-tools-native:do_populate_sysroot"
+RUST_KERNEL_TASK_DEPENDS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', ' \
+ rust-native:do_populate_sysroot \
+ clang-native:do_populate_sysroot \
+ bindgen-cli-native:do_populate_sysroot', '', d)}"
+do_kernel_configme[depends] += "${RUST_KERNEL_TASK_DEPENDS}"
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
+
do_kernel_metadata config
# translate the kconfig_mode into something that merge_config.sh
@@ -506,6 +518,10 @@ do_kernel_configme() {
echo "# Global settings from linux recipe" >> ${B}/.config
echo "CONFIG_LOCALVERSION="\"${LINUX_VERSION_EXTENSION}\" >> ${B}/.config
fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'rust-kernel', 'true', 'false', d)}; then
+ oe_runmake -C ${S} O=${B} rustavailable
+ fi
}
addtask kernel_configme before do_configure after do_patch