summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2018-06-11 22:28:05 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-06-14 01:31:52 -0700
commite299988d4648071d945583643bc87589d528e5b2 (patch)
tree41800f0b5f8d3a2030a07793e9ba5325b078cbb2 /Makefile.rules
parent27fb3c44b131ac4a5d6994906fcf30a04e0432c8 (diff)
downloadchrome-ec-e299988d4648071d945583643bc87589d528e5b2.tar.gz
Makefile.rules: Have buildall list boards with lowest space remaining
On successful build reports something like the following: Tightest boards' RW images, bytes left: zinger : 1580 minimuffin: 1584 wheatley : 2644 BUG=b:110043829 BRANCH=none TEST=make buildall emits a list of boards like shown above Change-Id: I36723cfdc9ae33e5861c1e0dfca322433520dce8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/1096042 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 320cc7ec27..242031bf53 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -153,6 +153,12 @@ buildall: build_boards
$(MAKE) runtests
@touch .tests-passed
@echo "$@ completed successfully!"
+ @echo "Tightest boards' RW images, bytes left:"
+ @grep . build/*/RW/space_left.txt |\
+ sed 's,build/\([^/]*\)/RW/space_left.txt:\(.*\)$$,\2 \1,' | \
+ sort -n |head -3 | while read size board; do \
+ printf "%-10s: %6d\n" $$board $$size; \
+ done
.PHONY: try_build_tests
try_build_tests: $(foreach b, $(BOARDS), tests-$(b))
@@ -298,6 +304,7 @@ cmd_size=$(Q)awk '\
/__image_size =/ {image_size = strtonum($$1)} \
/^FLASH/ {flash_size = strtonum($$3)} \
END {room_left = flash_size - image_size; \
+ print room_left > "$(out)/RW/space_left.txt"; \
printf (" *** %s bytes still available in flash on $(BOARD) ****\n", \
room_left)}' $(out)/RW/$(PROJECT).RW.map
endif