blob: 09c5a7f14fa38d892e59248290c83a6bc98bf7cc [file] [log] [blame]
Dmitry Shmidt64185fa2017-07-28 15:08:55 -07001ifndef TARGET_KERNEL_USE
John Stultz5d031842020-06-05 06:17:12 +00002TARGET_KERNEL_USE=5.4
Dmitry Shmidt64185fa2017-07-28 15:08:55 -07003endif
Yongqin Liuaa064df2020-11-24 16:07:20 +08004LOCAL_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
Dmitry Shmidt64185fa2017-07-28 15:08:55 -07007
John Stultz75f00f92017-08-01 12:32:05 -07008ifeq ($(TARGET_KERNEL_USE), 4.4)
John Stultz6dc5ce52017-11-01 18:58:15 -07009 HIKEY_USE_DRM_HWCOMPOSER := false
John Stultz75f00f92017-08-01 12:32:05 -070010 HIKEY_USE_LEGACY_TI_BLUETOOTH := true
11else
John Stultz6dc5ce52017-11-01 18:58:15 -070012 ifeq ($(TARGET_KERNEL_USE), 4.9)
13 HIKEY_USE_DRM_HWCOMPOSER := false
14 else
15 HIKEY_USE_DRM_HWCOMPOSER := true
16 endif
John Stultz75f00f92017-08-01 12:32:05 -070017 HIKEY_USE_LEGACY_TI_BLUETOOTH := false
18endif
John Stultzd497f632017-05-30 23:51:33 -070019
John Stultz5d031842020-06-05 06:17:12 +000020ifndef HIKEY_USES_GKI
21 ifeq ($(TARGET_KERNEL_USE), 5.4)
22 HIKEY_USES_GKI := true
23 endif
24endif
25
Dmitry Shmidt5d080802017-04-11 14:20:03 -070026#
Robin Lee81bde6d2020-08-15 22:17:32 +020027# Inherit the common device configuration
Anton Hansson1399b122018-02-08 14:57:45 +000028$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
Dmitry Shmidt5d080802017-04-11 14:20:03 -070029$(call inherit-product, device/linaro/hikey/hikey960/device-hikey960.mk)
30$(call inherit-product, device/linaro/hikey/device-common.mk)
Dmitry Shmidt5d080802017-04-11 14:20:03 -070031
Sandeep Patila2106d12018-07-31 13:56:56 -070032#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
Sahaj Sarup93980e02018-09-11 13:24:20 +000039PRODUCT_PROPERTY_OVERRIDES += ro.opengles.version=196608
40
Dmitry Shmidt5d080802017-04-11 14:20:03 -070041#
42# Overrides
43PRODUCT_NAME := hikey960
44PRODUCT_DEVICE := hikey960
45PRODUCT_BRAND := Android
46PRODUCT_MODEL := AOSP on hikey960
John Stultz3d2ce4c2019-06-24 23:57:29 +000047
John Stultz84925462019-07-12 07:04:13 +000048ifneq ($(HIKEY_USES_GKI),)
Yongqin Liuaa064df2020-11-24 16:07:20 +080049 HIKEY_MOD_DIR := $(LOCAL_KERNEL_HOME)
John Stultz84925462019-07-12 07:04:13 +000050 HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
John Stultz9d126402020-09-15 03:26:56 +000051 SDCARDFS_KO := $(wildcard $(HIKEY_MOD_DIR)/sdcardfs*.ko)
Yongqin Liue05046e2020-11-24 21:00:19 +080052 CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/cma_heap.ko)
John Stultz4ab665e2021-01-08 04:35:02 +000053 SYSTEM_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/system_heap.ko)
Yongqin Liue05046e2020-11-24 21:00:19 +080054 ION_CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/ion_cma_heap*.ko)
John Stultz84925462019-07-12 07:04:13 +000055 ifneq ($(HIKEY_MODS),)
56 BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS)
57 BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
Yongqin Liue05046e2020-11-24 21:00:19 +080058 $(CMA_HEAP_KO) \
John Stultz4ab665e2021-01-08 04:35:02 +000059 $(SYSTEM_HEAP_KO) \
Yongqin Liue05046e2020-11-24 21:00:19 +080060 $(ION_CMA_HEAP_KO) \
61 $(SDCARDFS_KO)
John Stultz84925462019-07-12 07:04:13 +000062 endif
John Stultz3d2ce4c2019-06-24 23:57:29 +000063endif