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
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_SYSTEMIMAGE_PARTITION_SIZE := 4915724288    # 4688MB
45BOARD_USERDATAIMAGE_PARTITION_SIZE := 25845301248 # 24648MB
46BOARD_FLASH_BLOCK_SIZE := 512
47
48# Vendor partition definitions
49TARGET_COPY_OUT_VENDOR := vendor
50BOARD_VENDORIMAGE_PARTITION_SIZE := 822083584     # 784MB
51BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
52BOARD_VENDORIMAGE_JOURNAL_SIZE := 0
53BOARD_VENDORIMAGE_EXTFS_INODE_COUNT := 2048
54
55TARGET_RECOVERY_FSTAB := device/linaro/hikey/hikey960/fstab.hikey960
56