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 | |
Dmitry Shmidt | 20f2bc1 | 2017-05-11 17:05:01 -0700 | [diff] [blame] | 9 | ifeq ($(TARGET_KERNEL_USE), 3.18) |
vishal | 46787b6 | 2018-04-10 19:56:30 +0530 | [diff] [blame] | 10 | BOARD_KERNEL_CMDLINE := console=ttyAMA3,115200 androidboot.console=ttyAMA3 androidboot.hardware=hikey firmware_class.path=/vendor/firmware efi=noruntime |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 11 | else |
John Stultz | 719a094 | 2018-12-05 16:50:42 -0800 | [diff] [blame] | 12 | ifeq ($(TARGET_KERNEL_USE), 4.19) |
| 13 | BOARD_KERNEL_CMDLINE := console=ttyAMA3,115200 androidboot.console=ttyAMA3 androidboot.hardware=hikey firmware_class.path=/vendor/firmware efi=noruntime |
| 14 | else |
| 15 | # FIQ debugger is deprecated and we'll remoeve this once kernel support in prebuilts are yanked |
vishal | 46787b6 | 2018-04-10 19:56:30 +0530 | [diff] [blame] | 16 | BOARD_KERNEL_CMDLINE := console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/vendor/firmware efi=noruntime |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 17 | endif |
John Stultz | 719a094 | 2018-12-05 16:50:42 -0800 | [diff] [blame] | 18 | endif |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 19 | |
Alistair Strachan | 11c5e3e | 2018-07-31 17:28:51 -0700 | [diff] [blame] | 20 | ifneq ($(TARGET_ANDROID_VERITY),) |
| 21 | # Enable dtb fstab for treble, with verity and system-as-root |
| 22 | # NOTE: Disabled by default until b/111829702 is fixed |
| 23 | BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab_v2 |
| 24 | BOARD_KERNEL_CMDLINE += rootwait ro init=/init root=/dev/dm-0 |
| 25 | BOARD_KERNEL_CMDLINE += dm=\"system none ro,0 1 android-verity 179:9\" |
| 26 | BOARD_BUILD_SYSTEM_ROOT_IMAGE := true |
| 27 | else |
| 28 | # Enable dtb fstab for treble |
John Stultz | 3424dc3 | 2018-04-11 15:37:34 -0700 | [diff] [blame] | 29 | BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab |
Alistair Strachan | 11c5e3e | 2018-07-31 17:28:51 -0700 | [diff] [blame] | 30 | endif |
John Stultz | 3424dc3 | 2018-04-11 15:37:34 -0700 | [diff] [blame] | 31 | |
Ben Fennema | 52301e4 | 2017-10-17 12:24:04 -0700 | [diff] [blame] | 32 | ifneq ($(TARGET_SENSOR_MEZZANINE),) |
| 33 | BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_$(TARGET_SENSOR_MEZZANINE) |
| 34 | endif |
| 35 | |
Yongqin Liu | db3edca | 2017-03-28 22:44:07 +0800 | [diff] [blame] | 36 | ## printk.devkmsg only has meaning for kernel 4.9 and later |
Dmitry Shmidt | 20f2bc1 | 2017-05-11 17:05:01 -0700 | [diff] [blame] | 37 | ## it would be ignored by kernel 3.18 and kernel 4.4 |
Yongqin Liu | db3edca | 2017-03-28 22:44:07 +0800 | [diff] [blame] | 38 | BOARD_KERNEL_CMDLINE += printk.devkmsg=on |
| 39 | |
Dmitry Shmidt | 5d08080 | 2017-04-11 14:20:03 -0700 | [diff] [blame] | 40 | TARGET_NO_DTIMAGE := true |
| 41 | |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 42 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 |
Mark Salyzyn | 97ae220 | 2017-05-26 14:56:52 -0700 | [diff] [blame] | 43 | ifeq ($(TARGET_USERDATAIMAGE_4GB), true) # to build for aosp-4g partition table |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 44 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 1595915776 |
| 45 | else |
Mark Salyzyn | 97ae220 | 2017-05-26 14:56:52 -0700 | [diff] [blame] | 46 | ifeq ($(TARGET_WITH_SWAP), true) # to build for swap-8g partition table |
| 47 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 4246715904 |
| 48 | else |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 49 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 5588893184 |
| 50 | endif |
Mark Salyzyn | 97ae220 | 2017-05-26 14:56:52 -0700 | [diff] [blame] | 51 | endif |
Amit Pundir | af628c2 | 2016-11-02 16:37:00 +0800 | [diff] [blame] | 52 | BOARD_FLASH_BLOCK_SIZE := 131072 |
Dmitry Shmidt | e04aca3 | 2018-04-10 11:10:33 -0700 | [diff] [blame] | 53 | |
| 54 | # Vendor partition definitions |
| 55 | TARGET_COPY_OUT_VENDOR := vendor |
| 56 | BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456 # 256MB |
| 57 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 58 | BOARD_VENDORIMAGE_JOURNAL_SIZE := 0 |
| 59 | BOARD_VENDORIMAGE_EXTFS_INODE_COUNT := 2048 |