Dmitry Shmidt | 64185fa | 2017-07-28 15:08:55 -0700 | [diff] [blame] | 1 | ifndef TARGET_KERNEL_USE |
Yongqin Liu | 7788ffd | 2023-03-03 22:11:00 +0800 | [diff] [blame] | 2 | TARGET_KERNEL_USE=5.10 |
Dmitry Shmidt | 64185fa | 2017-07-28 15:08:55 -0700 | [diff] [blame] | 3 | endif |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame^] | 4 | LOCAL_KERNEL_HOME ?= device/linaro/hikey960-kernel/$(TARGET_KERNEL_USE) |
Yongqin Liu | aa064df | 2020-11-24 16:07:20 +0800 | [diff] [blame] | 5 | TARGET_PREBUILT_KERNEL := $(LOCAL_KERNEL_HOME)/Image.gz-dtb |
| 6 | TARGET_PREBUILT_DTB := $(LOCAL_KERNEL_HOME)/hi3660-hikey960.dtb |
Dmitry Shmidt | 64185fa | 2017-07-28 15:08:55 -0700 | [diff] [blame] | 7 | |
John Stultz | 5d03184 | 2020-06-05 06:17:12 +0000 | [diff] [blame] | 8 | ifndef HIKEY_USES_GKI |
Yongqin Liu | 7999a18 | 2023-03-14 17:25:17 +0800 | [diff] [blame] | 9 | ## 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 Liu | 7788ffd | 2023-03-03 22:11:00 +0800 | [diff] [blame] | 12 | ifeq ($(TARGET_KERNEL_USE), mainline) |
John Stultz | 5d03184 | 2020-06-05 06:17:12 +0000 | [diff] [blame] | 13 | HIKEY_USES_GKI := true |
Yongqin Liu | ca30a6e | 2023-01-03 17:28:09 +0800 | [diff] [blame] | 14 | else |
Yongqin Liu | 7788ffd | 2023-03-03 22:11:00 +0800 | [diff] [blame] | 15 | 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 Liu | ca30a6e | 2023-01-03 17:28:09 +0800 | [diff] [blame] | 19 | HIKEY_USES_GKI := true |
| 20 | endif |
John Stultz | 5d03184 | 2020-06-05 06:17:12 +0000 | [diff] [blame] | 21 | endif |
| 22 | endif |
| 23 | |
Robin Lee | 81bde6d | 2020-08-15 22:17:32 +0200 | [diff] [blame] | 24 | # Inherit the common device configuration |
Anton Hansson | 1399b12 | 2018-02-08 14:57:45 +0000 | [diff] [blame] | 25 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame^] | 26 | $(call inherit-product, device/linaro/hikey960/linaro_hikey960/device-hikey960.mk) |
| 27 | $(call inherit-product, device/linaro/hikey960/device-common.mk) |
Dmitry Shmidt | 5d08080 | 2017-04-11 14:20:03 -0700 | [diff] [blame] | 28 | |
Amit Pundir | 0088f6d | 2023-10-15 21:05:34 +0530 | [diff] [blame] | 29 | PRODUCT_PROPERTY_OVERRIDES += \ |
| 30 | ro.opengles.version=196608 \ |
| 31 | ro.hardware.egl=mali |
Sahaj Sarup | 93980e0 | 2018-09-11 13:24:20 +0000 | [diff] [blame] | 32 | |
Dmitry Shmidt | 5d08080 | 2017-04-11 14:20:03 -0700 | [diff] [blame] | 33 | # |
| 34 | # Overrides |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame^] | 35 | PRODUCT_NAME := linaro_hikey960 |
| 36 | PRODUCT_DEVICE := linaro_hikey960 |
Dmitry Shmidt | 5d08080 | 2017-04-11 14:20:03 -0700 | [diff] [blame] | 37 | PRODUCT_BRAND := Android |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame^] | 38 | PRODUCT_MODEL := AOSP fork on hikey960 |
John Stultz | 3d2ce4c | 2019-06-24 23:57:29 +0000 | [diff] [blame] | 39 | |
John Stultz | 8492546 | 2019-07-12 07:04:13 +0000 | [diff] [blame] | 40 | ifneq ($(HIKEY_USES_GKI),) |
Yongqin Liu | aa064df | 2020-11-24 16:07:20 +0800 | [diff] [blame] | 41 | HIKEY_MOD_DIR := $(LOCAL_KERNEL_HOME) |
John Stultz | 8492546 | 2019-07-12 07:04:13 +0000 | [diff] [blame] | 42 | HIKEY_MODS := $(wildcard $(HIKEY_MOD_DIR)/*.ko) |
John Stultz | 9d12640 | 2020-09-15 03:26:56 +0000 | [diff] [blame] | 43 | SDCARDFS_KO := $(wildcard $(HIKEY_MOD_DIR)/sdcardfs*.ko) |
Yongqin Liu | e05046e | 2020-11-24 21:00:19 +0800 | [diff] [blame] | 44 | CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/cma_heap.ko) |
John Stultz | aca358a | 2021-02-12 04:17:20 +0000 | [diff] [blame] | 45 | DEFERRED_FREE_KO := $(wildcard $(HIKEY_MOD_DIR)/deferred-free-helper.ko) |
| 46 | PAGE_POOL_KO := $(wildcard $(HIKEY_MOD_DIR)/page_pool.ko) |
John Stultz | 4ab665e | 2021-01-08 04:35:02 +0000 | [diff] [blame] | 47 | SYSTEM_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/system_heap.ko) |
Yongqin Liu | e05046e | 2020-11-24 21:00:19 +0800 | [diff] [blame] | 48 | ION_CMA_HEAP_KO := $(wildcard $(HIKEY_MOD_DIR)/ion_cma_heap*.ko) |
John Stultz | 8492546 | 2019-07-12 07:04:13 +0000 | [diff] [blame] | 49 | ifneq ($(HIKEY_MODS),) |
| 50 | BOARD_VENDOR_KERNEL_MODULES += $(HIKEY_MODS) |
| 51 | BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \ |
Yongqin Liu | e05046e | 2020-11-24 21:00:19 +0800 | [diff] [blame] | 52 | $(CMA_HEAP_KO) \ |
John Stultz | 4ab665e | 2021-01-08 04:35:02 +0000 | [diff] [blame] | 53 | $(SYSTEM_HEAP_KO) \ |
John Stultz | aca358a | 2021-02-12 04:17:20 +0000 | [diff] [blame] | 54 | $(DEFERRED_FREE_KO) \ |
| 55 | $(PAGE_POOL_KO) \ |
Yongqin Liu | e05046e | 2020-11-24 21:00:19 +0800 | [diff] [blame] | 56 | $(ION_CMA_HEAP_KO) \ |
| 57 | $(SDCARDFS_KO) |
John Stultz | 8492546 | 2019-07-12 07:04:13 +0000 | [diff] [blame] | 58 | endif |
John Stultz | 3d2ce4c | 2019-06-24 23:57:29 +0000 | [diff] [blame] | 59 | endif |
John Stultz | ec36f2d | 2022-02-02 04:37:53 +0000 | [diff] [blame] | 60 | |
| 61 | PRODUCT_SOONG_NAMESPACES += \ |
Amit Pundir | e0b34ce | 2023-10-19 18:29:28 +0530 | [diff] [blame^] | 62 | device/linaro/hikey960/mali/bifrost |