Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 1 | # BoardConfigGsiCommon.mk |
| 2 | # |
| 3 | # Common compile-time definitions for GSI |
| 4 | # |
| 5 | |
Anton Hansson | 284b81c | 2018-10-18 14:08:38 +0100 | [diff] [blame^] | 6 | # The generic product target doesn't have any hardware-specific pieces. |
| 7 | TARGET_NO_BOOTLOADER := true |
| 8 | TARGET_NO_KERNEL := true |
| 9 | |
Isaac Chen | b9b51b1 | 2018-08-03 18:34:55 +0000 | [diff] [blame] | 10 | # GSIs always use ext4. |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 11 | TARGET_USERIMAGES_USE_EXT4 := true |
Isaac Chen | b9b51b1 | 2018-08-03 18:34:55 +0000 | [diff] [blame] | 12 | # GSIs are historically released in sparse format. |
| 13 | # Some vendors' bootloaders don't work properly with raw format images. So |
| 14 | # we explicit specify this need below (even though it's the current default). |
| 15 | TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 16 | |
Bowgo Tsai | 3ac95b5 | 2018-10-04 02:14:54 +0000 | [diff] [blame] | 17 | # Enable dynamic system image size and reserved 64MB in it. |
| 18 | BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 |
SzuWei Lin | 79bfba0 | 2018-07-18 18:06:25 +0800 | [diff] [blame] | 19 | |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 20 | # Android Verified Boot (AVB): |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 21 | # 1) Sets BOARD_AVB_ENABLE to sign the GSI image. |
| 22 | # 2) Sets AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED (--flag 2) in |
| 23 | # vbmeta.img to disable AVB verification. |
| 24 | # |
| 25 | # To disable AVB for GSI, use the vbmeta.img and the GSI together. |
| 26 | # To enable AVB for GSI, include the GSI public key into the device-specific |
| 27 | # vbmeta.img. |
| 28 | BOARD_AVB_ENABLE := true |
| 29 | BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 30 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 |
| 31 | |
| 32 | # Enable chain partition for system. |
| 33 | BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 34 | BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 35 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 36 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 37 | |
| 38 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 39 | # GSI is always userdebug and needs a couple of properties taking precedence |
| 40 | # over those set by the vendor. |
| 41 | TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop |
| 42 | endif |
| 43 | BOARD_VNDK_VERSION := current |
| 44 | |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 45 | # system-as-root is mandatory from Android P |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 46 | TARGET_NO_RECOVERY := true |
| 47 | BOARD_BUILD_SYSTEM_ROOT_IMAGE := true |
SzuWei Lin | fa420b4 | 2018-07-02 18:41:07 +0800 | [diff] [blame] | 48 | |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 49 | # 64 bits binder interface is mandatory from Android P |
| 50 | TARGET_USES_64_BIT_BINDER := true |
| 51 | |
| 52 | # Android generic system image always create metadata partition |
| 53 | BOARD_USES_METADATA_PARTITION := true |
| 54 | |
| 55 | # Set this to create /cache mount point for non-A/B devices that mounts /cache. |
| 56 | # The partition size doesn't matter, just to make build pass. |
| 57 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 58 | BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 |
| 59 | |
SzuWei Lin | fa420b4 | 2018-07-02 18:41:07 +0800 | [diff] [blame] | 60 | # Audio: must using XML format for Treblized devices |
| 61 | USE_XML_AUDIO_POLICY_CONF := 1 |