meta-virtualization/recipes-kernel/linux/linux-%.bbappend
Bruce Ashfield 47425c21c7 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>
2020-10-06 14:16:24 -04:00

13 lines
544 B
Plaintext

# any kernel recipe with fragment support, that sets LINUX_VERSION to one of the tested
# values, will get the appropriate fragments included in their SRC_URI
LINUX_MAJOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[0]}"
LINUX_MINOR = "${@(d.getVar('LINUX_VERSION') or "x.y").split('.')[1]}"
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)}