1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

build: add build using docker

This commit is contained in:
Pavol Rusnak 2017-11-04 01:56:05 +01:00
parent a067dca054
commit ad517f376a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 38 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,4 +5,5 @@
__pycache__/
_attic/
build/
build-docker/
emu.config

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
# initialize from the image
FROM debian:9
# install build tools and dependencies
RUN apt-get update && apt-get install -y \
build-essential git python3-pip \
gcc-arm-none-eabi libnewlib-arm-none-eabi \
gcc-multilib
RUN pip3 install click pyblake2 scons
RUN pip3 install --no-deps git+https://github.com/trezor/python-trezor.git@master
# workarounds for weird default install
RUN ln -s python3 /usr/bin/python
ENV SCONS_LIB_DIR=/usr/local/lib/python3.5/dist-packages/scons-3.0.0
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8

18
build-docker.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
IMAGE=trezor-core-build
TAG=${1:-master}
docker build -t $IMAGE .
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 && \
make vendorheader && \
make build_boardloader && \
make build_bootloader && \
make build_prodtest && \
make build_firmware"