1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-23 16:08:17 +00:00
trezor-firmware/firmware-docker-build.sh

22 lines
634 B
Bash
Raw Normal View History

#!/bin/bash
2014-07-07 14:59:37 +00:00
IMAGETAG=trezor-mcu-build
FIRMWARETAG=${1:-master}
2014-12-25 13:43:32 +00:00
2014-07-07 14:59:37 +00:00
docker build -t $IMAGETAG .
docker run -t -v $(pwd)/output:/output $IMAGETAG /bin/sh -c "\
git clone https://github.com/trezor/trezor-mcu && \
2014-12-27 15:33:44 +00:00
cd trezor-mcu && \
git checkout $FIRMWARETAG && \
git submodule update --init && \
2015-12-15 22:01:54 +00:00
make -C vendor/libopencm3 && \
2015-12-14 23:20:34 +00:00
make && \
2015-12-14 23:30:10 +00:00
make -C firmware && \
cp firmware/trezor.bin /output/trezor-$FIRMWARETAG.bin"
echo "---------------------"
echo "Firmware fingerprint:"
2016-02-18 23:24:33 +00:00
FILENAME=output/trezor-$FIRMWARETAG.bin
sha256sum "$FILENAME"
FILESIZE=$(stat -c%s "$FILENAME")
echo "Firmware size: $FILESIZE bytes (out of 491520 maximum)"