Allows skipping building the super images for partial builds.

Previously, setting PRODUCT_BUILD_SUPER_PARTITION to false for a partial
build (with PRODUCT_USE_DYNAMIC_PARTITIONS == true) would fail to
include necessary keys in misc_info.txt that are required when merging
two partial builds to create a dynamic-partition-enabled mixed build.

This change ensures these necessary keys are included even when
PRODUCT_BUILD_SUPER_PARTITION is false. Setting
PRODUCT_BUILD_SUPER_PARTITION to false causes partial builds to skip
building super.img and super_empty.img, instead relying on these images
to come from the final merged build.

Bug: 135752763
Bug: 134764140
Test: Building & booting a dynamic-partition-enabled mixed build, and
inspecting partial builds' logs / out folder to ensure that
super.img/super_empty.img were not created.

Change-Id: I99431a9a342e9b0617510e250597f3024ef39322
Merged-In: I99431a9a342e9b0617510e250597f3024ef39322
(cherry picked from commit 0bf940cace)
This commit is contained in:
Daniel Norman 2019-06-10 12:50:19 -07:00 committed by Hridya Valsaraju
parent 2e73d20c0b
commit ef212270fe
2 changed files with 8 additions and 5 deletions

View file

@ -918,10 +918,6 @@ BOARD_SUPER_PARTITION_PARTITION_LIST := \
$(BOARD_$(group)_PARTITION_LIST))
.KATI_READONLY := BOARD_SUPER_PARTITION_PARTITION_LIST
endif # PRODUCT_USE_DYNAMIC_PARTITIONS
ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true)
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true)
@ -981,8 +977,11 @@ BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE :=
endif # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
endif # BOARD_SUPER_PARTITION_SIZE
BOARD_SUPER_PARTITION_BLOCK_DEVICES ?=
.KATI_READONLY := BOARD_SUPER_PARTITION_BLOCK_DEVICES
BOARD_SUPER_PARTITION_METADATA_DEVICE ?=
.KATI_READONLY := BOARD_SUPER_PARTITION_METADATA_DEVICE
BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE ?=
.KATI_READONLY := BOARD_BUILD_RETROFIT_DYNAMIC_PARTITIONS_OTA_PACKAGE
$(foreach device,$(call to-upper,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)), \
@ -991,7 +990,7 @@ $(foreach device,$(call to-upper,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)), \
$(error BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE must not be empty)) \
$(eval .KATI_READONLY := BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE))
endif # PRODUCT_BUILD_SUPER_PARTITION
endif # PRODUCT_USE_DYNAMIC_PARTITIONS
# ###############################################################
# Set up final options.

View file

@ -395,6 +395,10 @@ def process_misc_info_txt(
merged_info_dict[key] = '%s %s' % (
system_info_dict.get(key, ''),
merged_info_dict.get(key, ''))
# Ensure that add_img_to_target_files rebuilds super_empty.img. This flag
# may have been set to false in the partial builds to prevent duplicate
# building of super.img and super_empty.img.
merged_dict['build_super_partition'] = 'true'
output_misc_info_txt = os.path.join(
output_target_files_temp_dir,