move dev stuff to hack/dev

This commit is contained in:
2025-10-12 18:12:22 -07:00
parent b2b916c2b7
commit 46fb31ef99
12 changed files with 14 additions and 14 deletions

View File

@@ -0,0 +1,11 @@
FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 AS build
RUN apk --no-cache add busybox-static
RUN mkdir -p /tmp/initramfs/bin && cp /bin/busybox.static /tmp/initramfs/bin/busybox && \
chroot /tmp/initramfs /bin/busybox --install -s /bin && \
chroot /tmp/initramfs ln -s /bin/init /init && \
cd /tmp/initramfs && \
find . | cpio -R 0:0 --ignore-devno --renumber-inodes -o -H newc --quiet > /initramfs && \
rm -rf /tmp/initramfs
FROM scratch AS final
COPY --from=build /initramfs /initramfs

View File

@@ -0,0 +1,10 @@
FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 AS build
ARG TARGETPLATFORM
RUN if [ "${TARGETPLATFORM}" = "linux/amd64" ] || [ "${TARGETPLATFORM}" = "linux/x86_64" ]; then \
apk --no-cache add ovmf edk2-shell; cp /usr/share/ovmf/bios.bin /ovmf.fd; fi
RUN if [ "${TARGETPLATFORM}" = "linux/arm64" ] || [ "${TARGETPLATFORM}" = "linux/aarch64" ]; then \
apk --no-cache add aavmf edk2-shell; cp /usr/share/AAVMF/QEMU_EFI.fd /ovmf.fd; fi
FROM scratch AS final
COPY --from=build /ovmf.fd /ovmf.fd
COPY --from=build /usr/share/edk2-shell/ShellFull.efi /shell.efi