diff options
| -rw-r--r-- | recipes-kernel/linux/linux-yocto_virtualization.inc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/recipes-kernel/linux/linux-yocto_virtualization.inc b/recipes-kernel/linux/linux-yocto_virtualization.inc index 321dda20..4c6dc42f 100644 --- a/recipes-kernel/linux/linux-yocto_virtualization.inc +++ b/recipes-kernel/linux/linux-yocto_virtualization.inc | |||
| @@ -15,11 +15,30 @@ KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains('DISTRO_FEATURES', 'kvm', 'kvm', | |||
| 15 | # aufs kernel support required for xen-image-minimal | 15 | # aufs kernel support required for xen-image-minimal |
| 16 | KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}" | 16 | KERNEL_FEATURES_append += "${@bb.utils.contains('DISTRO_FEATURES', 'aufs', ' features/aufs/aufs-enable.scc', '', d)}" |
| 17 | 17 | ||
| 18 | KERNEL_FEATURES_append = " cfg/virtio.scc" | 18 | # if the kernel-yocto meta-data routine automatically starts to add the |
| 19 | # recipe-sysroot-native, we can do away with this conditional, since all | ||
| 20 | # features will be found at the same relative offset from a search | ||
| 21 | # directory | ||
| 22 | def kernel_cache_cond_feature(src_uri,feature): | ||
| 23 | import re | ||
| 24 | kernel_cache = re.search("kernel-cache", src_uri ) | ||
| 25 | if kernel_cache: | ||
| 26 | return feature | ||
| 27 | |||
| 28 | return "../recipe-sysroot-native/kcfg/" + feature | ||
| 29 | |||
| 30 | KERNEL_CACHE_FEATURES ?= "${@kernel_cache_cond_feature(d.getVar('SRC_URI'),'cfg/virtio.scc')}" | ||
| 31 | KERNEL_FEATURES_append = "${KERNEL_CACHE_FEATURES}" | ||
| 32 | |||
| 33 | # if kernel-yocto has been inherited (how we can check for configuration | ||
| 34 | # fragment merging suport at the moment, then add a dependency on the | ||
| 35 | # configuration fragment repository. This allows us to be sure that our | ||
| 36 | # features can be enabled via the fragments | ||
| 37 | do_kernel_metadata[depends] += "${@['', 'yocto-cfg-fragments-native:do_populate_sysroot'][(bb.data.inherits_class('kernel-yocto', d))]}" | ||
| 19 | 38 | ||
| 20 | # xen kernel support | 39 | # xen kernel support |
| 21 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}" | 40 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' file://xen.scc', '', d)}" |
| 22 | 41 | ||
| 23 | # k8s and k3s kernel support | 42 | # k8s and k3s kernel support |
| 24 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'k8s', ' file://kubernetes.scc', '', d)}" | 43 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'k8s', ' file://kubernetes.scc', '', d)}" |
| 25 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'k3s', ' file://kubernetes.scc', '', d)}" \ No newline at end of file | 44 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'k3s', ' file://kubernetes.scc', '', d)}" |
