1ifndef TARGET_KERNEL_USE
2TARGET_KERNEL_USE=5.4
3endif
4TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)/Image.gz-dtb
5TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)/hi3660-hikey960.dtb
6
7ifeq ($(TARGET_KERNEL_USE), 4.4)
8  HIKEY_USE_DRM_HWCOMPOSER := false
9  HIKEY_USE_LEGACY_TI_BLUETOOTH := true
10else
11  ifeq ($(TARGET_KERNEL_USE), 4.9)
12    HIKEY_USE_DRM_HWCOMPOSER := false
13  else
14    HIKEY_USE_DRM_HWCOMPOSER := true
15  endif
16  HIKEY_USE_LEGACY_TI_BLUETOOTH := false
17endif
18
19ifndef HIKEY_USES_GKI
20  ifeq ($(TARGET_KERNEL_USE), 5.4)
21    HIKEY_USES_GKI := true
22  endif
23endif
24
25#
26# Inherit the full_base and device configurations
27$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
28$(call inherit-product, device/linaro/hikey/hikey960/device-hikey960.mk)
29$(call inherit-product, device/linaro/hikey/device-common.mk)
30$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
31
32#setup dm-verity configs
33PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/soc/ff3b0000.ufs/by-name/system
34PRODUCT_VENDOR_VERITY_PARTITION := /dev/block/platform/soc/ff3b0000.ufs/by-name/vendor
35$(call inherit-product, build/target/product/verity.mk)
36PRODUCT_SUPPORTS_BOOT_SIGNER := false
37PRODUCT_SUPPORTS_VERITY_FEC := false
38
39PRODUCT_PROPERTY_OVERRIDES += ro.opengles.version=196608
40
41#
42# Overrides
43PRODUCT_NAME := hikey960
44PRODUCT_DEVICE := hikey960
45PRODUCT_BRAND := Android
46PRODUCT_MODEL := AOSP on hikey960
47
48ifneq ($(HIKEY_USES_GKI),)
49  HIKEY_MOD_DIR := device/linaro/hikey-kernel/hikey960/$(TARGET_KERNEL_USE)
50  HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
51  ifneq ($(HIKEY_MODS),)
52    BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS)
53    BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
54	$(HIKEY_MOD_DIR)/ion_cma_heap.ko \
55	$(HIKEY_MOD_DIR)/sdcardfs.ko
56  endif
57endif
58