X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-bringup%2Fturnon_chaoskey;h=9ad809122bd847139239ebc77d10b56a1886c96f;hp=8ac8479e337a7e0a537972b6bafc85772334c47f;hb=96835cc841ff7afad0b4d2fe4b63f26b951da122;hpb=165868999f45f4572ff2585fcb3986974a5bbd5c diff --git a/ao-bringup/turnon_chaoskey b/ao-bringup/turnon_chaoskey index 8ac8479e..9ad80912 100755 --- a/ao-bringup/turnon_chaoskey +++ b/ao-bringup/turnon_chaoskey @@ -1,14 +1,14 @@ #!/bin/sh -if [ -x /usr/bin/dfu-util ]; then - DFU_UTIL=/usr/bin/dfu-util +if [ -x `which dfu-util` ]; then + DFU_UTIL=`which dfu-util` else echo "Can't find dfu-util! Aborting." exit 1 fi -if [ -x /usr/bin/ao-usbload ]; then - USBLOAD=/usr/bin/ao-usbload +if [ -x `which ao-usbload` ]; then + USBLOAD=`which ao-usbload` else echo "Can't find ao-usbload! Aborting." exit 1 @@ -24,21 +24,17 @@ echo "Expectations:" echo "\tChaosKey v$VERSION powered from USB" echo -FLASH_FILE=~/altusmetrumllc/Binaries/loaders/chaoskey-v1.0-altos-flash-*.bin -ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf +FLASH_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-all-*.bin +#ALTOS_FILE=~/altusmetrumllc/Binaries/chaoskey-v1.0-*.elf -$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || exit 1 +$DFU_UTIL -a 0 -s 0x08000000:leave -D $FLASH_FILE || true -sleep 2 +#sleep 2 -$USBLOAD --serial=1 $ALTOS_FILE || exit 1 +#$USBLOAD --serial=1 $ALTOS_FILE || exit 1 -sleep 1 +sleep 3 -serial=`dmesg | grep 'on chaoskey' | tail -1 | sed 's/.*chaoskey \([0-9a-f][0-9a-f]*\) on chaoskey.*/\1/'` - -echo 'Testing ChaosKey' $serial - -./test-chaoskey $serial +./test-chaoskey exit $?