2014-06-18 17:08:31 -07:00
|
|
|
#!/bin/bash
|
2014-07-07 07:59:37 -07:00
|
|
|
IMAGETAG=trezor-mcu-build
|
2015-07-04 04:49:30 -07:00
|
|
|
FIRMWARETAG=${1:-master}
|
2014-12-25 05:43:32 -08:00
|
|
|
|
2014-07-07 07:59:37 -07:00
|
|
|
docker build -t $IMAGETAG .
|
2015-03-05 13:09:30 -08:00
|
|
|
docker run -t -v $(pwd)/output:/output $IMAGETAG /bin/sh -c "\
|
2015-07-04 04:49:30 -07:00
|
|
|
git clone https://github.com/trezor/trezor-mcu && \
|
2014-12-27 07:33:44 -08:00
|
|
|
cd trezor-mcu && \
|
|
|
|
git checkout $FIRMWARETAG && \
|
|
|
|
git submodule update --init && \
|
|
|
|
make && \
|
|
|
|
cd firmware && \
|
|
|
|
make && \
|
2015-04-28 12:20:51 -07:00
|
|
|
cp trezor.bin /output/trezor-$FIRMWARETAG.bin"
|
2014-06-18 17:08:31 -07:00
|
|
|
|
2014-06-18 17:28:22 -07:00
|
|
|
echo "---------------------"
|
|
|
|
echo "Firmware fingerprint:"
|
2014-06-18 17:08:31 -07:00
|
|
|
|
2015-03-05 13:09:30 -08:00
|
|
|
sha256sum output/trezor-$FIRMWARETAG.bin
|