Merge "Add BOARD_SUPER_PARTITION_*"

am: 254bd9a10a

Change-Id: Iada0cb6fe92ecf090a3c37bb3bd73335a2e63a8c
This commit is contained in:
Yifan Hong 2018-06-22 16:40:15 -07:00 committed by android-build-merger
commit 6423900f83
2 changed files with 22 additions and 0 deletions

View file

@ -1285,6 +1285,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