diff --git a/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-common.scc b/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-common.scc index beee091b..f359d8c2 100644 --- a/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-common.scc +++ b/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/xen-common.scc @@ -1,5 +1,3 @@ define KFEATURE_DESCRIPTION "Common XEN (Host and Guest) configs and patches on autonomy systems" kconf non-hardware xen-common.cfg - -patch 0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch diff --git a/meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch b/meta-arm-autonomy/recipes-kernel/linux/files/0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch similarity index 100% rename from meta-arm-autonomy/recipes-kernel/linux/arm-autonomy-kmeta/features/arm-autonomy/0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch rename to meta-arm-autonomy/recipes-kernel/linux/files/0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch diff --git a/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc b/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc index c5cb66d2..89c9fce1 100644 --- a/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc +++ b/meta-arm-autonomy/recipes-kernel/linux/linux-arm-autonomy.inc @@ -33,3 +33,13 @@ KMACHINE_arm64-autonomy-guest = "arm64-autonomy-guest" # Add Minimal Kernel Configs for Docker runtime KERNEL_FEATURES += "${@bb.utils.contains('DISTRO_FEATURES', \ 'docker', 'features/arm-autonomy/docker-minimal.scc', '', d)}" + +python() { + from distutils.version import LooseVersion + + kernelVersion = d.getVar('LINUX_VERSION') + + if kernelVersion and LooseVersion(kernelVersion) < '5.10': + if oe.utils.any_distro_features(d, "arm-autonomy-host arm-autonomy-guest"): + d.appendVar('SRC_URI', ' file://files/0001-xen-arm-do-not-setup-the-runstate-info-page-if-kpti-.patch' ) +}