Print out the tree size of system directory if it failes to build system.img

The tree size gives a good estimate of how big the system.img would be.

Change-Id: Iaadd58e3521b5f76cd9dfdcf384f4d820b9fc71b
This commit is contained in:
Ying Wang
2014-08-13 12:36:05 -07:00
parent ad876835c4
commit 45ff36ee4c

View File

@@ -940,7 +940,11 @@ define build-systemimage-target
skip_fsck=true)
$(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \
./build/tools/releasetools/build_image.py \
$(TARGET_OUT) $(systemimage_intermediates)/system_image_info.txt $(1)
$(TARGET_OUT) $(systemimage_intermediates)/system_image_info.txt $(1) \
|| ( echo "Out of space? the tree size of $(TARGET_OUT) is (MB): " 1>&2 ;\
du -sm $(TARGET_OUT) 1>&2;\
echo "The max is $$(( $(BOARD_SYSTEMIMAGE_PARTITION_SIZE) / 1048576 )) MB." 1>&2 ;\
exit 1 )
endef
$(BUILT_SYSTEMIMAGE): $(FULL_SYSTEMIMAGE_DEPS) $(INSTALLED_FILES_FILE)