Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 1 | include device/linaro/hikey/BoardConfigCommon.mk |
| 2 | |
Dmitry Shmidt | a167bf6 | 2017-08-24 12:51:42 -0700 | [diff] [blame] | 3 | TARGET_BOOTLOADER_BOARD_NAME := hikey |
| 4 | TARGET_BOARD_PLATFORM := hikey |
| 5 | |
Jake Weinstein | f2de134 | 2017-06-23 12:23:08 -0400 | [diff] [blame] | 6 | TARGET_CPU_VARIANT := cortex-a53 |
| 7 | TARGET_2ND_CPU_VARIANT := cortex-a53 |
| 8 | |
Alistair Strachan | dadf834 | 2019-01-16 14:10:47 -0800 | [diff] [blame] | 9 | BOARD_KERNEL_CMDLINE := androidboot.hardware=hikey firmware_class.path=/vendor/firmware efi=noruntime init=/init |
| 10 | BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/f723d000.dwmmc0 |
| 11 | BOARD_KERNEL_CMDLINE += console=ttyAMA3,115200 androidboot.console=ttyAMA3 |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 12 | |
John Stultz | 6218335 | 2019-04-25 16:06:53 -0700 | [diff] [blame] | 13 | # On kernels before 4.14, enable dtb fstab with android-verity. On kernels >= |
| 14 | # 4.14, both dtb fstab and android-verity are deprecated, so until we have |
Alistair Strachan | dadf834 | 2019-01-16 14:10:47 -0800 | [diff] [blame] | 15 | # avb2 support in the bootloader, don't enable either feature. The ramdisk |
| 16 | # fstab needed for the new mechanism will be installed unconditionally; if |
| 17 | # dtb fstab is present, it will override it automatically. |
| 18 | ifneq ($(TARGET_KERNEL_USE),4.19) |
John Stultz | 6218335 | 2019-04-25 16:06:53 -0700 | [diff] [blame] | 19 | ifneq ($(TARGET_KERNEL_USE),4.14) |
Alistair Strachan | 11c5e3e | 2018-07-31 17:28:51 -0700 | [diff] [blame] | 20 | BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab_v2 |
Alistair Strachan | dadf834 | 2019-01-16 14:10:47 -0800 | [diff] [blame] | 21 | BOARD_KERNEL_CMDLINE += rootwait ro root=/dev/dm-0 |
Alistair Strachan | 11c5e3e | 2018-07-31 17:28:51 -0700 | [diff] [blame] | 22 | BOARD_KERNEL_CMDLINE += dm=\"system none ro,0 1 android-verity 179:9\" |
| 23 | BOARD_BUILD_SYSTEM_ROOT_IMAGE := true |
Alistair Strachan | dadf834 | 2019-01-16 14:10:47 -0800 | [diff] [blame] | 24 | endif |
John Stultz | 6218335 | 2019-04-25 16:06:53 -0700 | [diff] [blame] | 25 | endif |
John Stultz | 3424dc3 | 2018-04-11 15:37:34 -0700 | [diff] [blame] | 26 | |
Ben Fennema | 52301e4 | 2017-10-17 12:24:04 -0700 | [diff] [blame] | 27 | ifneq ($(TARGET_SENSOR_MEZZANINE),) |
| 28 | BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_$(TARGET_SENSOR_MEZZANINE) |
| 29 | endif |
| 30 | |
Yongqin Liu | db3edca | 2017-03-28 22:44:07 +0800 | [diff] [blame] | 31 | ## printk.devkmsg only has meaning for kernel 4.9 and later |
Alistair Strachan | 7708149 | 2019-01-14 09:03:22 -0800 | [diff] [blame] | 32 | ## it would be ignored by kernel 4.4 |
Yongqin Liu | db3edca | 2017-03-28 22:44:07 +0800 | [diff] [blame] | 33 | BOARD_KERNEL_CMDLINE += printk.devkmsg=on |
| 34 | |
Dmitry Shmidt | 5d08080 | 2017-04-11 14:20:03 -0700 | [diff] [blame] | 35 | TARGET_NO_DTIMAGE := true |
| 36 | |
John Stultz | 5e1a47d | 2019-05-14 11:33:51 -0700 | [diff] [blame] | 37 | BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 38 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 |
Mark Salyzyn | 97ae220 | 2017-05-26 14:56:52 -0700 | [diff] [blame] | 39 | ifeq ($(TARGET_USERDATAIMAGE_4GB), true) # to build for aosp-4g partition table |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 40 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 1595915776 |
| 41 | else |
Mark Salyzyn | 97ae220 | 2017-05-26 14:56:52 -0700 | [diff] [blame] | 42 | ifeq ($(TARGET_WITH_SWAP), true) # to build for swap-8g partition table |
| 43 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 4246715904 |
| 44 | else |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 45 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 5588893184 |
| 46 | endif |
Mark Salyzyn | 97ae220 | 2017-05-26 14:56:52 -0700 | [diff] [blame] | 47 | endif |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 48 | BOARD_FLASH_BLOCK_SIZE := 131072 |
Dmitry Shmidt | e04aca3 | 2018-04-10 11:10:33 -0700 | [diff] [blame] | 49 | |
| 50 | # Vendor partition definitions |
| 51 | TARGET_COPY_OUT_VENDOR := vendor |
| 52 | BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456 # 256MB |
| 53 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 54 | BOARD_VENDORIMAGE_JOURNAL_SIZE := 0 |
| 55 | BOARD_VENDORIMAGE_EXTFS_INODE_COUNT := 2048 |
Alistair Strachan | 10c509c | 2018-11-20 18:09:27 -0800 | [diff] [blame] | 56 | |
| 57 | TARGET_RECOVERY_FSTAB := device/linaro/hikey/hikey/$(TARGET_FSTAB) |