summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-01-08 18:15:13 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-09 20:09:47 +0000
commitfaac542536136a7ac4bd1c6cd52e94924b44779e (patch)
tree6646f0984e312e4e90f76e3fc863be48fc0bb6ae /Makefile.rules
parentd1bbc3b869c0d0d659c84f7479b71a3e585e0f78 (diff)
downloadchrome-ec-faac542536136a7ac4bd1c6cd52e94924b44779e.tar.gz
Makefile: Add print-make-vars rule
The Bash-based flash_ec script uses print-baseboard to identify if a board has a baseboard. The newer Python version I'm working on not only uses that information, but reduces the number of board-specific quirks we have encoded in the script by using the CHIP, CHIP_FAMILY, CHIP_VARIANT, and CORE variables to discover quirks. Introduce a print-make-vars rule to be used by the new flash_ec script which is extensible to many variables. BUG=b:145292630 BRANCH=none TEST=make BOARD=... print-make-vars for a few different boards Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ib91123d2b0b36c584db563e192f72a3ac001f330 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1992791 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 38a480f50e..2bfcf88957 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -638,10 +638,22 @@ flash_ec: $(out)/ec.bin
flash_dfu: $(out)/ec.bin
sudo ./$(BDIR)/dfu $(out)/ec.bin
+# Deprecated, use print-make-vars instead
.PHONY: print-baseboard
print-baseboard:
@echo "${BASEBOARD}"
+# Print variables identifying and providing Makefile-specific
+# configuration for each board. The format is one variable per line,
+# in the format KEY=VALUE.
+.PHONY: print-make-vars
+print-make-vars:
+ @echo "BASEBOARD=${BASEBOARD}"
+ @echo "CHIP=${CHIP}"
+ @echo "CHIP_FAMILY=${CHIP_FAMILY}"
+ @echo "CHIP_VARIANT=${CHIP_VARIANT}"
+ @echo "CORE=${CORE}"
+
.PHONY: print-configs
print-configs:
@echo "----------------------------------------------------------------"