Merge "Change the condition for building super_empty.img."

This commit is contained in:
Yifan Hong
2019-07-01 20:51:38 +00:00
committed by Gerrit Code Review
5 changed files with 54 additions and 19 deletions

View File

@@ -4536,6 +4536,19 @@ $(PROGUARD_DICT_ZIP) :
endif # TARGET_BUILD_APPS
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
# Dump variables used by build_super_image.py (for building super.img and super_empty.img).
# $(1): output file
define dump-super-image-info
$(call dump-dynamic-partitions-info,$(1))
$(if $(filter true,$(AB_OTA_UPDATER)), \
echo "ab_update=true" >> $(1))
endef
endif # PRODUCT_USE_DYNAMIC_PARTITIONS
# -----------------------------------------------------------------
# super partition image (dist)
@@ -4544,13 +4557,6 @@ ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
# BOARD_SUPER_PARTITION_SIZE must be defined to build super image.
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
# Dump variables used by build_super_image.py.
define dump-super-image-info
$(call dump-dynamic-partitions-info,$(1))
$(if $(filter true,$(AB_OTA_UPDATER)), \
echo "ab_update=true" >> $(1))
endef
ifneq (true,$(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS))
# For real devices and for dist builds, build super image from target files to an intermediate directory.
@@ -4631,7 +4637,7 @@ endif # PRODUCT_BUILD_SUPER_PARTITION == "true"
# -----------------------------------------------------------------
# super empty image
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
INSTALLED_SUPERIMAGE_EMPTY_TARGET := $(PRODUCT_OUT)/super_empty.img
@@ -4647,7 +4653,7 @@ $(INSTALLED_SUPERIMAGE_EMPTY_TARGET): $(LPMAKE) $(BUILD_SUPER_IMAGE)
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET))
endif # BOARD_SUPER_PARTITION_SIZE != ""
endif # PRODUCT_BUILD_SUPER_PARTITION == "true"
endif # PRODUCT_USE_DYNAMIC_PARTITIONS == "true"
# -----------------------------------------------------------------

View File

@@ -890,17 +890,13 @@ ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
# Must not be empty.
# - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that belongs to this group.
# If empty, no partitions belong to this group, and the sum of sizes is effectively 0.
$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \
$(eval BOARD_$(group)_PARTITION_LIST ?=) \
$(eval .KATI_READONLY := BOARD_$(group)_PARTITION_LIST) \
)
ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true)
$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \
$(eval BOARD_$(group)_SIZE := $(strip $(BOARD_$(group)_SIZE))) \
$(if $(BOARD_$(group)_SIZE),,$(error BOARD_$(group)_SIZE must not be empty)) \
$(eval .KATI_READONLY := BOARD_$(group)_SIZE) \
$(eval BOARD_$(group)_PARTITION_LIST ?=) \
$(eval .KATI_READONLY := BOARD_$(group)_PARTITION_LIST) \
)
endif # PRODUCT_BUILD_SUPER_PARTITION
# BOARD_*_PARTITION_LIST: a list of the following tokens
valid_super_partition_list := system vendor product product_services odm