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 | |
Anton Hansson | 9791518 | 2018-12-06 18:25:32 +0000 | [diff] [blame] | 28 | # GSI forces product packages to /system for now. |
| 29 | TARGET_COPY_OUT_PRODUCT := system/product |
Anton Hansson | 1683198 | 2019-03-22 14:10:19 +0000 | [diff] [blame^] | 30 | BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := |
SzuWei Lin | 1457b3f | 2019-01-03 12:49:55 +0800 | [diff] [blame] | 31 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame] | 32 | # Creates metadata partition mount point under root for |
| 33 | # the devices with metadata parition |
| 34 | BOARD_USES_METADATA_PARTITION := true |
| 35 | |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 36 | # Android Verified Boot (AVB): |
Luca Stefani | 7c7b4b6 | 2019-02-10 19:47:41 +0100 | [diff] [blame] | 37 | # Set AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED (--flags 2) in |
Bowgo Tsai | c1a8f1a | 2019-02-19 10:30:50 +0800 | [diff] [blame] | 38 | # vbmeta.img to disable AVB verification. Also set the rollback index |
| 39 | # to zero, to prevent the device bootloader from updating the last seen |
| 40 | # rollback index in the tamper-evident storage. |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 41 | # |
| 42 | # To disable AVB for GSI, use the vbmeta.img and the GSI together. |
| 43 | # To enable AVB for GSI, include the GSI public key into the device-specific |
| 44 | # vbmeta.img. |
Bowgo Tsai | c1a8f1a | 2019-02-19 10:30:50 +0800 | [diff] [blame] | 45 | BOARD_AVB_ROLLBACK_INDEX := 0 |
Luca Stefani | 7c7b4b6 | 2019-02-10 19:47:41 +0100 | [diff] [blame] | 46 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2 |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 47 | |
| 48 | # Enable chain partition for system. |
| 49 | BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 50 | BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 51 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 52 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 53 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame] | 54 | # GSI specific System Properties |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 55 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 56 | TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop |
SzuWei Lin | fd6d294 | 2019-02-15 14:18:35 +0800 | [diff] [blame] | 57 | else |
| 58 | TARGET_SYSTEM_PROP := build/make/target/board/gsi_system_user.prop |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 59 | endif |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 60 | |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 61 | # Set this to create /cache mount point for non-A/B devices that mounts /cache. |
| 62 | # The partition size doesn't matter, just to make build pass. |
| 63 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 64 | BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 |
Anton Hansson | ac952ee | 2019-01-09 16:12:38 +0000 | [diff] [blame] | 65 | |
| 66 | # Disable 64 bit mediadrmserver |
| 67 | TARGET_ENABLE_MEDIADRM_64 := |
Jiyong Park | c35a33e | 2019-02-11 21:42:57 +0900 | [diff] [blame] | 68 | |
| 69 | # Ordinary (non-flattened) APEX may require kernel changes. For maximum compatibility, |
| 70 | # use flattened APEX for GSI |
| 71 | TARGET_FLATTEN_APEX := true |