Skip to content

Commit 23a6aed

Browse files
committed
feat(docker): do not pre-compile utilities
- partial revert of 9c3128f - we are going to store toolchains in separate repository, it is more convenient to compile coreboot utilities inside the container rather than store them also in the separate repository Signed-off-by: AtomicFS <[email protected]>
1 parent 9216098 commit 23a6aed

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docker/coreboot/Dockerfile

+20-1
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,32 @@ RUN apt-get update && \
6969
rm -rf /var/lib/apt/lists/* && \
7070
mkdir -p "${TOOLSDIR}"
7171

72+
73+
#=============
74+
# "toolchain" stage to build the coreboot toolchain
75+
FROM base AS toolchain
76+
77+
# Compile coreboot utilities
78+
WORKDIR $TOOLSDIR
79+
RUN git clone --depth 1 "https://review.coreboot.org/coreboot.git" -b "${COREBOOT_VERSION}"
80+
WORKDIR $TOOLSDIR/coreboot
81+
RUN make -C util/ifdtool install && \
82+
make -C util/cbfstool install
83+
84+
85+
#=============
86+
# "final" stage is the actual product with everything included
87+
FROM base AS final
88+
7289
# Let coreboot know the toolchain path
7390
ENV XGCCPATH=${TOOLSDIR}/coreboot/util/crossgcc/xgcc/bin/
7491

92+
# Copy over things from previous stage(s)
93+
COPY --from=toolchain /usr/local/bin/* /usr/local/bin/
7594
# Add pre-compiled coreboot toolchain and utils
7695
COPY coreboot-${COREBOOT_VERSION}/xgcc-${TARGETARCH} ${TOOLSDIR}/coreboot/util/crossgcc/xgcc
7796
COPY coreboot-${COREBOOT_VERSION}/utils-${TARGETARCH}/* /usr/local/bin/
78-
RUN git clone --depth 1 https://github.com/platomav/MEAnalyzer.git ${TOOLSDIR}/MEAnalyzer/
97+
RUN git clone --depth 1 "https://github.com/platomav/MEAnalyzer.git" "${TOOLSDIR}/MEAnalyzer/"
7998

8099
# Prepare SSH for interactive debugging
81100
RUN mkdir -p /run/sshd && \

0 commit comments

Comments
 (0)