initial commit

This commit is contained in:
2025-10-01 16:45:04 -07:00
commit 17ca11f239
21 changed files with 610 additions and 0 deletions

22
boot/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM --platform=$BUILDPLATFORM debian:trixie@sha256:fd8f5a1df07b5195613e4b9a0b6a947d3772a151b81975db27d47f093f60c6e6 AS build
ARG BUILDPLATFORM
ARG EFI_NAME
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
parted dosfstools mtools && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
COPY sprout.efi /work/${EFI_NAME}.EFI
COPY kernel.efi /work/KERNEL.EFI
RUN truncate -s256MiB sprout.img && \
parted --script sprout.img mklabel gpt > /dev/null 2>&1 && \
parted --script sprout.img mkpart primary fat32 1MiB 100% > /dev/null 2>&1 && \
parted --script sprout.img set 1 esp on > /dev/null 2>&1 && \
mkfs.vfat -F32 -n EFI sprout.img && \
mmd -i sprout.img ::/EFI && \
mmd -i sprout.img ::/EFI/BOOT && \
mcopy -i sprout.img ${EFI_NAME}.EFI ::/EFI/BOOT/ && \
mcopy -i sprout.img KERNEL.EFI ::/EFI/BOOT/ && \
mv sprout.img /sprout.img
FROM scratch AS final
COPY --from=build /sprout.img /sprout.img