summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2015-07-08 15:17:28 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-16 00:32:59 +0000
commit7e29ee3b8e48a70724f2342d9271c1f4dbec8675 (patch)
tree7c76e8beaa9ff8438a1964ed4dd900ef19f806a2
parent5d970f4b536d0a47d9e638619fadd7c9a0272d51 (diff)
downloadchrome-ec-7e29ee3b8e48a70724f2342d9271c1f4dbec8675.tar.gz
Ryu: Add flash_dfu makefile rule to use dfu-util
Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: Ic67fa454fe61c8b3419934c98ade75099163f7f2 Reviewed-on: https://chromium-review.googlesource.com/285022 Trybot-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
-rw-r--r--Makefile.rules4
-rwxr-xr-xboard/ryu/dfu3
2 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 5f52fc38c8..8ccb54540a 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -275,6 +275,10 @@ flash: $(out)/ec.bin
flash_ec: $(out)/ec.bin
./util/flash_ec --board $(BOARD) --image $(out)/ec.bin
+.PHONY: flash_dfu
+flash_dfu: $(out)/ec.bin
+ sudo ./board/$(BOARD)/dfu $(out)/ec.bin
+
.PHONY: clean
clean:
-rm -rf $(out)
diff --git a/board/ryu/dfu b/board/ryu/dfu
new file mode 100755
index 0000000000..313ca24341
--- /dev/null
+++ b/board/ryu/dfu
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+dfu-util -a 0 -d 0483:df11 -s 0x08000000:262144 -D $1