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 | 91aa941 | 2019-04-04 14:53:25 +0100 | [diff] [blame] | 9 | TARGET_NO_KERNEL := true |
| 10 | |
Anton Hansson | 40c4773 | 2018-11-22 15:39:10 +0000 | [diff] [blame] | 11 | # This flag is set by mainline but isn't desired for GSI. |
| 12 | BOARD_USES_SYSTEM_OTHER_ODEX := |
| 13 | |
SzuWei Lin | 1457b3f | 2019-01-03 12:49:55 +0800 | [diff] [blame] | 14 | # system.img is always ext4 with sparse option |
| 15 | # GSI also includes make_f2fs to support userdata parition in f2fs |
| 16 | # for some devices |
| 17 | TARGET_USERIMAGES_USE_F2FS := true |
| 18 | |
Bowgo Tsai | 3ac95b5 | 2018-10-04 02:14:54 +0000 | [diff] [blame] | 19 | # Enable dynamic system image size and reserved 64MB in it. |
| 20 | BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 |
SzuWei Lin | 79bfba0 | 2018-07-18 18:06:25 +0800 | [diff] [blame] | 21 | |
Justin Yun | 6151e3f | 2019-06-25 15:58:13 +0900 | [diff] [blame] | 22 | # GSI forces product and system_ext packages to /system for now. |
Anton Hansson | 9791518 | 2018-12-06 18:25:32 +0000 | [diff] [blame] | 23 | TARGET_COPY_OUT_PRODUCT := system/product |
Justin Yun | 6151e3f | 2019-06-25 15:58:13 +0900 | [diff] [blame] | 24 | TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext |
Anton Hansson | 1683198 | 2019-03-22 14:10:19 +0000 | [diff] [blame] | 25 | BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := |
SzuWei Lin | 1457b3f | 2019-01-03 12:49:55 +0800 | [diff] [blame] | 26 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame] | 27 | # Creates metadata partition mount point under root for |
| 28 | # the devices with metadata parition |
| 29 | BOARD_USES_METADATA_PARTITION := true |
| 30 | |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 31 | # Android Verified Boot (AVB): |
Bowgo Tsai | 2e2a768 | 2019-04-23 18:05:51 +0800 | [diff] [blame] | 32 | # Set the rollback index to zero, to prevent the device bootloader from |
| 33 | # updating the last seen rollback index in the tamper-evident storage. |
Bowgo Tsai | c1a8f1a | 2019-02-19 10:30:50 +0800 | [diff] [blame] | 34 | BOARD_AVB_ROLLBACK_INDEX := 0 |
Bowgo Tsai | 9d28638 | 2018-08-31 21:40:10 +0800 | [diff] [blame] | 35 | |
SzuWei Lin | 1256ca9 | 2020-02-27 16:38:16 +0800 | [diff] [blame] | 36 | # Enable chain partition for system. |
| 37 | # GSI need to sign on system.img instead of vbmeta. |
| 38 | BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 39 | BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 |
| 40 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 41 | BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 |
| 42 | |
Bowgo Tsai | 0f95ac7 | 2020-05-08 14:09:57 +0800 | [diff] [blame] | 43 | # Enable chain partition for boot, mainly for GKI images. |
| 44 | BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem |
| 45 | BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048 |
| 46 | BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) |
| 47 | BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2 |
| 48 | |
SzuWei Lin | a2d5ed1 | 2019-01-09 15:42:36 +0800 | [diff] [blame] | 49 | # GSI specific System Properties |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 50 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
Bowgo Tsai | 06533fe | 2019-09-02 18:17:02 +0800 | [diff] [blame] | 51 | TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext.prop |
SzuWei Lin | fd6d294 | 2019-02-15 14:18:35 +0800 | [diff] [blame] | 52 | else |
Bowgo Tsai | 06533fe | 2019-09-02 18:17:02 +0800 | [diff] [blame] | 53 | TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext_user.prop |
Isaac Chen | 55e1d01 | 2018-06-11 12:52:22 +0800 | [diff] [blame] | 54 | endif |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 55 | |
SzuWei Lin | e592c96 | 2018-07-12 17:40:00 +0800 | [diff] [blame] | 56 | # Set this to create /cache mount point for non-A/B devices that mounts /cache. |
| 57 | # The partition size doesn't matter, just to make build pass. |
| 58 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 59 | BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 |
Anton Hansson | ac952ee | 2019-01-09 16:12:38 +0000 | [diff] [blame] | 60 | |
Jiyong Park | eb49b34 | 2020-05-29 17:50:03 +0900 | [diff] [blame^] | 61 | # Setup a vendor image to let PRODUCT_VENDOR_PROPERTIES does not affect GSI |
SzuWei Lin | 79e0d25 | 2019-06-18 17:55:34 +0800 | [diff] [blame] | 62 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 63 | |
Anton Hansson | ac952ee | 2019-01-09 16:12:38 +0000 | [diff] [blame] | 64 | # Disable 64 bit mediadrmserver |
| 65 | TARGET_ENABLE_MEDIADRM_64 := |