summaryrefslogtreecommitdiff
path: root/Containerfile
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-13 15:43:47 +0200
committerFelix Morgner <felix.morgner@ost.ch>2025-07-13 15:43:47 +0200
commit0d0dea1a8337595985c919d6329b01b38b0bd8d8 (patch)
tree6af97adb3876103ab825769ed54999162a66316d /Containerfile
parent771a1fabce59ee3614a578c894c46fc56d6db0ac (diff)
downloadteachos-toolchain-0d0dea1a8337595985c919d6329b01b38b0bd8d8.tar.xz
teachos-toolchain-0d0dea1a8337595985c919d6329b01b38b0bd8d8.zip
build: import jOS toolchain config
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