Add BOARD_SUPER_PARTITION_*

Test: builds
Test: build with BOARD_SUPER_PARTITION_SIZE and
      BOARD_SUPER_PARTITION_PARTITION_LIST defined

Bug: 79106666

Change-Id: Ifcd50ecab22ef096ff1eb386f8d87e16fffdcf5e
This commit is contained in:
Yifan Hong 2018-06-14 13:26:28 -07:00
parent 749062d379
commit 74d07ff8bd
2 changed files with 22 additions and 0 deletions

View File

@ -1275,6 +1275,26 @@ else # TARGET_BUILD_APPS
# Building a full system-- the default is to build droidcore
droid_targets: droidcore dist_files
ifdef USE_LOGICAL_PARTITIONS
ifdef BOARD_SUPER_PARTITION_SIZE
ifdef BOARD_SUPER_PARTITION_PARTITION_LIST
droid_targets: check_android_partition_sizes
.PHONY: check_android_partition_sizes
check_android_partition_sizes: partition_size_list=$(foreach p,$(BOARD_SUPER_PARTITION_PARTITION_LIST),$(BOARD_$(call to-upper,$(p))IMAGE_PARTITION_SIZE))
check_android_partition_sizes: sum_sizes_expr=$(subst $(space),+,$(partition_size_list))
check_android_partition_sizes:
if [ $$(( $(sum_sizes_expr) )) -gt $(BOARD_SUPER_PARTITION_SIZE) ]; then \
echo The sum of sizes of all logical partitions is larger than BOARD_SUPER_PARTITION_SIZE.; \
echo $(sum_sizes_expr) == $$(( $(sum_sizes_expr) )) '>' $(BOARD_SUPER_PARTITION_SIZE); \
exit 1; \
fi
endif # BOARD_SUPER_PARTITION_PARTITION_LIST
endif # BOARD_SUPER_PARTITION_SIZE
endif # USE_LOGICAL_PARTITIONS
endif # TARGET_BUILD_APPS
.PHONY: docs

View File

@ -380,6 +380,8 @@ _product_stash_var_list += \
_product_stash_var_list += \
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE \
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE \
BOARD_SUPER_PARTITION_SIZE \
BOARD_SUPER_PARTITION_PARTITION_LIST \
#
# Mark the variables in _product_stash_var_list as readonly