forked from openkylin/platform_build
Print more info of the image size stats.
Bug: 5620615 Before this change it only reports the limit if the real size exceeeds or approaches the limit. Change-Id: Ie1737d6ba2dc2d57ad82c487990e109882526d6e
This commit is contained in:
parent
6f219744d8
commit
99bcbeb355
|
@ -1865,7 +1865,6 @@ $(if $(2), \
|
|||
size=$$(for i in $(1); do $(call get-file-size,$$i); echo +; done; echo 0); \
|
||||
total=$$(( $$( echo "$$size" ) )); \
|
||||
printname=$$(echo -n "$(1)" | tr " " +); \
|
||||
echo "$$printname total size is $$total"; \
|
||||
img_blocksize=$(call image-size-from-data-size,$(BOARD_FLASH_BLOCK_SIZE)); \
|
||||
if [ "$(3)" == "yaffs" ]; then \
|
||||
reservedblocks=8; \
|
||||
|
@ -1877,6 +1876,7 @@ $(if $(2), \
|
|||
reserve=$$(((twoblocks > onepct ? twoblocks : onepct) + \
|
||||
reservedblocks * img_blocksize)); \
|
||||
maxsize=$$(($(2) - reserve)); \
|
||||
echo "$$printname maxsize=$$maxsize blocksize=$$img_blocksize total=$$total reserve=$$reserve"; \
|
||||
if [ "$$total" -gt "$$maxsize" ]; then \
|
||||
echo "error: $$printname too large ($$total > [$(2) - $$reserve])"; \
|
||||
false; \
|
||||
|
|
Loading…
Reference in New Issue