kernel: simplify the kernel-cfg-fragments-native dependency

The routine calculating the -native depdenency for configuration
fragments had issues with variations in kernel PV definitions.

To avoid making the routine even more complex, this commit switches
to using the same variables that include the correct virtualization
include file. This way, if bitbake has located and included the
file that adds the -native dependency, we know that the variables
will find the correct recipe.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2024-09-24 12:52:33 +00:00
parent 48e559c4f4
commit 54480c55be

View File

@ -33,6 +33,8 @@ def distro_cond_feature(feature_fragment,distro_feature,d):
feat = kernel_cache_feature("",feature_fragment) feat = kernel_cache_feature("",feature_fragment)
return bb.utils.contains('DISTRO_FEATURES', distro_feature, ' ' + feat, ' ', d) return bb.utils.contains('DISTRO_FEATURES', distro_feature, ' ' + feat, ' ', d)
# kept as a reference if we go back to a dynamically calculated
# fragment dependency.
def kernel_meta_ver_depends(d): def kernel_meta_ver_depends(d):
yocto_enabled = bb.data.inherits_class('kernel-yocto', d) yocto_enabled = bb.data.inherits_class('kernel-yocto', d)
if yocto_enabled: if yocto_enabled:
@ -41,7 +43,7 @@ def kernel_meta_ver_depends(d):
else: else:
return "" return ""
KERNEL_CFG_DEPENDS ?= "${@kernel_meta_ver_depends(d)}" KERNEL_CFG_DEPENDS ?= "yocto-cfg-fragments-${LINUX_MAJOR}.${LINUX_MINOR}-native:do_populate_sysroot"
KERNEL_CACHE_FEATURES ?= "${@kernel_cache_feature(d.getVar('SRC_URI'),'cfg/virtio.scc')} \ KERNEL_CACHE_FEATURES ?= "${@kernel_cache_feature(d.getVar('SRC_URI'),'cfg/virtio.scc')} \
${@kernel_cache_feature(d.getVar('SRC_URI'),'cfg/xt-checksum.scc')} \ ${@kernel_cache_feature(d.getVar('SRC_URI'),'cfg/xt-checksum.scc')} \