1ifndef TARGET_KERNEL_USE
2TARGET_KERNEL_USE=5.4
3endif
4LOCAL_KERNEL_HOME ?= device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)
5TARGET_PREBUILT_KERNEL := $(LOCAL_KERNEL_HOME)/Image.gz-dtb
6TARGET_PREBUILT_DTB := $(LOCAL_KERNEL_HOME)/hi3660-hikey960.dtb
7
8ifeq ($(TARGET_KERNEL_USE), 4.4)
9  HIKEY_USE_DRM_HWCOMPOSER := false
10  HIKEY_USE_LEGACY_TI_BLUETOOTH := true
11else
12  ifeq ($(TARGET_KERNEL_USE), 4.9)
13    HIKEY_USE_DRM_HWCOMPOSER := false
14  else
15    HIKEY_USE_DRM_HWCOMPOSER := true
16  endif
17  HIKEY_USE_LEGACY_TI_BLUETOOTH := false
18endif
19
20ifndef HIKEY_USES_GKI
21  ifeq ($(TARGET_KERNEL_USE), 5.4)
22    HIKEY_USES_GKI := true
23  endif
24endif
25
26#
27# Inherit the common device configuration
28$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
29$(call inherit-product, device/linaro/hikey/hikey960/device-hikey960.mk)
30$(call inherit-product, device/linaro/hikey/device-common.mk)
31
32PRODUCT_PROPERTY_OVERRIDES += ro.opengles.version=196608
33
34#
35# Overrides
36PRODUCT_NAME := hikey960
37PRODUCT_DEVICE := hikey960
38PRODUCT_BRAND := Android
39PRODUCT_MODEL := AOSP on hikey960
40
41ifneq ($(HIKEY_USES_GKI),)
42  HIKEY_MOD_DIR := $(LOCAL_KERNEL_HOME)
43  HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
44  SDCARDFS_KO := $(wildcard $(HIKEY_MOD_DIR)/sdcardfs*.ko)
45  CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/cma_heap.ko)
46  DEFERRED_FREE_KO := $(wildcard $(HIKEY_MOD_DIR)/deferred-free-helper.ko)
47  PAGE_POOL_KO := $(wildcard $(HIKEY_MOD_DIR)/page_pool.ko)
48  SYSTEM_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/system_heap.ko)
49  ION_CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/ion_cma_heap*.ko)
50  ifneq ($(HIKEY_MODS),)
51    BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS)
52    BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
53        $(CMA_HEAP_KO) \
54        $(SYSTEM_HEAP_KO) \
55        $(DEFERRED_FREE_KO) \
56        $(PAGE_POOL_KO) \
57        $(ION_CMA_HEAP_KO) \
58        $(SDCARDFS_KO)
59  endif
60endif
61