Merge changes from topic "dpgroup"

* changes:
  Add dynamic partition info to target files
  BOARD_{GROUP}_SIZE must not be empty.
  Add _a and _b to group names to super.
This commit is contained in:
Yifan Hong 2018-10-26 18:23:53 +00:00 committed by Gerrit Code Review
commit 779dc30020
2 changed files with 13 additions and 5 deletions

View file

@ -2941,11 +2941,12 @@ define build-superimage-target-args
--metadata-slots $(if $(1),2,1) \
--device-size $(BOARD_SUPER_PARTITION_SIZE) \
$(foreach group,$(BOARD_SUPER_PARTITION_GROUPS), \
--group $(group):$(BOARD_$(call to-upper,$(group))_SIZE) \
--group $(group)$(1):$(BOARD_$(call to-upper,$(group))_SIZE) \
$(if $(1), --group $(group)_b:$(BOARD_$(call to-upper,$(group))_SIZE)) \
$(foreach name,$(BOARD_$(call to-upper,$(group))_PARTITION_LIST), \
--partition $(name)$(1):readonly:$(if $(2),$(call read-size-of-partitions,$(name)),0):$(group) \
--partition $(name)$(1):readonly:$(if $(2),$(call read-size-of-partitions,$(name)),0):$(group)$(1) \
$(if $(2), --image $(name)$(1)=$(call images-for-partitions,$(name))) \
$(if $(1), --partition $(name)_b:readonly:0:$(group)) \
$(if $(1), --partition $(name)_b:readonly:0:$(group)_b) \
))
endef
@ -3660,6 +3661,13 @@ ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
$(hide) echo $(call build-superimage-target-args,$(if $(filter true,$(AB_OTA_UPDATER)),_a,)) \
>> $(zip_root)/META/misc_info.txt
endif
ifneq ($(BOARD_SUPER_PARTITION_GROUPS),)
$(hide) echo "super_partition_groups=$(BOARD_SUPER_PARTITION_GROUPS)" > $(zip_root)/META/dynamic_partitions_info.txt
$(foreach group,$(BOARD_SUPER_PARTITION_GROUPS), \
echo "$(group)_size=$(BOARD_$(call to-upper,$(group))_SIZE)" >> $(zip_root)/META/dynamic_partitions_info.txt; \
$(if $(BOARD_$(call to-upper,$(group))_PARTITION_LIST), \
echo "$(group)_partition_list=$(BOARD_$(call to-upper,$(group))_PARTITION_LIST)" >> $(zip_root)/META/dynamic_partitions_info.txt;))
endif
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH MKBOOTIMG=$(MKBOOTIMG) \
build/make/tools/releasetools/add_img_to_target_files -a -v -p $(HOST_OUT) $(zip_root)

View file

@ -991,11 +991,11 @@ ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true)
# For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
# BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
# - BOARD_{GROUP}_SIZE: The maximum sum of sizes of all partitions in the group.
# If empty, no limit is enforced on the sum of sizes for this group.
# 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)_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) \