blob: d04f15475576d289e53ba06c2945d3c5ea5f9b7d [file] [log] [blame]
Dmitry Shmidt64185fa2017-07-28 15:08:55 -07001ifndef TARGET_KERNEL_USE
Yongqin Liu7788ffd2023-03-03 22:11:00 +08002TARGET_KERNEL_USE=5.10
Dmitry Shmidt64185fa2017-07-28 15:08:55 -07003endif
Amit Pundire0b34ce2023-10-19 18:29:28 +05304LOCAL_KERNEL_HOME ?= device/linaro/hikey960-kernel/$(TARGET_KERNEL_USE)
Yongqin Liuaa064df2020-11-24 16:07:20 +08005TARGET_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 Stultz5d031842020-06-05 06:17:12 +00008ifndef HIKEY_USES_GKI
Yongqin Liu7999a182023-03-14 17:25:17 +08009 ## Please check the following link for the android-mainline
10 ## kernel build instructions:
11 ## https://www.96boards.org/documentation/consumer/hikey/hikey960/build/android-mainline.md.html
Yongqin Liu7788ffd2023-03-03 22:11:00 +080012 ifeq ($(TARGET_KERNEL_USE), mainline)
John Stultz5d031842020-06-05 06:17:12 +000013 HIKEY_USES_GKI := true
Yongqin Liuca30a6e2023-01-03 17:28:09 +080014 else
Yongqin Liu7788ffd2023-03-03 22:11:00 +080015 KERNEL_MAJ := $(word 1, $(subst ., ,$(TARGET_KERNEL_USE)))
16 # kernel since 5.X should support GKI
17 # only 4.X kernels do not support GKI
18 ifneq ($(KERNEL_MAJ), 4)
Yongqin Liuca30a6e2023-01-03 17:28:09 +080019 HIKEY_USES_GKI := true
20 endif
John Stultz5d031842020-06-05 06:17:12 +000021 endif
22endif
23
Robin Lee81bde6d2020-08-15 22:17:32 +020024# Inherit the common device configuration
Anton Hansson1399b122018-02-08 14:57:45 +000025$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
Amit Pundire0b34ce2023-10-19 18:29:28 +053026$(call inherit-product, device/linaro/hikey960/linaro_hikey960/device-hikey960.mk)
27$(call inherit-product, device/linaro/hikey960/device-common.mk)
Dmitry Shmidt5d080802017-04-11 14:20:03 -070028
Amit Pundir0088f6d2023-10-15 21:05:34 +053029PRODUCT_PROPERTY_OVERRIDES += \
30 ro.opengles.version=196608 \
31 ro.hardware.egl=mali
Sahaj Sarup93980e02018-09-11 13:24:20 +000032
Dmitry Shmidt5d080802017-04-11 14:20:03 -070033#
34# Overrides
Amit Pundire0b34ce2023-10-19 18:29:28 +053035PRODUCT_NAME := linaro_hikey960
36PRODUCT_DEVICE := linaro_hikey960
Dmitry Shmidt5d080802017-04-11 14:20:03 -070037PRODUCT_BRAND := Android
Amit Pundire0b34ce2023-10-19 18:29:28 +053038PRODUCT_MODEL := AOSP fork on hikey960
John Stultz3d2ce4c2019-06-24 23:57:29 +000039
John Stultz84925462019-07-12 07:04:13 +000040ifneq ($(HIKEY_USES_GKI),)
Yongqin Liuaa064df2020-11-24 16:07:20 +080041 HIKEY_MOD_DIR := $(LOCAL_KERNEL_HOME)
John Stultz84925462019-07-12 07:04:13 +000042 HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko)
John Stultz9d126402020-09-15 03:26:56 +000043 SDCARDFS_KO := $(wildcard $(HIKEY_MOD_DIR)/sdcardfs*.ko)
Yongqin Liue05046e2020-11-24 21:00:19 +080044 CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/cma_heap.ko)
John Stultzaca358a2021-02-12 04:17:20 +000045 DEFERRED_FREE_KO := $(wildcard $(HIKEY_MOD_DIR)/deferred-free-helper.ko)
46 PAGE_POOL_KO := $(wildcard $(HIKEY_MOD_DIR)/page_pool.ko)
John Stultz4ab665e2021-01-08 04:35:02 +000047 SYSTEM_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/system_heap.ko)
Yongqin Liue05046e2020-11-24 21:00:19 +080048 ION_CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/ion_cma_heap*.ko)
John Stultz84925462019-07-12 07:04:13 +000049 ifneq ($(HIKEY_MODS),)
50 BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS)
51 BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \
Yongqin Liue05046e2020-11-24 21:00:19 +080052 $(CMA_HEAP_KO) \
John Stultz4ab665e2021-01-08 04:35:02 +000053 $(SYSTEM_HEAP_KO) \
John Stultzaca358a2021-02-12 04:17:20 +000054 $(DEFERRED_FREE_KO) \
55 $(PAGE_POOL_KO) \
Yongqin Liue05046e2020-11-24 21:00:19 +080056 $(ION_CMA_HEAP_KO) \
57 $(SDCARDFS_KO)
John Stultz84925462019-07-12 07:04:13 +000058 endif
John Stultz3d2ce4c2019-06-24 23:57:29 +000059endif
John Stultzec36f2d2022-02-02 04:37:53 +000060
61PRODUCT_SOONG_NAMESPACES += \
Amit Pundire0b34ce2023-10-19 18:29:28 +053062 device/linaro/hikey960/mali/bifrost