docker: Support building for multiple architectures
Add instructions on how to build the file for multiple architectures. Add a message indicating what is happening. Update the documentation as well. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -6,9 +6,18 @@ FROM ubuntu:jammy-20240808
|
||||
LABEL org.opencontainers.image.authors="Tom Rini <trini@konsulko.com>"
|
||||
LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container"
|
||||
|
||||
# Used by docker to set the target platform: valid values are linux/arm64/v8
|
||||
# and linux/amd64
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Used by docker to set the build platform: the only valid value is linux/amd64
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
# Make sure apt is happy
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN echo "Building on $BUILDPLATFORM, for target $TARGETPLATFORM"
|
||||
|
||||
# Add LLVM repository
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
|
||||
Reference in New Issue
Block a user