Merge "max size of dynamic partitions for AB devices are halved."

am: 185cce598b

Change-Id: Ie22e87c4a9a7d5a5f8dcea1c46e9225d0e950061
This commit is contained in:
Yifan Hong 2018-09-19 17:05:37 -07:00 committed by android-build-merger
commit 091115716b
1 changed files with 7 additions and 5 deletions

View File

@ -2991,13 +2991,15 @@ check_android_partition_sizes: $(call images-for-partitions,$(BOARD_SUPER_PARTIT
check_android_partition_sizes:
partition_size_list="$(call read-size-of-partitions,$(BOARD_SUPER_PARTITION_PARTITION_LIST))"; \
sum_sizes_expr=$$(sed -e 's/ /+/g' <<< "$${partition_size_list}"); \
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); \
max_size_tail=$(if $(filter true,$(AB_OTA_UPDATER))," / 2"); \
max_size_expr=$(BOARD_SUPER_PARTITION_SIZE)$${max_size_tail}; \
if [ $$(( $${sum_sizes_expr} )) -gt $$(( $${max_size_expr} )) ]; then \
echo "The sum of sizes of all logical partitions is larger than BOARD_SUPER_PARTITION_SIZE$${max_size_tail}:"; \
echo $${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '>' $${max_size_expr} '==' $$(( $${max_size_expr} )); \
exit 1; \
else \
echo 'The sum of sizes of all logical partitions is within BOARD_SUPER_PARTITION_SIZE:' \
$${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '<=' $(BOARD_SUPER_PARTITION_SIZE); \
echo "The sum of sizes of all logical partitions is within BOARD_SUPER_PARTITION_SIZE$${max_size_tail}:"; \
echo $${sum_sizes_expr} '==' $$(( $${sum_sizes_expr} )) '<=' $${max_size_expr} '==' $$(( $${max_size_expr} )); \
fi
endif # BOARD_SUPER_PARTITION_PARTITION_LIST