summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-02-19 15:45:13 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-02-24 20:05:50 +0000
commit1017e4addade10717fdcb12b79c97bf53faacfc2 (patch)
tree639b4bb36ce9168a7b6ad35345e903bc936731de
parent0fbb6f73c18039ec91d67fcfc205ff9ca92e228f (diff)
downloadqemu-openbios-1017e4addade10717fdcb12b79c97bf53faacfc2.tar.gz
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>
-rw-r--r--docker/Dockerfile.builder19
1 files changed, 19 insertions, 0 deletions
diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder
new file mode 100644
index 00000000..b4abf7f0
--- /dev/null
+++ b/docker/Dockerfile.builder
@@ -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