Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45d5ba6c authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

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

am: d8da0879

Change-Id: I77f449314639293c5148ba0beebd3fcb98f820ef
parents cdca8596 d8da0879
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2191,6 +2191,19 @@ endif # INSTALLED_BOOTIMAGE_TARGET
$(INSTALLED_SYSTEMIMAGE_TARGET): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH)
	@echo "Install system fs image: $@"
	$(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),\
	    $(call read-image-prop-dictionary,\
	        $(systemimage_intermediates)/generated_system_image_info.txt,system_size))