trezor-mcu/Dockerfile

30 lines
970 B
Docker
Raw Normal View History

2014-06-18 15:31:40 -07:00
# initialize from the image
FROM ubuntu:14.04
# add and update package repositories
2014-06-19 10:01:41 -07:00
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A3421AFB && echo "deb http://ppa.launchpad.net/terry.guo/gcc-arm-embedded/ubuntu trusty main" >> /etc/apt/sources.list && apt-get update
2014-06-18 15:31:40 -07:00
2014-06-22 15:37:24 -07:00
# define used versions for pinning
ENV GCC_ARM_VERSION 4-8-2014q2-0trusty9
ENV LIBOPENCM3_GITREV c01f9ee323d06b5325d77cda593a46dfe76ba341
ENV TREZOR_MCU_GITREV e9fd756daad713525fa30bc3a08df4127548383f
2014-06-18 15:31:40 -07:00
# install build tools and dependencies
2014-06-22 15:37:24 -07:00
RUN apt-get install -y build-essential git gcc-arm-none-eabi=$GCC_ARM_VERSION python
2014-06-18 15:31:40 -07:00
# clone the source code
2014-06-22 15:37:24 -07:00
RUN git clone https://github.com/libopencm3/libopencm3 && git clone https://github.com/trezor/trezor-mcu
2014-06-18 15:31:40 -07:00
# build libopencm3
2014-06-22 15:37:24 -07:00
RUN cd libopencm3 && git checkout $LIBOPENCM3_GITREV && make
2014-06-18 15:31:40 -07:00
# build the firmware
2014-06-22 15:37:24 -07:00
RUN cd trezor-mcu && git checkout $TREZOR_MCU_GITREV && git submodule update --init && make && cd firmware && make