mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
build: unify build-docker.sh and build-docker.gcc_source.sh
This commit is contained in:
parent
fc9bc85ea3
commit
04cdb68ed2
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
_attic/
|
@ -18,14 +18,14 @@ ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/$TOOL
|
||||
|
||||
RUN cd /opt && wget $TOOLCHAIN_URL && tar xfj $TOOLCHAIN_LONGVER-$TOOLCHAIN_FLAVOR.tar.bz2
|
||||
|
||||
# setup toolchain
|
||||
|
||||
ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH
|
||||
|
||||
# install additional tools
|
||||
|
||||
RUN apt-get install -y protobuf-compiler libprotobuf-dev
|
||||
|
||||
# setup toolchain
|
||||
|
||||
ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH
|
||||
|
||||
# install python tools
|
||||
|
||||
RUN pip3 install click pyblake2 scons protobuf
|
||||
|
@ -26,13 +26,17 @@ RUN cd /opt/$TOOLCHAIN_LONGVER && ./install-sources.sh --skip_steps=mingw32
|
||||
RUN cd /opt/$TOOLCHAIN_LONGVER && ./build-prerequisites.sh --skip_steps=mingw32
|
||||
RUN cd /opt/$TOOLCHAIN_LONGVER && ./build-toolchain.sh --skip_steps=mingw32,manual
|
||||
|
||||
# install additional tools
|
||||
|
||||
RUN apt-get install -y protobuf-compiler libprotobuf-dev
|
||||
|
||||
# setup toolchain
|
||||
|
||||
ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH
|
||||
|
||||
# install python tools
|
||||
|
||||
RUN pip3 install click pyblake2 scons
|
||||
RUN pip3 install click pyblake2 scons protobuf
|
||||
RUN pip3 install --no-deps git+https://github.com/trezor/python-trezor.git@master
|
||||
|
||||
# workarounds for weird default install
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
IMAGE=trezor-core-build.gcc_source
|
||||
TAG=${1:-master}
|
||||
|
||||
docker build -t $IMAGE -f Dockerfile.gcc_source .
|
||||
|
||||
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 clean vendor build_boardloader build_bootloader build_prodtest build_firmware"
|
@ -1,7 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
IMAGE=trezor-core-build
|
||||
if [ "$1" = "--gcc_source" ]; then
|
||||
DOCKERFILE=Dockerfile.gcc_source
|
||||
IMAGE=trezor-core-build.gcc_source
|
||||
shift
|
||||
else
|
||||
DOCKERFILE=Dockerfile
|
||||
IMAGE=trezor-core-build
|
||||
fi
|
||||
|
||||
TAG=${1:-master}
|
||||
REPOSITORY=${2:-trezor}
|
||||
|
||||
@ -11,7 +19,7 @@ else
|
||||
REPOSITORY=https://github.com/$REPOSITORY/trezor-core.git
|
||||
fi
|
||||
|
||||
docker build -t $IMAGE .
|
||||
docker build -t $IMAGE -f $DOCKERFILE .
|
||||
|
||||
docker run -t -v $(pwd):/local -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
|
||||
git clone $REPOSITORY trezor-core && \
|
||||
|
Loading…
Reference in New Issue
Block a user