mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
24 lines
515 B
Bash
Executable File
24 lines
515 B
Bash
Executable File
#!/bin/bash
|
|
|
|
dirname $0
|
|
|
|
# Build trezor firmware
|
|
docker build . | tee firmware-docker-build.log
|
|
|
|
# Parse image name
|
|
IMAGE=`grep "Successfully built" firmware-docker-build.log | tail -n1 | cut -d' ' -f3`
|
|
echo "IMAGE NAME: $IMAGE"
|
|
|
|
docker run -t $IMAGE true
|
|
|
|
# Parse container name
|
|
CONTAINER=`docker ps -a | grep true | head -n1 | cut -d' ' -f1`
|
|
echo "CONTAINER NAME: $CONTAINER"
|
|
|
|
docker cp $CONTAINER:/trezor-mcu/firmware/trezor.bin .
|
|
|
|
echo "---------------------"
|
|
echo "Firmware fingerprint:"
|
|
|
|
sha256sum trezor.bin
|