blob: a52bb80451c7d27c7fa7178c35579f31cf1012da [file] [log] [blame]
Isaac Chen55e1d012018-06-11 12:52:22 +08001# BoardConfigGsiCommon.mk
2#
3# Common compile-time definitions for GSI
Anton Hansson40c47732018-11-22 15:39:10 +00004# Builds upon the mainline config.
Isaac Chen55e1d012018-06-11 12:52:22 +08005#
6
Anton Hansson40c47732018-11-22 15:39:10 +00007include build/make/target/board/BoardConfigMainlineCommon.mk
Anton Hansson284b81c2018-10-18 14:08:38 +01008
Anton Hansson40c47732018-11-22 15:39:10 +00009# This flag is set by mainline but isn't desired for GSI.
10BOARD_USES_SYSTEM_OTHER_ODEX :=
11
Isaac Chenb9b51b12018-08-03 18:34:55 +000012# 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).
15TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
SzuWei Line592c962018-07-12 17:40:00 +080016
Bowgo Tsai3ac95b52018-10-04 02:14:54 +000017# Enable dynamic system image size and reserved 64MB in it.
18BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
SzuWei Lin79bfba02018-07-18 18:06:25 +080019
Isaac Chen55e1d012018-06-11 12:52:22 +080020# Android Verified Boot (AVB):
Bowgo Tsai9d286382018-08-31 21:40:10 +080021# 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.
28BOARD_AVB_ENABLE := true
29BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
30BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2
31
32# Enable chain partition for system.
33BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
34BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048
35BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
36BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
Isaac Chen55e1d012018-06-11 12:52:22 +080037
38ifneq (,$(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.
41TARGET_SYSTEM_PROP := build/make/target/board/gsi_system.prop
42endif
SzuWei Line592c962018-07-12 17:40:00 +080043
44# Android generic system image always create metadata partition
45BOARD_USES_METADATA_PARTITION := true
46
47# Set this to create /cache mount point for non-A/B devices that mounts /cache.
48# The partition size doesn't matter, just to make build pass.
49BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
50BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216