Add option to allow product makefiles to skip building super_empty.img
This change doesn't change the condition for building super_empty.img, it just add a toggle PRODUCT_BUILD_SUPER_EMPTY_IMAGE that product makefiles can use to skip building super_empty.img. Products that don't use super_empty at all, for example GSI, can set this option to ensure the super_empty.img is not built. Bug: 183068624 Test: "m dist" on GSI and check the build artifacts under OUT and DIST directories, and check the contents of *-img-*.zip Change-Id: I54943952873d2d297fd9d18cbe14742bc12ae9c6
This commit is contained in:
@@ -4621,6 +4621,8 @@ define dump-dynamic-partitions-info
|
|||||||
echo "lpmake=$(notdir $(LPMAKE))" >> $(1)
|
echo "lpmake=$(notdir $(LPMAKE))" >> $(1)
|
||||||
$(if $(filter true,$(PRODUCT_BUILD_SUPER_PARTITION)), $(if $(BOARD_SUPER_PARTITION_SIZE), \
|
$(if $(filter true,$(PRODUCT_BUILD_SUPER_PARTITION)), $(if $(BOARD_SUPER_PARTITION_SIZE), \
|
||||||
echo "build_super_partition=true" >> $(1)))
|
echo "build_super_partition=true" >> $(1)))
|
||||||
|
$(if $(BUILDING_SUPER_EMPTY_IMAGE), \
|
||||||
|
echo "build_super_empty_partition=true" >> $(1))
|
||||||
$(if $(filter true,$(BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE)), \
|
$(if $(filter true,$(BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE)), \
|
||||||
echo "build_retrofit_dynamic_partitions_ota_package=true" >> $(1))
|
echo "build_retrofit_dynamic_partitions_ota_package=true" >> $(1))
|
||||||
echo "super_metadata_device=$(BOARD_SUPER_PARTITION_METADATA_DEVICE)" >> $(1)
|
echo "super_metadata_device=$(BOARD_SUPER_PARTITION_METADATA_DEVICE)" >> $(1)
|
||||||
@@ -5490,9 +5492,7 @@ endif # PRODUCT_BUILD_SUPER_PARTITION == "true"
|
|||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# super empty image
|
# super empty image
|
||||||
|
ifdef BUILDING_SUPER_EMPTY_IMAGE
|
||||||
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
|
||||||
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
|
|
||||||
|
|
||||||
INSTALLED_SUPERIMAGE_EMPTY_TARGET := $(PRODUCT_OUT)/super_empty.img
|
INSTALLED_SUPERIMAGE_EMPTY_TARGET := $(PRODUCT_OUT)/super_empty.img
|
||||||
$(INSTALLED_SUPERIMAGE_EMPTY_TARGET): intermediates := $(call intermediates-dir-for,PACKAGING,super_empty)
|
$(INSTALLED_SUPERIMAGE_EMPTY_TARGET): intermediates := $(call intermediates-dir-for,PACKAGING,super_empty)
|
||||||
@@ -5506,8 +5506,7 @@ $(INSTALLED_SUPERIMAGE_EMPTY_TARGET): $(LPMAKE) $(BUILD_SUPER_IMAGE)
|
|||||||
|
|
||||||
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET))
|
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_EMPTY_TARGET))
|
||||||
|
|
||||||
endif # BOARD_SUPER_PARTITION_SIZE != ""
|
endif # BUILDING_SUPER_EMPTY_IMAGE
|
||||||
endif # PRODUCT_USE_DYNAMIC_PARTITIONS == "true"
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
@@ -460,6 +460,25 @@ ifeq ($(PRODUCT_BUILD_VBMETA_IMAGE),false)
|
|||||||
endif
|
endif
|
||||||
.KATI_READONLY := BUILDING_VBMETA_IMAGE
|
.KATI_READONLY := BUILDING_VBMETA_IMAGE
|
||||||
|
|
||||||
|
# Are we building a super_empty image
|
||||||
|
BUILDING_SUPER_EMPTY_IMAGE :=
|
||||||
|
ifeq ($(PRODUCT_BUILD_SUPER_EMPTY_IMAGE),)
|
||||||
|
ifeq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
||||||
|
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
|
||||||
|
BUILDING_SUPER_EMPTY_IMAGE := true
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
else ifeq ($(PRODUCT_BUILD_SUPER_EMPTY_IMAGE),true)
|
||||||
|
ifneq (true,$(PRODUCT_USE_DYNAMIC_PARTITIONS))
|
||||||
|
$(error PRODUCT_BUILD_SUPER_EMPTY_IMAGE set to true, but PRODUCT_USE_DYNAMIC_PARTITIONS is not true)
|
||||||
|
endif
|
||||||
|
ifeq ($(BOARD_SUPER_PARTITION_SIZE),)
|
||||||
|
$(error PRODUCT_BUILD_SUPER_EMPTY_IMAGE set to true, but BOARD_SUPER_PARTITION_SIZE is not defined)
|
||||||
|
endif
|
||||||
|
BUILDING_SUPER_EMPTY_IMAGE := true
|
||||||
|
endif
|
||||||
|
.KATI_READONLY := BUILDING_SUPER_EMPTY_IMAGE
|
||||||
|
|
||||||
###########################################
|
###########################################
|
||||||
# Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR
|
# Now we can substitute with the real value of TARGET_COPY_OUT_VENDOR
|
||||||
ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder))
|
ifeq ($(TARGET_COPY_OUT_VENDOR),$(_vendor_path_placeholder))
|
||||||
|
@@ -381,6 +381,7 @@ _product_single_value_vars += PRODUCT_BUILD_RECOVERY_IMAGE
|
|||||||
_product_single_value_vars += PRODUCT_BUILD_BOOT_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_VENDOR_BOOT_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_VENDOR_BOOT_IMAGE
|
||||||
_product_single_value_vars += PRODUCT_BUILD_VBMETA_IMAGE
|
_product_single_value_vars += PRODUCT_BUILD_VBMETA_IMAGE
|
||||||
|
_product_single_value_vars += PRODUCT_BUILD_SUPER_EMPTY_IMAGE
|
||||||
|
|
||||||
# List of boot jars delivered via apex
|
# List of boot jars delivered via apex
|
||||||
_product_list_vars += PRODUCT_UPDATABLE_BOOT_JARS
|
_product_list_vars += PRODUCT_UPDATABLE_BOOT_JARS
|
||||||
|
@@ -1027,6 +1027,7 @@ def AddImagesToTargetFiles(filename):
|
|||||||
AddVBMeta(output_zip, partitions, "vbmeta", vbmeta_partitions)
|
AddVBMeta(output_zip, partitions, "vbmeta", vbmeta_partitions)
|
||||||
|
|
||||||
if OPTIONS.info_dict.get("use_dynamic_partitions") == "true":
|
if OPTIONS.info_dict.get("use_dynamic_partitions") == "true":
|
||||||
|
if OPTIONS.info_dict.get("build_super_empty_partition") == "true":
|
||||||
banner("super_empty")
|
banner("super_empty")
|
||||||
AddSuperEmpty(output_zip)
|
AddSuperEmpty(output_zip)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user