2018-02-18 23:41:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2018-03-30 16:54:09 +00:00
|
|
|
IMAGE=trezor-mcu-build-emulator64
|
2018-02-18 23:41:34 +00:00
|
|
|
TAG=${1:-master}
|
2018-03-30 16:54:09 +00:00
|
|
|
ELFFILE=build/trezor-emulator64-$TAG
|
2018-02-18 23:41:34 +00:00
|
|
|
|
|
|
|
docker build -f Dockerfile.emulator -t $IMAGE .
|
|
|
|
docker run -t -v $(pwd)/build:/build:z $IMAGE /bin/sh -c "\
|
|
|
|
git clone https://github.com/trezor/trezor-mcu && \
|
|
|
|
cd trezor-mcu && \
|
|
|
|
git checkout $TAG && \
|
|
|
|
git submodule update --init && \
|
|
|
|
make -C vendor/nanopb/generator/proto && \
|
|
|
|
make -C firmware/protob && \
|
|
|
|
EMULATOR=1 make && \
|
|
|
|
EMULATOR=1 make -C emulator && \
|
|
|
|
EMULATOR=1 make -C firmware && \
|
|
|
|
cp firmware/trezor.elf /$ELFFILE"
|