3 if [ -x /usr/bin/dfu-util ]; then
4 DFU_UTIL=/usr/bin/dfu-util
6 echo "Can't find dfu-util! Aborting."
10 if [ -x /usr/bin/ao-usbload ]; then
11 USBLOAD=/usr/bin/ao-usbload
13 echo "Can't find ao-usbload! Aborting."
20 echo "ChaosKey v$VERSION Turn-On and Calibration Program"
21 echo "Copyright 2015 by Keith Packard. Released under GPL v2"
24 echo "\tChaosKey v$VERSION powered from USB"
27 FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin
28 ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf
30 $DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1
34 $USBLOAD --serial=1 $ALTOS_FILE || exit 1