roh has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896?usp=email )
Change subject: add simple gangupdater for multiple octsim boards
......................................................................
add simple gangupdater for multiple octsim boards
Change-Id: Ic10572c121ac55586ec43126b63d69529757132b
---
A contrib/flash_all_octsim.sh
1 file changed, 22 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Objections:
Jenkins Builder: Fails
diff --git a/contrib/flash_all_octsim.sh b/contrib/flash_all_octsim.sh
new file mode 100644
index 0000000..4f4c89b
--- /dev/null
+++ b/contrib/flash_all_octsim.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# this script is to scan for octsim boards, sort them by usb path and call dfu-util on
each to update the board
+# basic flow
+# - get usb path and serialno tupel from dfu-util -l
+# - reformat and sort by usbpath, drop the usbpath (grep cut tr sort cut)
+# - flash the boards
+
+# TODO:
+# - error handling
+# - filter dfu-util output and generate nice summary
+
+dfu-util -l \
+ | grep "^Found" \
+ | grep "\[1d50:6141\]" \
+ | cut -d ' ' -f 8,13 \
+ | tr -d ',' \
+ | cut -d \" -f 2,4 \
+ | tr \" ' ' \
+ | sort \
+ | cut -d ' ' -f 2
+ | xargs -n 1 dfu-util -d 1d50:6141 -D sysmoOCTSIM.bin -R -p
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ic10572c121ac55586ec43126b63d69529757132b
Gerrit-Change-Number: 26896
Gerrit-PatchSet: 1
Gerrit-Owner: roh <jsteiger(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>