summaryrefslogtreecommitdiff
path: root/util/docker/coreboot-sdk
diff options
context:
space:
mode:
Diffstat (limited to 'util/docker/coreboot-sdk')
-rw-r--r--util/docker/coreboot-sdk/Dockerfile33
1 files changed, 15 insertions, 18 deletions
diff --git a/util/docker/coreboot-sdk/Dockerfile b/util/docker/coreboot-sdk/Dockerfile
index eb725c9cbc..91543e9467 100644
--- a/util/docker/coreboot-sdk/Dockerfile
+++ b/util/docker/coreboot-sdk/Dockerfile
@@ -1,19 +1,16 @@
-# This dockerfile is not meant to be used directly by docker. The
-# {{}} variables are replaced with values by the makefile. Please generate
-# the docker image for this file by running:
+# Generate the docker image for this file by running:
#
# make coreboot-sdk
-#
-# Variables can be updated on the make command line or left blank to use
-# the default values set by the makefile.
-#
-# SDK_VERSION is used to name the version of the coreboot sdk to use.
-# Typically, this corresponds to the toolchain version. This
-# is used to identify this docker image.
-# DOCKER_COMMIT is the coreboot Commit-ID to build the toolchain from.
FROM debian:sid AS coreboot-sdk
+# The coreboot Commit-ID to build the toolchain from.
+ARG DOCKER_COMMIT
+# The version of the coreboot sdk to use. Typically, this corresponds to the
+# toolchain version. This is used to identify this docker image.
+ARG SDK_VERSION
+ARG CROSSGCC_PARAM
+
RUN \
useradd -p locked -m coreboot && \
apt-get -qq update && \
@@ -93,12 +90,12 @@ RUN \
cd /tmp && \
git clone https://review.coreboot.org/coreboot && \
cd coreboot && \
- git checkout {{DOCKER_COMMIT}}; \
- if echo {{CROSSGCC_PARAM}} | grep -q ^all; then \
+ git checkout ${DOCKER_COMMIT}; \
+ if echo ${CROSSGCC_PARAM} | grep -q ^all; then \
make -C /tmp/coreboot/util/crossgcc/ build_clang \
BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc; \
fi; \
- make -C /tmp/coreboot/util/crossgcc/ {{CROSSGCC_PARAM}} \
+ make -C /tmp/coreboot/util/crossgcc/ ${CROSSGCC_PARAM} \
BUILD_LANGUAGES=c,ada CPUS=$(nproc) DEST=/opt/xgcc && \
rm -rf /tmp/coreboot
@@ -107,12 +104,12 @@ RUN mkdir /home/coreboot/.ccache && \
mkdir /home/coreboot/cb_build && \
chown coreboot:coreboot /home/coreboot/cb_build && \
echo "export PATH=$PATH:/opt/xgcc/bin" >> /home/coreboot/.bashrc && \
- echo "export SDK_VERSION={{SDK_VERSION}}" >> /home/coreboot/.bashrc && \
- echo "export SDK_COMMIT={{DOCKER_COMMIT}}" >> /home/coreboot/.bashrc
+ echo "export SDK_VERSION=${SDK_VERSION}" >> /home/coreboot/.bashrc && \
+ echo "export SDK_COMMIT=${DOCKER_COMMIT}" >> /home/coreboot/.bashrc
ENV PATH $PATH:/opt/xgcc/bin
-ENV SDK_VERSION={{SDK_VERSION}}
-ENV SDK_COMMIT={{DOCKER_COMMIT}}
+ENV SDK_VERSION=${SDK_VERSION}
+ENV SDK_COMMIT=${DOCKER_COMMIT}
USER coreboot
FROM coreboot-sdk