Merge "emulator: support dynamic partitions"
This commit is contained in:
commit
73c9f03b66
12 changed files with 57 additions and 29 deletions
|
@ -4521,13 +4521,20 @@ dalvikfiles: $(INTERNAL_DALVIK_MODULES)
|
|||
|
||||
ifeq ($(BUILD_QEMU_IMAGES),true)
|
||||
MK_QEMU_IMAGE_SH := device/generic/goldfish/tools/mk_qemu_image.sh
|
||||
MK_COMBINE_QEMU_IMAGE_SH := device/generic/goldfish/tools/mk_combined_img.py
|
||||
SGDISK_HOST := $(HOST_OUT_EXECUTABLES)/sgdisk
|
||||
|
||||
ifdef INSTALLED_SYSTEMIMAGE_TARGET
|
||||
INSTALLED_QEMU_SYSTEMIMAGE := $(PRODUCT_OUT)/system-qemu.img
|
||||
$(INSTALLED_QEMU_SYSTEMIMAGE): $(INSTALLED_SYSTEMIMAGE_TARGET) $(MK_QEMU_IMAGE_SH) $(SGDISK_HOST) $(SIMG2IMG)
|
||||
@echo Create system-qemu.img
|
||||
(export SGDISK=$(SGDISK_HOST) SIMG2IMG=$(SIMG2IMG); $(MK_QEMU_IMAGE_SH) $(INSTALLED_SYSTEMIMAGE_TARGET))
|
||||
INSTALLED_SYSTEM_QEMU_CONFIG := $(PRODUCT_OUT)/system-qemu-config.txt
|
||||
$(INSTALLED_SYSTEM_QEMU_CONFIG): $(INSTALLED_SUPERIMAGE_TARGET) $(INSTALLED_VBMETAIMAGE_TARGET)
|
||||
@echo "$(PRODUCT_OUT)/vbmeta.img vbmeta 1" > $@
|
||||
@echo "$(INSTALLED_SUPERIMAGE_TARGET) super 2" >> $@
|
||||
$(INSTALLED_QEMU_SYSTEMIMAGE): $(INSTALLED_VBMETAIMAGE_TARGET) $(MK_COMBINE_QEMU_IMAGE_SH) $(SGDISK_HOST) $(SIMG2IMG) \
|
||||
$(INSTALLED_SUPERIMAGE_TARGET) $(INSTALLED_SYSTEM_QEMU_CONFIG)
|
||||
@echo Create system-qemu.img now
|
||||
(export SGDISK=$(SGDISK_HOST) SIMG2IMG=$(SIMG2IMG); \
|
||||
$(MK_COMBINE_QEMU_IMAGE_SH) -i $(INSTALLED_SYSTEM_QEMU_CONFIG) -o $@)
|
||||
|
||||
systemimage: $(INSTALLED_QEMU_SYSTEMIMAGE)
|
||||
droidcore: $(INSTALLED_QEMU_SYSTEMIMAGE)
|
||||
|
@ -4569,17 +4576,17 @@ odmimage: $(INSTALLED_QEMU_ODMIMAGE)
|
|||
droidcore: $(INSTALLED_QEMU_ODMIMAGE)
|
||||
endif
|
||||
|
||||
ifeq ($(BOARD_AVB_ENABLE),true)
|
||||
QEMU_VERIFIED_BOOT_PARAMS := $(PRODUCT_OUT)/VerifiedBootParams.textproto
|
||||
MK_VERIFIED_BOOT_KERNEL_CMDLINE_SH := device/generic/goldfish/tools/mk_verified_boot_params.sh
|
||||
$(QEMU_VERIFIED_BOOT_PARAMS): $(INSTALLED_QEMU_SYSTEMIMAGE) $(MK_VERIFIED_BOOT_KERNEL_CMDLINE_SH) $(INSTALLED_VBMETAIMAGE_TARGET) $(SGDISK_HOST) $(AVBTOOL)
|
||||
MK_VBMETA_BOOT_KERNEL_CMDLINE_SH := device/generic/goldfish/tools/mk_vbmeta_boot_params.sh
|
||||
$(QEMU_VERIFIED_BOOT_PARAMS): $(INSTALLED_VBMETAIMAGE_TARGET) $(INSTALLED_SYSTEMIMAGE_TARGET) \
|
||||
$(MK_VBMETA_BOOT_KERNEL_CMDLINE_SH) $(AVBTOOL)
|
||||
@echo Creating $@
|
||||
(export SGDISK=$(SGDISK_HOST) AVBTOOL=$(AVBTOOL); $(MK_VERIFIED_BOOT_KERNEL_CMDLINE_SH) $(INSTALLED_VBMETAIMAGE_TARGET) $(INSTALLED_QEMU_SYSTEMIMAGE) $(QEMU_VERIFIED_BOOT_PARAMS))
|
||||
|
||||
(export AVBTOOL=$(AVBTOOL); $(MK_VBMETA_BOOT_KERNEL_CMDLINE_SH) $(INSTALLED_VBMETAIMAGE_TARGET) \
|
||||
$(INSTALLED_SYSTEMIMAGE_TARGET) $(QEMU_VERIFIED_BOOT_PARAMS))
|
||||
|
||||
systemimage: $(QEMU_VERIFIED_BOOT_PARAMS)
|
||||
droidcore: $(QEMU_VERIFIED_BOOT_PARAMS)
|
||||
endif
|
||||
|
||||
endif
|
||||
# -----------------------------------------------------------------
|
||||
# The emulator package
|
||||
|
|
|
@ -23,15 +23,35 @@ USE_OPENGL_RENDERER := true
|
|||
# Emulator doesn't support sparse image format.
|
||||
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
|
||||
|
||||
# ~140 MB vendor image. Please adjust system image / vendor image sizes
|
||||
# when finalizing them. The partition size needs to be a multiple of image
|
||||
# block size: 4096.
|
||||
BOARD_VENDORIMAGE_PARTITION_SIZE := 146800640
|
||||
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
|
||||
# emulator is Non-A/B device
|
||||
AB_OTA_UPDATER := false
|
||||
|
||||
# emulator needs super.img
|
||||
BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
|
||||
|
||||
BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
||||
|
||||
# 3G + header
|
||||
BOARD_SUPER_PARTITION_SIZE := 3229614080
|
||||
BOARD_SUPER_PARTITION_GROUPS := emulator_dynamic_partitions
|
||||
BOARD_EMULATOR_DYNAMIC_PARTITIONS_PARTITION_LIST := \
|
||||
system \
|
||||
vendor
|
||||
|
||||
# 3G
|
||||
BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE := 3221225472
|
||||
else ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true)
|
||||
# Enable dynamic system image size and reserved 64MB in it.
|
||||
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 67108864
|
||||
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 67108864
|
||||
else
|
||||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
|
||||
BOARD_VENDORIMAGE_PARTITION_SIZE := 146800640
|
||||
endif
|
||||
|
||||
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
|
||||
BOARD_FLASH_BLOCK_SIZE := 512
|
||||
DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml
|
||||
|
||||
BOARD_SEPOLICY_DIRS += device/generic/goldfish/sepolicy/common
|
||||
|
||||
# TODO(b/125540538): Remove when emulator uses dynamic partitions
|
||||
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
|
||||
|
|
|
@ -29,8 +29,8 @@ TARGET_CPU_VARIANT := generic
|
|||
TARGET_CPU_ABI := armeabi-v7a
|
||||
TARGET_CPU_ABI2 := armeabi
|
||||
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
include build/make/target/board/BoardConfigGsiCommon.mk
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
|
||||
|
||||
|
|
|
@ -52,8 +52,8 @@ TARGET_2ND_ARCH_VARIANT := armv8-a
|
|||
TARGET_2ND_CPU_VARIANT := generic
|
||||
endif
|
||||
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
include build/make/target/board/BoardConfigGsiCommon.mk
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ TARGET_ARCH_VARIANT := x86
|
|||
|
||||
TARGET_PRELINK_MODULE := false
|
||||
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
include build/make/target/board/BoardConfigGsiCommon.mk
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
|
||||
# Resize to 4G to accomodate ASAN and CTS
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296
|
||||
|
|
|
@ -23,9 +23,8 @@ TARGET_2ND_ARCH := x86
|
|||
TARGET_2ND_ARCH_VARIANT := x86_64
|
||||
|
||||
TARGET_PRELINK_MODULE := false
|
||||
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
include build/make/target/board/BoardConfigGsiCommon.mk
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ TARGET_TRANSLATE_2ND_ARCH := true
|
|||
BUILD_BROKEN_DUP_RULES := true
|
||||
|
||||
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
include build/make/target/board/BoardConfigGsiCommon.mk
|
||||
include build/make/target/board/BoardConfigEmuCommon.mk
|
||||
|
||||
# Resize to 4G to accomodate ASAN and CTS
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 4294967296
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
|
||||
# The system image of aosp_arm-userdebug is a GSI for the devices with:
|
||||
# - ARM 32 bits user space
|
||||
# - 64 bits binder interface
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
|
||||
# The system image of aosp_arm64-userdebug is a GSI for the devices with:
|
||||
# - ARM 64 bits user space
|
||||
# - 64 bits binder interface
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
|
||||
# The system image of aosp_x86-userdebug is a GSI for the devices with:
|
||||
# - x86 32 bits user space
|
||||
# - 64 bits binder interface
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
|
||||
# The system image of aosp_x86_64-userdebug is a GSI for the devices with:
|
||||
# - x86 64 bits user space
|
||||
# - 64 bits binder interface
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
|
||||
# aosp_x86 with arm libraries needed by binary translation.
|
||||
|
||||
|
@ -31,13 +32,6 @@ include $(SRC_TARGET_DIR)/product/full_x86.mk
|
|||
# Enable dynamic partition size
|
||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
|
||||
|
||||
# Enable A/B update
|
||||
AB_OTA_UPDATER := true
|
||||
AB_OTA_PARTITIONS := system
|
||||
PRODUCT_PACKAGES += \
|
||||
update_engine \
|
||||
update_verifier
|
||||
|
||||
# Needed by Pi newly launched device to pass VtsTrebleSysProp on GSI
|
||||
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
|
||||
|
||||
|
|
Loading…
Reference in a new issue