Patrick Georgi | fe22200 | 2016-09-18 20:11:15 +0200 | [diff] [blame] | 1 | FROM debian:sid |
| 2 | MAINTAINER Martin Roth <gaumless@gmail.com> |
| 3 | |
| 4 | RUN \ |
| 5 | useradd -p locked -m coreboot && \ |
| 6 | apt-get -qq update && \ |
| 7 | apt-get -qq upgrade && \ |
Nico Huber | 6b28fff | 2017-03-12 15:25:17 +0100 | [diff] [blame] | 8 | apt-get -qqy install gcc g++ gnat-6 make patch python diffutils bison \ |
| 9 | flex git doxygen ccache subversion p7zip-full unrar-free \ |
Patrick Georgi | fe22200 | 2016-09-18 20:11:15 +0200 | [diff] [blame] | 10 | m4 wget curl bzip2 vim-common cmake xz-utils pkg-config \ |
| 11 | dh-autoreconf unifont \ |
| 12 | libssl-dev libgmp-dev zlib1g-dev libpci-dev liblzma-dev \ |
| 13 | libyaml-dev libncurses5-dev uuid-dev libusb-dev libftdi-dev \ |
| 14 | libusb-1.0-0-dev libreadline-dev libglib2.0-dev libgmp-dev \ |
| 15 | libelf-dev libxml2-dev libfreetype6-dev && \ |
| 16 | apt-get clean |
| 17 | |
| 18 | COPY buildgcc Makefile* root/coreboot/util/crossgcc/ |
| 19 | COPY patches/ /root/coreboot/util/crossgcc/patches/ |
| 20 | COPY sum/ /root/coreboot/util/crossgcc/sum/ |
| 21 | COPY tarballs/ /root/coreboot/util/crossgcc/tarballs/ |
| 22 | |
| 23 | RUN \ |
| 24 | cd /root/coreboot/util/crossgcc && \ |
Nico Huber | 6b28fff | 2017-03-12 15:25:17 +0100 | [diff] [blame] | 25 | make all_without_gdb \ |
| 26 | BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc && \ |
Patrick Georgi | fe22200 | 2016-09-18 20:11:15 +0200 | [diff] [blame] | 27 | cd /root && \ |
| 28 | rm -rf coreboot |
| 29 | |
| 30 | RUN mkdir /home/coreboot/.ccache && \ |
| 31 | chown coreboot:coreboot /home/coreboot/.ccache && \ |
| 32 | mkdir /home/coreboot/cb_build && \ |
| 33 | chown coreboot:coreboot /home/coreboot/cb_build |
| 34 | VOLUME /home/coreboot/.ccache |
| 35 | |
| 36 | ENV PATH $PATH:/opt/xgcc/bin |
| 37 | USER coreboot |