mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 14:00:18 +00:00
fix(autoconfigure): apply the actions properly in the root
This commit is contained in:
@@ -65,13 +65,8 @@ set -- "${@}" \
|
||||
-drive "if=pflash,file=${FINAL_DIR}/ovmf-boot.fd,format=raw,readonly=on" \
|
||||
-device nvme,drive=disk1,serial=cafebabe
|
||||
|
||||
if [ "${DISK_BOOT}" = "1" ]; then
|
||||
set -- "${@}" \
|
||||
-drive "if=none,file=${FINAL_DIR}/sprout.img,format=raw,id=disk1,readonly=on"
|
||||
else
|
||||
set -- "${@}" \
|
||||
-drive "if=none,file=fat:rw:${FINAL_DIR}/efi,format=raw,id=disk1"
|
||||
fi
|
||||
set -- "${@}" \
|
||||
-drive "if=none,file=${FINAL_DIR}/sprout.img,format=raw,id=disk1,readonly=on"
|
||||
|
||||
set -- "${@}" -name "sprout ${TARGET_ARCH}"
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ COPY xen.efi /work/XEN.EFI
|
||||
COPY xen.cfg /work/XEN.CFG
|
||||
COPY initramfs /work/INITRAMFS
|
||||
COPY edera-splash.png /work/EDERA-SPLASH.PNG
|
||||
COPY bls.conf /work/BLS.CONF
|
||||
RUN truncate -s128MiB 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 && \
|
||||
@@ -20,6 +21,8 @@ RUN truncate -s128MiB sprout.img && \
|
||||
mkfs.vfat -F32 -n EFI sprout.img && \
|
||||
mmd -i sprout.img ::/EFI && \
|
||||
mmd -i sprout.img ::/EFI/BOOT && \
|
||||
mmd -i sprout.img ::/LOADER && \
|
||||
mmd -i sprout.img ::/LOADER/ENTRIES && \
|
||||
mcopy -i sprout.img ${EFI_NAME}.EFI ::/EFI/BOOT/ && \
|
||||
mcopy -i sprout.img KERNEL.EFI ::/EFI/BOOT/ && \
|
||||
mcopy -i sprout.img SHELL.EFI ::/EFI/BOOT/ && \
|
||||
@@ -28,6 +31,7 @@ RUN truncate -s128MiB sprout.img && \
|
||||
mcopy -i sprout.img SPROUT.TOML ::/ && \
|
||||
mcopy -i sprout.img EDERA-SPLASH.PNG ::/ && \
|
||||
mcopy -i sprout.img INITRAMFS ::/ && \
|
||||
mcopy -i sprout.img BLS.CONF ::/LOADER/ENTRIES/ && \
|
||||
mv sprout.img /sprout.img
|
||||
|
||||
FROM scratch AS final
|
||||
|
||||
@@ -108,6 +108,7 @@ if [ "${SKIP_SPROUT_BUILD}" != "1" ]; then
|
||||
cp "hack/dev/configs/${SPROUT_CONFIG_NAME}.sprout.toml" "${FINAL_DIR}/sprout.toml"
|
||||
cp "hack/dev/configs/xen.cfg" "${FINAL_DIR}/xen.cfg"
|
||||
cp "hack/dev/assets/edera-splash.png" "${FINAL_DIR}/edera-splash.png"
|
||||
cp "hack/dev/configs/bls.conf" "${FINAL_DIR}/bls.conf"
|
||||
|
||||
mkdir -p "${FINAL_DIR}/efi/EFI/BOOT"
|
||||
cp "${FINAL_DIR}/sprout.efi" "${FINAL_DIR}/efi/EFI/BOOT/${EFI_NAME}.EFI"
|
||||
|
||||
4
hack/dev/configs/autoconfigure.sprout.toml
Normal file
4
hack/dev/configs/autoconfigure.sprout.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
version = 1
|
||||
|
||||
[defaults]
|
||||
autoconfigure = true
|
||||
4
hack/dev/configs/bls.conf
Normal file
4
hack/dev/configs/bls.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
title Boot Linux
|
||||
linux /efi/boot/kernel.efi
|
||||
options console=hvc0
|
||||
initrd /initramfs
|
||||
Reference in New Issue
Block a user