diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2019-03-04 11:43:03 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-05 09:43:49 -0800 |
commit | 982d179a872f2459623edaf9bdfbb8c5925429e7 (patch) | |
tree | 2530f6408eec0f06d9503e3b5fbc5620532cb78b /Makefile.rules | |
parent | 46222787a6b3c620836967f1010b8d22e1d96b31 (diff) | |
download | chrome-ec-982d179a872f2459623edaf9bdfbb8c5925429e7.tar.gz |
Makefiles.rules: Fix free space message on boards with no flash
kukui_scp has no flash, so let's just print the leftover space
in RAM instead.
BRANCH=none
BUG=b:123327630
TEST=make buildall -j 2>&1 | grep "still available" | sort > avail
before and after this change, only this line changes:
*** -29956 bytes in flash and 468976 bytes in RAM still available on kukui_scp ****
*** 468976 bytes in RAM still available on kukui_scp ****
TEST=kukui_scp does not appear in "Tightest boards' RW flash"
summary.
TEST=make savesizes/newsizes still reports changes in RAM space
on kukui_scp
Change-Id: I4e17a142777ae20bb8e8c66b5402edf2838250a3
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1496685
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile.rules b/Makefile.rules index 8178d519a8..f2a3c89651 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -347,10 +347,14 @@ cmd_size=$(Q)awk '\ /^FLASH/ {flash_size = strtonum($$3)} \ /__ram_free =/ {ram_free = strtonum($$1)} \ END {room_free = flash_size - image_size; \ - print room_free > "$(out)/RW/space_free_flash.txt"; \ print ram_free > "$(out)/RW/space_free_ram.txt"; \ - printf (" *** %s bytes in flash and %s bytes in RAM still available on $(BOARD) ****\n", \ - room_free, ram_free)}' $(out)/RW/$(PROJECT).RW.map + printf " *** "; \ + if (flash_size > 0) { \ + print room_free > "$(out)/RW/space_free_flash.txt"; \ + printf ("%s bytes in flash and ", room_free);\ + } \ + printf ("%s bytes in RAM still available on $(BOARD) ****\n", ram_free) \ + }' $(out)/RW/$(PROJECT).RW.map endif build/host/%.info: run-% |