1# BoardConfigGsiCommon.mk 2# 3# Common compile-time definitions for GSI 4# Builds upon the mainline config. 5# 6 7include build/make/target/board/BoardConfigMainlineCommon.mk 8 9TARGET_NO_KERNEL := true 10 11# This flag is set by mainline but isn't desired for GSI. 12BOARD_USES_SYSTEM_OTHER_ODEX := 13 14# system.img is always ext4 and non-sparsed. 15TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true 16 17# GSI also includes make_f2fs to support userdata parition in f2fs 18# for some devices 19TARGET_USERIMAGES_USE_F2FS := true 20 21# Enable dynamic system image size and reserved 64MB in it. 22BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864 23 24# GSI forces product and system_ext packages to /system for now. 25TARGET_COPY_OUT_PRODUCT := system/product 26TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext 27BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := 28 29# Creates metadata partition mount point under root for 30# the devices with metadata parition 31BOARD_USES_METADATA_PARTITION := true 32 33# Android Verified Boot (AVB): 34# Set the rollback index to zero, to prevent the device bootloader from 35# updating the last seen rollback index in the tamper-evident storage. 36BOARD_AVB_ROLLBACK_INDEX := 0 37 38# Enable AVB chained partition for system. 39# https://android.googlesource.com/platform/external/avb/+/master/README.md 40BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem 41BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048 42BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) 43BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 44 45# Using sha256 for dm-verity partitions. b/156162446 46BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += --hash_algorithm sha256 47 48ifdef BUILDING_GSI 49# super.img spec for GSI targets 50BOARD_SUPER_PARTITION_SIZE := 3229614080 51BOARD_SUPER_PARTITION_GROUPS := gsi_dynamic_partitions 52BOARD_GSI_DYNAMIC_PARTITIONS_PARTITION_LIST := system 53BOARD_GSI_DYNAMIC_PARTITIONS_SIZE := 3221225472 54endif 55 56# TODO(b/123695868, b/146149698): 57# This flag is set by mainline but isn't desired for GSI 58BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := 59 60# Enable chain partition for boot, mainly for GKI images. 61BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem 62BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048 63BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) 64BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2 65 66# GSI specific System Properties 67ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) 68TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext.prop 69else 70TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext_user.prop 71endif 72 73# Set this to create /cache mount point for non-A/B devices that mounts /cache. 74# The partition size doesn't matter, just to make build pass. 75BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 76BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216 77 78# Setup a vendor image to let PRODUCT_VENDOR_PROPERTIES does not affect GSI 79BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 80 81# Disable 64 bit mediadrmserver 82TARGET_ENABLE_MEDIADRM_64 := 83