2017-11-04 00:56:05 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
IMAGE=trezor-core-build
|
|
|
|
TAG=${1:-master}
|
|
|
|
|
|
|
|
docker build -t $IMAGE .
|
2018-01-09 20:44:42 +00:00
|
|
|
|
|
|
|
# use the following line instead of the above line
|
|
|
|
# if you want to compile ARM toolchain from source
|
|
|
|
# warning: very long compilation time!
|
|
|
|
|
|
|
|
# docker build -t $IMAGE -f Dockerfile.gcc_source .
|
|
|
|
|
2017-11-04 00:56:05 +00:00
|
|
|
docker run -t -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
|
|
|
|
git clone https://github.com/trezor/trezor-core && \
|
|
|
|
cd trezor-core && \
|
|
|
|
ln -s /build build &&
|
|
|
|
git checkout $TAG && \
|
|
|
|
git submodule update --init --recursive && \
|
2017-11-04 14:01:44 +00:00
|
|
|
make clean vendor vendorheader build_boardloader build_bootloader build_prodtest build_firmware"
|