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 | |
SzuWei Lin | 1457b3f | 2019-01-03 12:49:55 +0800 | [diff] [blame] | 9 | # Enable system property split for Treble |
| 10 | BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true |
| 11 | |
Anton Hansson | 40c4773 | 2018-11-22 15:39:10 +0000 | [diff] [blame] | 12 | # This flag is set by mainline but isn't desired for GSI. |
| 13 | BOARD_USES_SYSTEM_OTHER_ODEX := |
| 14 | |
Isaac Chen | b9b51b1 | 2018-08-03 18:34:55 +0000 | [diff] [blame] | 15 | # GSIs are historically released in sparse format. |
| 16 | # Some vendors' bootloaders don't work properly with raw format images. So |
| 17 | # we explicit specify this need below (even though it's the current default). |
| 18 | TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 19 | |
SzuWei Lin | 1457b3f | 2019-01-03 12:49:55 +0800 | [diff] [blame] | 20 | # system.img is always ext4 with sparse option |
| 21 | # GSI also includes make_f2fs to support userdata parition in f2fs |
| 22 | # for some devices |
| 23 | TARGET_USERIMAGES_USE_F2FS := true |
| 24 | |
Bowgo Tsai | 3ac95b5 | 2018-10-04 02:14:54 +0000 | [diff] [blame] | 25 | # Enable dynamic system image size and reserved 64MB in it. |
| 26 | BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 |
SzuWei Lin | 79bfba0 | 2018-07-18 18:06:25 +0800 | [diff] [blame] | 27 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame^] | 28 | # GSI always requires separate vendor packages to vendor.img |
SzuWei Lin | 1457b3f | 2019-01-03 12:49:55 +0800 | [diff] [blame] | 29 | TARGET_COPY_OUT_VENDOR := vendor |
| 30 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame^] | 31 | # Creates metadata partition mount point under root for |
| 32 | # the devices with metadata parition |
| 33 | BOARD_USES_METADATA_PARTITION := true |
| 34 | |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 35 | # Android Verified Boot (AVB): |
Anton Hansson | de6f4cf | 2018-12-04 16:51:21 +0000 | [diff] [blame] | 36 | # Set AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED (--flag 2) in |
| 37 | # vbmeta.img to disable AVB verification. |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 38 | # |
| 39 | # To disable AVB for GSI, use the vbmeta.img and the GSI together. |
| 40 | # To enable AVB for GSI, include the GSI public key into the device-specific |
| 41 | # vbmeta.img. |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 42 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 |
| 43 | |
| 44 | # Enable chain partition for system. |
| 45 | BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 46 | BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 47 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 48 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 49 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame^] | 50 | # GSI specific System Properties |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 51 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 52 | # GSI is always userdebug and needs a couple of properties taking precedence |
| 53 | # over those set by the vendor. |
| 54 | TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop |
| 55 | endif |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 56 | |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 57 | # Set this to create /cache mount point for non-A/B devices that mounts /cache. |
| 58 | # The partition size doesn't matter, just to make build pass. |
| 59 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 60 | BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 |