mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 08:30:16 +00:00
add initial initramfs support, not quite working yet
This commit is contained in:
11
hack/boot.sh
11
hack/boot.sh
@@ -27,14 +27,9 @@ else
|
||||
-chardev stdio,id=stdio0 \
|
||||
-device virtconsole,chardev=stdio0,id=console0
|
||||
|
||||
if [ "${TARGET_ARCH}" = "x86_64" ]; then
|
||||
set -- "${@}" \
|
||||
-vga std
|
||||
else
|
||||
set -- "${@}" \
|
||||
-vga none \
|
||||
-device "virtio-gpu,edid=on,xres=1024,yres=768"
|
||||
fi
|
||||
set -- "${@}" \
|
||||
-vga none \
|
||||
-device "virtio-gpu,edid=on,xres=1024,yres=768"
|
||||
fi
|
||||
|
||||
rm -f "${FINAL_DIR}/ovmf-boot.fd"
|
||||
|
||||
@@ -79,6 +79,8 @@ if [ "${SKIP_VM_BUILD}" != "1" ]; then
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}:${DOCKER_TAG}" -f vm/Dockerfile.ovmf "${FINAL_DIR}"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}" "ovmf.fd" "${FINAL_DIR}/ovmf.fd"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}" "shell.efi" "${FINAL_DIR}/shell.efi"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-initramfs-${TARGET_ARCH}:${DOCKER_TAG}" -f vm/Dockerfile.initramfs "${FINAL_DIR}"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-initramfs-${TARGET_ARCH}" "initramfs" "${FINAL_DIR}/initramfs"
|
||||
fi
|
||||
|
||||
if [ "${SKIP_SPROUT_BUILD}" != "1" ]; then
|
||||
@@ -102,6 +104,7 @@ if [ "${SKIP_SPROUT_BUILD}" != "1" ]; then
|
||||
fi
|
||||
cp "${FINAL_DIR}/sprout.toml" "${FINAL_DIR}/efi/SPROUT.TOML"
|
||||
cp "${FINAL_DIR}/edera-splash.png" "${FINAL_DIR}/efi/EDERA-SPLASH.PNG"
|
||||
cp "${FINAL_DIR}/initramfs" "${FINAL_DIR}/efi/INITRAMFS"
|
||||
fi
|
||||
|
||||
if [ "${SKIP_BOOT_BUILD}" != "1" ]; then
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
version = 1
|
||||
|
||||
[values]
|
||||
default-options = "console=hvc0"
|
||||
default-options = "initrd=\\initramfs init=/bin/sh console=hvc0"
|
||||
|
||||
[actions.welcome]
|
||||
print.text = "Welcome to Sprout!"
|
||||
|
||||
[actions.splash]
|
||||
splash.image = "edera-splash.png"
|
||||
splash.time = 5
|
||||
splash.time = 1
|
||||
|
||||
[actions.chainload-kernel]
|
||||
chainload.path = "$path"
|
||||
chainload.options = ["$default-options"]
|
||||
|
||||
[actions.chainload-shell]
|
||||
chainload.path = "\\EFI\\BOOT\\shell.efi"
|
||||
|
||||
[generators.kernels.matrix]
|
||||
entry.title = "Boot Kernel $name"
|
||||
entry.values.path = "\\EFI\\BOOT\\$name"
|
||||
@@ -21,4 +24,4 @@ entry.actions = ["chainload-kernel"]
|
||||
values.name = ["kernel.efi"]
|
||||
|
||||
[[phases.startup]]
|
||||
actions = ["splash", "welcome"]
|
||||
actions = ["welcome", "splash"]
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
version: 1
|
||||
|
||||
values:
|
||||
default-options: "console=hvc0"
|
||||
|
||||
phases:
|
||||
startup:
|
||||
- actions: ["welcome"]
|
||||
|
||||
actions:
|
||||
welcome:
|
||||
print:
|
||||
text: "Welcome to Sprout!"
|
||||
chainload-kernel:
|
||||
chainload:
|
||||
path: "$path"
|
||||
options:
|
||||
- "$default-options"
|
||||
|
||||
generators:
|
||||
kernels:
|
||||
matrix:
|
||||
entry:
|
||||
title: "Boot Kernel $name"
|
||||
values:
|
||||
path: "\\EFI\\BOOT\\$name"
|
||||
actions: ["chainload-kernel"]
|
||||
values:
|
||||
name: ["kernel.efi"]
|
||||
Reference in New Issue
Block a user