summaryrefslogtreecommitdiff
path: root/hikey960.mk
diff options
context:
space:
mode:
Diffstat (limited to 'hikey960.mk')
-rw-r--r--hikey960.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/hikey960.mk b/hikey960.mk
index 7a35a224..1888158d 100644
--- a/hikey960.mk
+++ b/hikey960.mk
@@ -18,6 +18,29 @@ ifndef HIKEY_USES_GKI
endif
endif
+# only kernels after 5.10 support KVM
+ifndef HIKEY960_ENABLE_AVF
+ ifeq ($(TARGET_KERNEL_USE), mainline)
+ HIKEY960_ENABLE_AVF := true
+ else
+ KERNEL_MAJ := $(word 1, $(subst ., ,$(TARGET_KERNEL_USE)))
+ KERNEL_MIN := $(word 2, $(subst ., ,$(TARGET_KERNEL_USE)))
+ KER_GT_5 := $(shell [ $(KERNEL_MAJ) -gt 5 ] && echo true)
+ KER_GE_5_10 := $(shell [ $(KERNEL_MIN) -ge 10 ] && echo true)
+
+ ifeq ($(KER_GT_5), true)
+ HIKEY960_ENABLE_AVF := true
+ else
+ ifeq ($(KERNEL_MAJ), 5)
+ # for kernel after 5.10
+ ifeq ($(KER_GE_5_10),true)
+ HIKEY960_ENABLE_AVF := true
+ endif
+ endif # end for 5.10
+ endif # end for 5.X
+ endif # end for mainline
+endif # end for HIKEY960_ENABLE_AVF
+
include $(LOCAL_PATH)/vendor-package-ver.mk
# Inherit the common device configuration