From 2a4ac55edfbbbdcde605c323e07effcca5716e6f Mon Sep 17 00:00:00 2001 From: Anton Staaf Date: Tue, 19 May 2015 14:41:10 -0700 Subject: [PATCH] Flashing: Add flash_ec rule to simplify flashing The flash_ec rule calls the flash_ec tool, passing the inferred board and image based on where make was run. This means that from a board directory you can run "make flash_ec" and an up to date image will be flashed using flash_ec. Signed-off-by: Anton Staaf BRANCH=None BUG=None TEST=make buildall -j cd board/ryu_p4p5 make flash_ec Change-Id: I51e2a62f4d0de427f8d36e0848941aef742e0d3d Reviewed-on: https://chromium-review.googlesource.com/272264 Tested-by: Anton Staaf Reviewed-by: Randall Spangler Commit-Queue: Anton Staaf Trybot-Ready: Anton Staaf --- Makefile.rules | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.rules b/Makefile.rules index 96d2465078..dad3533803 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -276,6 +276,10 @@ flash: $(out)/ec.bin -c "set BUILD_DIR $(out)"\ -f board/$(BOARD)/openocd-flash.cfg +.PHONY: flash_ec +flash_ec: $(out)/ec.bin + ./util/flash_ec --board $(BOARD) --image $(out)/ec.bin + .PHONY: clean clean: -rm -rf $(out)