mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-08 22:40:59 +00:00
bootloader autobuild in docker
This commit is contained in:
parent
a7ef132ce5
commit
da027f7652
12
README.md
12
README.md
@ -8,13 +8,23 @@ http://bitcointrezor.com/
|
||||
How to build TREZOR firmware?
|
||||
-----------------------------
|
||||
|
||||
1. Install Docker (from docker.com or from your distribution repositories)
|
||||
1. <a href="https://docs.docker.com/engine/installation/">Install Docker</a>
|
||||
2. `git clone https://github.com/trezor/trezor-mcu.git`
|
||||
3. `cd trezor-mcu`
|
||||
4. `./firmware-docker-build.sh TAG` (where TAG is v1.3.2 for example, if left blank the script builds latest commit)
|
||||
|
||||
This creates file `output/trezor-TAG.bin` and prints its fingerprint at the last line of the build log.
|
||||
|
||||
How to build TREZOR bootloader?
|
||||
-----------------------------
|
||||
|
||||
1. <a href="https://docs.docker.com/engine/installation/">Install Docker</a>
|
||||
2. `git clone https://github.com/trezor/trezor-mcu.git`
|
||||
3. `cd trezor-mcu`
|
||||
4. `./bootloader-docker-build.sh`
|
||||
|
||||
This creates file `output/bootloader.bin` and prints its fingerprint and size at the last line of the build log.
|
||||
|
||||
How to get fingerprint of firmware signed and distributed by SatoshiLabs?
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
21
bootloader-docker-build.sh
Executable file
21
bootloader-docker-build.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
IMAGETAG=trezor-mcu-build
|
||||
FIRMWARETAG=${1:-master}
|
||||
|
||||
docker build -t $IMAGETAG .
|
||||
docker run -t -v $(pwd)/output:/output $IMAGETAG /bin/sh -c "\
|
||||
git clone https://github.com/trezor/trezor-mcu && \
|
||||
cd trezor-mcu && \
|
||||
git checkout $FIRMWARETAG && \
|
||||
git submodule update --init && \
|
||||
make -C vendor/libopencm3 && \
|
||||
make && \
|
||||
make -C bootloader && \
|
||||
cp bootloader/bootloader.bin /output/bootloader-$FIRMWARETAG.bin"
|
||||
|
||||
echo "---------------------"
|
||||
echo "Bootloader fingerprint:"
|
||||
FILENAME=output/bootloader-$FIRMWARETAG.bin
|
||||
sha256sum "$FILENAME"
|
||||
FILESIZE=$(stat -c%s "$FILENAME")
|
||||
echo "Bootloader size: $FILESIZE bytes (out of 32768 maximum)"
|
@ -15,5 +15,7 @@ docker run -t -v $(pwd)/output:/output $IMAGETAG /bin/sh -c "\
|
||||
|
||||
echo "---------------------"
|
||||
echo "Firmware fingerprint:"
|
||||
|
||||
sha256sum output/trezor-$FIRMWARETAG.bin
|
||||
FILENAME=output/trezor-$FIRMWARETAG.bin
|
||||
sha256sum "$FILENAME"
|
||||
FILESIZE=$(stat -c%s "$FILENAME")
|
||||
echo "Firmware size: $FILESIZE bytes (out of 491520 maximum)"
|
||||
|
Loading…
Reference in New Issue
Block a user