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 && \ |
| 8 | apt-get -qqy install gcc g++ make patch python diffutils bison flex \ |
| 9 | git doxygen ccache subversion p7zip-full unrar-free \ |
| 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 && \ |
| 25 | make all_without_gdb CPUS=$(nproc) DEST=/opt/xgcc && \ |
| 26 | cd /root && \ |
| 27 | rm -rf coreboot |
| 28 | |
| 29 | RUN mkdir /home/coreboot/.ccache && \ |
| 30 | chown coreboot:coreboot /home/coreboot/.ccache && \ |
| 31 | mkdir /home/coreboot/cb_build && \ |
| 32 | chown coreboot:coreboot /home/coreboot/cb_build |
| 33 | VOLUME /home/coreboot/.ccache |
| 34 | |
| 35 | ENV PATH $PATH:/opt/xgcc/bin |
| 36 | USER coreboot |