summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2024-10-02 17:39:03 -0500
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-10-10 13:16:20 +0000
commit6f3c1d8f90947408a6587be222fec575a1ca5195 (patch)
tree0eac5522bf09c5e43c7c0c16073102e1f9af84d8
parent7088ce793dd952ecf9482482ebf34922a961a6a0 (diff)
downloadmeta-virtualization-6f3c1d8f90947408a6587be222fec575a1ca5195.tar.gz
linux-yocto_virtualization.inc: If using externalsrc adjust dependency
When using externalsrc, the system will disable a number of tasks such as do_validate_branches, do_unpack and do_patch. The do_kernel_metadata task is configured to run after do_validate_branches do_unpack and before do_patch. Since all of these have been removed, the task will never run. The do_kernel_metadata task is responsible for populating the recipe-sysroot-native/kcfg directory via it's own dependency to yocto-cfg-fragments-native:do_populate_sysroot. Without do_kernel_metadata running, do_kernel_configme will fail to run with errors like: ERROR: linux-xlnx-6.6.40+git-r0 do_kernel_configme: Feature '../recipe-sysroot-native/kcfg/cfg/virtio.scc' not found, this will cause configuration failures. ERROR: linux-xlnx-6.6.40+git-r0 do_kernel_configme: Check the SRC_URI for meta-data repositories or directories that may be missing ERROR: linux-xlnx-6.6.40+git-r0 do_kernel_configme: Set KERNEL_DANGLING_FEATURES_WARN_ONLY to ignore this issue Fix this issue by detecting if we're running with externalsrc, and then adding the task do_kernel_metadata (from the current recipe) as a dependency of do_kernel_configme. To reproduce th original issue: $ . ./oe-initbuild-env $ bitbake linux-yocto -c patch $ cp -r tmp/work-shared/<machine>/kernel-source linux-yocto edit the conf/local.conf adding: DISTRO_FEATURES:append = " virtualization" INHERIT += "externalsrc" EXTERNALSRC:pn-linux-yocto = "${TOPDIR}/linux-yocto" $ rm -rf tmp $ bitbake linux-yocto -c menuconfig Signed-off-by: Mark Hatle <mark.hatle@amd.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-kernel/linux/linux-yocto_virtualization.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-yocto_virtualization.inc b/recipes-kernel/linux/linux-yocto_virtualization.inc
index 9a6554d1..72375730 100644
--- a/recipes-kernel/linux/linux-yocto_virtualization.inc
+++ b/recipes-kernel/linux/linux-yocto_virtualization.inc
@@ -49,6 +49,12 @@ KERNEL_FEATURES:append = " ${KERNEL_CACHE_FEATURES}"
49# features can be enabled via the fragments 49# features can be enabled via the fragments
50do_kernel_metadata[depends] += "${@['', 'yocto-cfg-fragments-native:do_populate_sysroot'][(bb.data.inherits_class('kernel-yocto', d))]}" 50do_kernel_metadata[depends] += "${@['', 'yocto-cfg-fragments-native:do_populate_sysroot'][(bb.data.inherits_class('kernel-yocto', d))]}"
51 51
52# if externalsrc is enabled, do_kernel_metadata dependency on
53# yocto-cfg-fragments-native won't be run to populate
54# recipe-sysroot-native/kcfg because do_patch is not run. Manually add
55# the dependency to do_kernel_configme for this special case
56do_kernel_configme[depends] += "${@['', d.getVar('PN') + ':do_kernel_metadata'][(bb.data.inherits_class('externalsrc', d))]}"
57
52# xen kernel support 58# xen kernel support
53# SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}" 59# SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}"
54KERNEL_FEATURES:append = "${@distro_cond_feature('cfg/xen.scc', 'xen', d )}" 60KERNEL_FEATURES:append = "${@distro_cond_feature('cfg/xen.scc', 'xen', d )}"