Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 1 | # BoardConfigGsiCommon.mk |
| 2 | # |
| 3 | # Common compile-time definitions for GSI |
Anton Hansson | 40c4773 | 2018-11-22 15:39:10 +0000 | [diff] [blame] | 4 | # Builds upon the mainline config. |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 5 | # |
| 6 | |
Anton Hansson | 40c4773 | 2018-11-22 15:39:10 +0000 | [diff] [blame] | 7 | include build/make/target/board/BoardConfigMainlineCommon.mk |
Anton Hansson | 284b81c | 2018-10-18 14:08:38 +0100 | [diff] [blame] | 8 | |
Anton Hansson | 40c4773 | 2018-11-22 15:39:10 +0000 | [diff] [blame] | 9 | # This flag is set by mainline but isn't desired for GSI. |
| 10 | BOARD_USES_SYSTEM_OTHER_ODEX := |
| 11 | |
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): |
Anton Hansson | de6f4cf | 2018-12-04 16:51:21 +0000 | [diff] [blame] | 21 | # Set AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED (--flag 2) in |
| 22 | # vbmeta.img to disable AVB verification. |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 23 | # |
| 24 | # To disable AVB for GSI, use the vbmeta.img and the GSI together. |
| 25 | # To enable AVB for GSI, include the GSI public key into the device-specific |
| 26 | # vbmeta.img. |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 27 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 |
| 28 | |
| 29 | # Enable chain partition for system. |
| 30 | BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 31 | BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 32 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 33 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 34 | |
| 35 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 36 | # GSI is always userdebug and needs a couple of properties taking precedence |
| 37 | # over those set by the vendor. |
| 38 | TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop |
| 39 | endif |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 40 | |
| 41 | # Android generic system image always create metadata partition |
| 42 | BOARD_USES_METADATA_PARTITION := true |
| 43 | |
| 44 | # Set this to create /cache mount point for non-A/B devices that mounts /cache. |
| 45 | # The partition size doesn't matter, just to make build pass. |
| 46 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 47 | BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 |