1include device/linaro/hikey/BoardConfigCommon.mk
2
3TARGET_BOOTLOADER_BOARD_NAME := hikey960
4TARGET_BOARD_PLATFORM := hikey960
5
6TARGET_CPU_VARIANT := cortex-a73
7TARGET_2ND_CPU_VARIANT := cortex-a73
8
9TARGET_NO_DTIMAGE := false
10
11BOARD_KERNEL_CMDLINE := androidboot.hardware=hikey960 firmware_class.path=/vendor/firmware efi=noruntime init=/init
12BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/ff3b0000.ufs
13BOARD_KERNEL_CMDLINE += loglevel=15 androidboot.slot_suffix=_a
14
15ifeq ($(TARGET_BUILTIN_EDID), true)
16BOARD_KERNEL_CMDLINE += drm_kms_helper.edid_firmware=edid/1920x1080.bin
17endif
18
19# On kernels before 4.19, enable dtb fstab. On kernels >= 4.19, both dtb
20# fstab and android-verity are deprecated, so until we have avb2 support
21# in the bootloader, don't enable either feature. The ramdisk fstab
22# needed for the new mechanism will be installed unconditionally; if dtb
23# fstab is present, it will override it automatically.
24ifneq ($(TARGET_KERNEL_USE),4.19)
25# Enable treble dtb fstab with verity
26ifneq ($(TARGET_ANDROID_VERITY),)
27BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab_v2
28BOARD_KERNEL_CMDLINE += rootwait ro root=/dev/dm-0
29BOARD_KERNEL_CMDLINE += dm=\"system none ro,0 1 android-verity 8:58\"
30BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
31else
32# Enable treble dtb fstab without verity
33BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab
34endif
35endif
36
37ifneq ($(TARGET_SENSOR_MEZZANINE),)
38BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_$(TARGET_SENSOR_MEZZANINE)
39endif
40
41BOARD_MKBOOTIMG_ARGS := --base 0x0 --tags_offset 0x07a00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000
42
43BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
44BOARD_USERDATAIMAGE_PARTITION_SIZE := 25845301248 # 24648MB
45BOARD_FLASH_BLOCK_SIZE := 512
46
47# Vendor/system_ext/product partition definitions
48TARGET_COPY_OUT_VENDOR := vendor
49BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
50TARGET_COPY_OUT_SYSTEM_EXT := system_ext
51BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
52TARGET_COPY_OUT_PRODUCT := product
53BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
54BOARD_USES_METADATA_PARTITION := true
55
56#Dynamic Partition details
57TARGET_USE_DYNAMIC_PARTITIONS := true
58BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
59BOARD_SUPER_PARTITION_SIZE := 4915724288
60BOARD_SUPER_PARTITION_GROUPS := hikey960_dynamic_partitions
61BOARD_HIKEY960_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
62BOARD_HIKEY960_DYNAMIC_PARTITIONS_SIZE := 4911529984  # Reserve 4M for DAP metadata
63BOARD_SUPER_PARTITION_METADATA_DEVICE := super
64BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
65
66TARGET_RECOVERY_FSTAB := device/linaro/hikey/hikey960/fstab.hikey960
67