Merge "Build image for clean super partition."
This commit is contained in:
commit
10f1a69a2b
2 changed files with 20 additions and 4 deletions
|
@ -2803,19 +2803,20 @@ ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
|
|||
ifdef BOARD_SUPER_PARTITION_SIZE
|
||||
|
||||
INSTALLED_SUPERIMAGE_TARGET := $(PRODUCT_OUT)/super.img
|
||||
INSTALLED_SUPERIMAGE_EMPTY_TARGET := $(PRODUCT_OUT)/super_empty.img
|
||||
|
||||
$(INSTALLED_SUPERIMAGE_TARGET): $(call images-for-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))
|
||||
|
||||
# For A/B devices, super partition always contains sub-partitions in the _a slot, because this
|
||||
# image should only be used for bootstrapping / initializing the device. When flashing the image,
|
||||
# bootloader fastboot should always mark _a slot as bootable.
|
||||
ifeq ($(AB_OTA_UPDATER),true)
|
||||
$(INSTALLED_SUPERIMAGE_TARGET): PRIVATE_PARTITION_SUFFIX=_a
|
||||
$(INSTALLED_SUPERIMAGE_TARGET): PRIVATE_METADATA_SLOTS=2
|
||||
$(INSTALLED_SUPERIMAGE_TARGET) $(INSTALLED_SUPERIMAGE_EMPTY_TARGET): PRIVATE_PARTITION_SUFFIX=_a
|
||||
$(INSTALLED_SUPERIMAGE_TARGET) $(INSTALLED_SUPERIMAGE_EMPTY_TARGET): PRIVATE_METADATA_SLOTS=2
|
||||
else
|
||||
$(INSTALLED_SUPERIMAGE_TARGET): PRIVATE_METADATA_SLOTS=1
|
||||
$(INSTALLED_SUPERIMAGE_TARGET) $(INSTALLED_SUPERIMAGE_EMPTY_TARGET): PRIVATE_METADATA_SLOTS=1
|
||||
endif # AB_OTA_UPDATER
|
||||
|
||||
|
||||
$(INSTALLED_SUPERIMAGE_TARGET): $(HOST_OUT_EXECUTABLES)/lpmake
|
||||
$< \
|
||||
--sparse \
|
||||
|
@ -2829,6 +2830,17 @@ $(INSTALLED_SUPERIMAGE_TARGET): $(HOST_OUT_EXECUTABLES)/lpmake
|
|||
|
||||
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_TARGET))
|
||||
|
||||
$(INSTALLED_SUPERIMAGE_EMPTY_TARGET): $(HOST_OUT_EXECUTABLES)/lpmake
|
||||
$< \
|
||||
--metadata-size 65536 \
|
||||
--metadata-slots $(PRIVATE_METADATA_SLOTS) \
|
||||
--device-size $(BOARD_SUPER_PARTITION_SIZE) \
|
||||
--output $@ \
|
||||
$(foreach name,$(BOARD_SUPER_PARTITION_PARTITION_LIST), \
|
||||
--partition $(name)$(PRIVATE_PARTITION_SUFFIX):$$($(UUIDGEN) $(name)$(PRIVATE_SUPER_PARTITION_SUFFIX)):readonly:0)
|
||||
|
||||
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET))
|
||||
|
||||
endif # BOARD_SUPER_PARTITION_SIZE
|
||||
endif # PRODUCT_BUILD_SUPER_PARTITION
|
||||
|
||||
|
|
|
@ -1211,6 +1211,9 @@ systemotherimage: $(INSTALLED_SYSTEMOTHERIMAGE_TARGET)
|
|||
.PHONY: superimage
|
||||
superimage: $(INSTALLED_SUPERIMAGE_TARGET)
|
||||
|
||||
.PHONY: superimage_empty
|
||||
superimage_empty: $(INSTALLED_SUPERIMAGE_EMPTY_TARGET)
|
||||
|
||||
.PHONY: bootimage
|
||||
bootimage: $(INSTALLED_BOOTIMAGE_TARGET)
|
||||
|
||||
|
@ -1233,6 +1236,7 @@ droidcore: files \
|
|||
$(INSTALLED_BPTIMAGE_TARGET) \
|
||||
$(INSTALLED_VENDORIMAGE_TARGET) \
|
||||
$(INSTALLED_ODMIMAGE_TARGET) \
|
||||
$(INSTALLED_SUPERIMAGE_EMPTY_TARGET) \
|
||||
$(INSTALLED_PRODUCTIMAGE_TARGET) \
|
||||
$(INSTALLED_SYSTEMOTHERIMAGE_TARGET) \
|
||||
$(INSTALLED_FILES_FILE) \
|
||||
|
|
Loading…
Reference in a new issue