[PATCH 3/9] docker: Support building for multiple architectures

Tom Rini trini at konsulko.com
Mon Nov 4 14:55:57 CET 2024


On Mon, Nov 04, 2024 at 06:39:47AM -0700, Simon Glass wrote:

> Add instructions on how to build the file for multiple architectures.
> Add a message indicating what is happening.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
>  tools/docker/Dockerfile | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
> index 967ac89fbde..c9d794082c8 100644
> --- a/tools/docker/Dockerfile
> +++ b/tools/docker/Dockerfile
> @@ -2,6 +2,9 @@
>  # This Dockerfile is used to build an image containing basic stuff to be used
>  # to build U-Boot and run our test suites.
>  
> +# Build with (for example):
> +# docker buildx build --platform linux/arm64/v8,linux/amd64 --tag sjg20/u-boot-gitlab-ci-runner-multiarch:jammy-20240808-03Nov2024 .
> +
>  FROM ubuntu:jammy-20240808
>  LABEL org.opencontainers.image.authors="Tom Rini <trini at konsulko.com>"
>  LABEL org.opencontainers.image.description=" This image is for building U-Boot inside a container"
> @@ -9,6 +12,10 @@ LABEL org.opencontainers.image.description=" This image is for building U-Boot i
>  # Make sure apt is happy
>  ENV DEBIAN_FRONTEND=noninteractive
>  
> +ARG TARGETPLATFORM
> +ARG BUILDPLATFORM
> +RUN echo "Building $BUILDPLATFORM, for target $TARGETPLATFORM"
> +
>  # Add LLVM repository
>  RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/*
>  RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -

Please update doc/build/docker.rst as well with this change, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241104/c43c4d63/attachment.sig>


More information about the U-Boot mailing list