summaryrefslogtreecommitdiff
path: root/Containerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Containerfile')
-rw-r--r--Containerfile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Containerfile b/Containerfile
new file mode 100644
index 0000000..d988874
--- /dev/null
+++ b/Containerfile
@@ -0,0 +1,44 @@
+FROM docker.io/archlinux:latest AS build
+
+ARG BINUTILS_VERSION
+ARG GCC_VERSION
+ARG GDB_VERSION
+ARG NEWLIB_VERSION
+ARG TARGET
+
+RUN /scripts/0000-prepare-os.sh
+RUN /scripts/0100-download.sh
+RUN /scripts/0200-build-target-binutils.sh
+RUN /scripts/0300-build-bootstrap-gcc.sh
+RUN /scripts/0400-build-target-newlib.sh
+RUN /scripts/0500-build-target-gcc.sh
+RUN /scripts/0600-build-target-gdb.sh
+
+FROM docker.io/archlinux:latest
+
+ARG EMULATOR=x86
+
+RUN pacman --noconfirm -Syu && \
+ pacman --noconfirm --needed -S \
+ cmake \
+ flex \
+ git \
+ gmp \
+ grub \
+ guile \
+ libelf \
+ libisl \
+ libisoburn \
+ libmpc \
+ mpfr \
+ mtools \
+ ninja \
+ openssh \
+ qemu-system-$EMULATOR \
+ qemu-ui-curses \
+ xxhash \
+ zlib
+
+COPY --from=build /opt/toolchain /opt/toolchain
+
+ENV PATH=/opt/toolchain/bin:$PATH