roh has uploaded this change for review.

View Change

add simple gangupdater for multiple octsim boards

Change-Id: Ic10572c121ac55586ec43126b63d69529757132b
---
A contrib/flash_all_octsim.sh
1 file changed, 22 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/96/26896/1
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 change 26896. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: Ic10572c121ac55586ec43126b63d69529757132b
Gerrit-Change-Number: 26896
Gerrit-PatchSet: 1
Gerrit-Owner: roh <jsteiger@sysmocom.de>
Gerrit-MessageType: newchange