config: make kernel meta data include more specific

Rather than only matching on the major/minor version, we should also
check that the SRC_URI contains a "type=kmeta", to indicate that a
kernel-meta data repository is available.

This allows fragment enabled kernels, that don't want to use the
main kernel meta data repository to not throw an error (when their
version matches one of the reference kernels).

This can potentially mask runtime issues (since kernel configuration
options may not be present in the final kernel), but it makes the
layer more usable, so we take the tradeoff.

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2020-10-06 14:16:24 -04:00
parent d898bd1ca5
commit 47425c21c7

View File

@ -4,7 +4,9 @@
LINUX_MAJOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[0]}" LINUX_MAJOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[0]}"
LINUX_MINOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[1]}" LINUX_MINOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[1]}"
include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-yocto_${LINUX_MAJOR}.${LINUX_MINOR}_virtualization.inc', '', d)} KERNEL_META_TYPE ?= "${@bb.utils.contains('SRC_URI', 'type=kmeta', 'yocto', '', d)}"
include ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-${KERNEL_META_TYPE}_${LINUX_MAJOR}.${LINUX_MINOR}_virtualization.inc', '', d)}