blob: d6243e26c5f9a2d8c8650a64dc880abe98f5f368 (
plain) (
tree)
|
|
#!/bin/bash
set -e
echo "##########################################"
echo "# Flashing bootloader"
echo "##########################################"
./bin/flash-target bootloader
echo "##########################################"
echo "# Flashing temporary HSM firmware"
echo "##########################################"
./bin/flash-target firmware/cli-test
./bin/reset
sleep 5
echo "##########################################"
echo "# Uploading bitstream"
echo "##########################################"
./bin/cryptech_upload --fpga --username wheel
echo "##########################################"
echo "# Programming AVR"
echo "##########################################"
avrdude -c usbtiny -p attiny828 -U flash:w:firmware/tamper.hex
echo "##########################################"
echo "# Flashing official STM32 firmware"
echo "##########################################"
./bin/cryptech_upload --firmware --username wheel
./bin/reset
sleep 15
echo "##########################################"
echo "# Checking FPGA"
echo "##########################################"
./bin/cryptech_runcmd --username wheel "fpga show cores"
|