mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-31 18:40:56 +00:00
rework docker build script
This commit is contained in:
parent
b5eecb30be
commit
62ce3c6988
@ -13,14 +13,9 @@ RUN apt-get install -y build-essential git gcc-arm-none-eabi=$GCC_ARM_VERSION py
|
||||
|
||||
# clone the source code
|
||||
|
||||
RUN git clone https://github.com/libopencm3/libopencm3 && git clone https://github.com/trezor/trezor-mcu
|
||||
RUN git clone https://github.com/libopencm3/libopencm3
|
||||
|
||||
# build libopencm3
|
||||
|
||||
ENV LIBOPENCM3_GITREV 8a15cec6bf99f59065879a14895fb8af8a8a53e7
|
||||
RUN cd libopencm3 && git checkout $LIBOPENCM3_GITREV && make
|
||||
|
||||
# build the firmware
|
||||
|
||||
ENV TREZOR_MCU_GITREV v1.3.0
|
||||
RUN cd trezor-mcu && git checkout $TREZOR_MCU_GITREV && git submodule update --init && make && cd firmware && make
|
||||
|
@ -1,9 +1,18 @@
|
||||
#!/bin/bash
|
||||
IMAGETAG=trezor-mcu-build
|
||||
FIRMWARETAG=v1.3.0
|
||||
|
||||
docker rmi $IMAGETAG || :
|
||||
docker build -t $IMAGETAG .
|
||||
docker run -t -v $(pwd):/output $IMAGETAG /bin/cp /trezor-mcu/firmware/trezor.bin /output
|
||||
docker run -t -v $(pwd):/output $IMAGETAG /bin/sh -c "\
|
||||
git clone https://github.com/trezor/trezor-mcu && \
|
||||
cd trezor-mcu && \
|
||||
git checkout $FIRMWARETAG && \
|
||||
git submodule update --init && \
|
||||
make && \
|
||||
cd firmware && \
|
||||
make && \
|
||||
cp trezor.bin /output \
|
||||
"
|
||||
|
||||
echo "---------------------"
|
||||
echo "Firmware fingerprint:"
|
||||
|
Loading…
Reference in New Issue
Block a user