90339f9563
There are a couple of use cases where we don't want sparse image: 1. `DynamicSystemInstallationService` in Q framework doesn't support sparse images. 2. Super image manipulation tools (like `lpadd`) doesn't play nice with sparse images. Force non-sparse GSI so we don't break backwards compatibility (1) and we don't need to write `simg2img` everywhere (2). Bug: 167695592 Test: Prepare a device flashed with Q framework Test: Build system.img and create system.img.zip; the image is non-sparsed Test: m tradefed-all && \ tradefed.sh run commandAndExit template/atest_local_min \ --template:map preparers=template/preparers/dsu-preparer \ --extra-file system-img.zip=out/.../system.img.zip \ --dynamic-system-update:disable-tear-down Change-Id: Ib7667165ce53e87eb86bc7d3f56c80a418123a62
74 lines
2.6 KiB
Makefile
74 lines
2.6 KiB
Makefile
# BoardConfigGsiCommon.mk
|
|
#
|
|
# Common compile-time definitions for GSI
|
|
# Builds upon the mainline config.
|
|
#
|
|
|
|
include build/make/target/board/BoardConfigMainlineCommon.mk
|
|
|
|
TARGET_NO_KERNEL := true
|
|
|
|
# This flag is set by mainline but isn't desired for GSI.
|
|
BOARD_USES_SYSTEM_OTHER_ODEX :=
|
|
|
|
# system.img is always ext4 and non-sparsed.
|
|
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
|
|
|
|
# GSI also includes make_f2fs to support userdata parition in f2fs
|
|
# for some devices
|
|
TARGET_USERIMAGES_USE_F2FS := true
|
|
|
|
# Enable dynamic system image size and reserved 64MB in it.
|
|
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
|
|
|
|
# GSI forces product and system_ext packages to /system for now.
|
|
TARGET_COPY_OUT_PRODUCT := system/product
|
|
TARGET_COPY_OUT_SYSTEM_EXT := system/system_ext
|
|
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE :=
|
|
|
|
# Creates metadata partition mount point under root for
|
|
# the devices with metadata parition
|
|
BOARD_USES_METADATA_PARTITION := true
|
|
|
|
# Android Verified Boot (AVB):
|
|
# Set the rollback index to zero, to prevent the device bootloader from
|
|
# updating the last seen rollback index in the tamper-evident storage.
|
|
BOARD_AVB_ROLLBACK_INDEX := 0
|
|
|
|
# Enable AVB chained partition for system.
|
|
# https://android.googlesource.com/platform/external/avb/+/master/README.md
|
|
BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
|
|
BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048
|
|
BOARD_AVB_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
|
|
BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
|
|
ifdef BUILDING_GSI
|
|
# super.img spec for GSI targets
|
|
BOARD_SUPER_PARTITION_SIZE := 3229614080
|
|
BOARD_SUPER_PARTITION_GROUPS := gsi_dynamic_partitions
|
|
BOARD_GSI_DYNAMIC_PARTITIONS_PARTITION_LIST := system
|
|
BOARD_GSI_DYNAMIC_PARTITIONS_SIZE := 3221225472
|
|
endif
|
|
|
|
# Enable chain partition for boot, mainly for GKI images.
|
|
BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
|
|
BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048
|
|
BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
|
|
BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
|
|
|
|
# GSI specific System Properties
|
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
|
TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext.prop
|
|
else
|
|
TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext_user.prop
|
|
endif
|
|
|
|
# Set this to create /cache mount point for non-A/B devices that mounts /cache.
|
|
# The partition size doesn't matter, just to make build pass.
|
|
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
BOARD_CACHEIMAGE_PARTITION_SIZE := 16777216
|
|
|
|
# Setup a vendor image to let PRODUCT_VENDOR_PROPERTIES does not affect GSI
|
|
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
|
|
|
|
# Disable 64 bit mediadrmserver
|
|
TARGET_ENABLE_MEDIADRM_64 :=
|