From 45b2f9d4fbae507d23ffdd08601bbad6b83c0fd6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 Nov 2024 11:17:26 -0600 Subject: 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 Reviewed-by: Tom Rini --- tools/docker/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools/docker') diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index bc8d1ebbb1e..43cd37070e4 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -6,9 +6,18 @@ FROM ubuntu:jammy-20240808 LABEL org.opencontainers.image.authors="Tom Rini " 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 \ -- cgit v1.2.3