Merge "Fix dynamic partition size check for devices with recovery" am: 55ebd61486 am: d8da08795d

am: 45d5ba6ce1

Change-Id: I0a03fb5234d3a0448e72c241a6b8e38b4efd1dc3
This commit is contained in:
Yifan Hong 2019-02-26 18:38:57 -08:00 committed by android-build-merger
commit baff3dda9e
1 changed files with 13 additions and 0 deletions

View File

@ -2190,6 +2190,19 @@ endif # INSTALLED_BOOTIMAGE_TARGET
$(INSTALLED_SYSTEMIMAGE_TARGET): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH) $(INSTALLED_SYSTEMIMAGE_TARGET): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH)
@echo "Install system fs image: $@" @echo "Install system fs image: $@"
$(copy-file-to-target) $(copy-file-to-target)
ifdef RECOVERY_FROM_BOOT_PATCH
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true)
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_SIZE),)
# system image size is dynamic, hence system_size in generated_system_image_info.txt does not
# have room for recovery from boot patch. Increase system_size so that check-all-partition-sizes
# accounts for the size of the patch.
sed -i'.bak' -e 's/^system_size=.*$$/system_size='"$$(( \
$(call read-image-prop-dictionary,$(systemimage_intermediates)/generated_system_image_info.txt,system_size) + \
$$($(call get-file-size,$(RECOVERY_FROM_BOOT_PATCH))) ))"'/' \
$(systemimage_intermediates)/generated_system_image_info.txt
endif
endif
endif
$(hide) $(call assert-max-image-size,$@ $(RECOVERY_FROM_BOOT_PATCH),\ $(hide) $(call assert-max-image-size,$@ $(RECOVERY_FROM_BOOT_PATCH),\
$(call read-image-prop-dictionary,\ $(call read-image-prop-dictionary,\
$(systemimage_intermediates)/generated_system_image_info.txt,system_size)) $(systemimage_intermediates)/generated_system_image_info.txt,system_size))