Merge "hikey/hikey960: support to specify the prebuilt kernel dir out of aosp tree" am: 4dca84db28 am: 54813f6269
Original change: https://android-review.googlesource.com/c/device/linaro/hikey/+/1508145
Change-Id: I2e3b8eed08316fcd7534c680961f597149977eff
diff --git a/hikey-common.mk b/hikey-common.mk
index b156cc3..3df9ba7 100644
--- a/hikey-common.mk
+++ b/hikey-common.mk
@@ -4,8 +4,9 @@
HIKEY_USE_DRM_HWCOMPOSER := false
-TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/hikey/$(TARGET_KERNEL_USE)/Image.gz-dtb
-TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hikey/$(TARGET_KERNEL_USE)/hi6220-hikey.dtb
+LOCAL_KERNEL_HOME ?= device/linaro/hikey-kernel/hikey/$(TARGET_KERNEL_USE)
+TARGET_PREBUILT_KERNEL := $(LOCAL_KERNEL_HOME)/Image.gz-dtb
+TARGET_PREBUILT_DTB := $(LOCAL_KERNEL_HOME)/hi6220-hikey.dtb
PRODUCT_ENFORCE_VINTF_MANIFEST_OVERRIDE := true
diff --git a/hikey.mk b/hikey.mk
index 0a15858..7471955 100644
--- a/hikey.mk
+++ b/hikey.mk
@@ -15,7 +15,7 @@
PRODUCT_BRAND := Android
ifneq ($(HIKEY_USES_GKI),)
-HIKEY_MOD_DIR := device/linaro/hikey-kernel/hikey/$(TARGET_KERNEL_USE)/
+HIKEY_MOD_DIR := $(LOCAL_KERNEL_HOME)
HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
ifneq ($(HIKEY_MODS),)
BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS)
diff --git a/hikey960.mk b/hikey960.mk
index d4e721f..76a5672 100644
--- a/hikey960.mk
+++ b/hikey960.mk
@@ -1,8 +1,9 @@
ifndef TARGET_KERNEL_USE
TARGET_KERNEL_USE=5.4
endif
-TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)/Image.gz-dtb
-TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)/hi3660-hikey960.dtb
+LOCAL_KERNEL_HOME ?= device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)
+TARGET_PREBUILT_KERNEL := $(LOCAL_KERNEL_HOME)/Image.gz-dtb
+TARGET_PREBUILT_DTB := $(LOCAL_KERNEL_HOME)/hi3660-hikey960.dtb
ifeq ($(TARGET_KERNEL_USE), 4.4)
HIKEY_USE_DRM_HWCOMPOSER := false
@@ -45,7 +46,7 @@
PRODUCT_MODEL := AOSP on hikey960
ifneq ($(HIKEY_USES_GKI),)
- HIKEY_MOD_DIR := device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)
+ HIKEY_MOD_DIR := $(LOCAL_KERNEL_HOME)
HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
SDCARDFS_KO := $(wildcard $(HIKEY_MOD_DIR)/sdcardfs*.ko)
CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/cma_heap.ko)