docker: introduce Dockerfile.builder for openbios-builder container

This introduces a new Dockerfile.builder file that can be used by docker
build to generate a container that can build OpenBIOS based upon Debian
11.2 and the crosstool compilers from kernel.org.

The installed cross-compilers allow the building of SPARC32, SPARC64 and
PPC binaries.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
Mark Cave-Ayland 2022-02-19 15:45:13 +00:00
parent 0fbb6f73c1
commit 1017e4adda
1 changed files with 19 additions and 0 deletions

19
docker/Dockerfile.builder Normal file
View File

@ -0,0 +1,19 @@
FROM ghcr.io/openbios/fcode-utils:master AS cross
RUN apt-get update && \
apt-get install -y wget xz-utils tar && \
wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/x86_64-gcc-10.1.0-nolibc-sparc64-linux.tar.xz && \
tar Jxf x86_64-gcc-10.1.0-nolibc-sparc64-linux.tar.xz && \
rm -f x86_64-gcc-10.1.0-nolibc-sparc64-linux.tar.xz && \
wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/x86_64-gcc-10.1.0-nolibc-powerpc-linux.tar.xz && \
tar Jxf x86_64-gcc-10.1.0-nolibc-powerpc-linux.tar.xz && \
rm -f x86_64-gcc-10.1.0-nolibc-powerpc-linux.tar.xz
FROM ghcr.io/openbios/fcode-utils:master AS builder
COPY --from=cross /gcc-10.1.0-nolibc /gcc-10.1.0-nolibc
RUN apt-get update && \
apt-get install -y make xsltproc gcc gcc-multilib zip
ENV PATH /gcc-10.1.0-nolibc/sparc64-linux/bin:/gcc-10.1.0-nolibc/powerpc-linux/bin:$PATH