aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile58
1 files changed, 48 insertions, 10 deletions
diff --git a/Dockerfile b/Dockerfile
index 82f370c..2e1df97 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,35 +1,73 @@
FROM ubuntu:16.04
RUN apt-get -y update \
- && apt-get -y install bzip2 bc cpio g++ make locales patch perl python unzip rsync wget zip \
+ && apt-get -y install \
+ bc \
+ bison \
+ build-essential \
+ bzip2 \
+ clang \
+ cpio \
+ curl \
+ g++ \
+ git \
+ libboost-dev \
+ libncurses5-dev \
+ libz-dev \
+ locales \
+ libtool \
+ make \
+ patch \
+ perl \
+ python \
+ unzip \
+ rsync \
+ wget \
+ zip \
&& rm -rf /var/lib/apt/lists/*
+
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
-RUN useradd -d /home/trimui -m -s /bin/bash -U trimui
-RUN ln -s /home/trimui/buildroot/output/host/usr /opt/trimui-toolchain
-
-USER trimui
-WORKDIR /home/trimui
+ENV BUILDROOT_HOST_DIR /var/lib/trimui-toolchain
+ENV BUILDROOT_SYSROOT ${BUILDROOT_HOST_DIR}/usr/arm-buildroot-linux-gnueabi/sysroot/
ENV BR_VER 2016.05
ENV BR_DIR buildroot-${BR_VER}
ENV BR_TAR ${BR_DIR}.tar.bz2
ENV BR_URL https://buildroot.org/downloads/${BR_TAR}
+
+
+RUN useradd -d /home/trimui -m -s /bin/bash -U trimui
+RUN mkdir -p ${BUILDROOT_HOST_DIR} && \
+ chown -R trimui:trimui ${BUILDROOT_HOST_DIR} && \
+ ln -s ${BUILDROOT_HOST_DIR}/usr /opt/trimui-toolchain
+
+
+USER trimui
+WORKDIR /home/trimui
+
+COPY trimui_config trimui_config
+
RUN echo ${BR_DIR} && wget ${BR_URL} && ls -l && tar xf ${BR_TAR} && rm -f ${BR_TAR}
RUN ln -s ${BR_DIR} buildroot
WORKDIR /home/trimui/buildroot
-COPY libpng12.patch libpng12.patch
-RUN patch -p0 < libpng12.patch
+RUN make trimui_defconfig BR2_EXTERNAL=../trimui_config && make toolchain
-COPY defconfig defconfig
+COPY *.patch .
+RUN for patch in *.patch; do patch -p0 < $patch; done
+RUN make
+
+WORKDIR /home/trimui
-RUN make defconfig BR2_DEFCONFIG=./defconfig && make toolchain libpng sdl sdl_image bzip2
+COPY extract_rootfs.sh .
+RUN ./extract_rootfs.sh
+RUN mkdir -p $BUILDROOT_SYSROOT/usr && cp -R trimui_rootfs/usr/trimui $BUILDROOT_SYSROOT/usr/trimui
VOLUME /home/trimui/workspace
WORKDIR /home/trimui/workspace