mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 08:30:16 +00:00
feat(boot): implement basic boot menu
This commit is contained in:
@@ -35,13 +35,15 @@ set -- "${@}" -smp 2 -m 4096
|
||||
if [ "${NO_GRAPHICAL_BOOT}" = "1" ]; then
|
||||
set -- "${@}" -nographic
|
||||
else
|
||||
if [ "${QEMU_LEGACY_SERIAL}" = "1" ]; then
|
||||
set -- "${@}" -serial stdio
|
||||
else
|
||||
set -- "${@}" \
|
||||
-device virtio-serial-pci,id=vs0 \
|
||||
-chardev stdio,id=stdio0 \
|
||||
-device virtconsole,chardev=stdio0,id=console0
|
||||
if [ "${GRAPHICAL_ONLY}" != "1" ]; then
|
||||
if [ "${QEMU_LEGACY_SERIAL}" = "1" ]; then
|
||||
set -- "${@}" -serial stdio
|
||||
else
|
||||
set -- "${@}" \
|
||||
-device virtio-serial-pci,id=vs0 \
|
||||
-chardev stdio,id=stdio0 \
|
||||
-device virtconsole,chardev=stdio0,id=console0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${QEMU_LEGACY_VGA}" = "1" ]; then
|
||||
|
||||
@@ -11,7 +11,7 @@ if [ "${TARGET_ARCH}" = "aarch64" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "${SPROUT_CONFIG_NAME}" ]; then
|
||||
SPROUT_CONFIG_NAME="kernel"
|
||||
SPROUT_CONFIG_NAME="all"
|
||||
fi
|
||||
|
||||
echo "[build] ${TARGET_ARCH} ${RUST_PROFILE}"
|
||||
|
||||
30
hack/dev/configs/all.sprout.toml
Normal file
30
hack/dev/configs/all.sprout.toml
Normal file
@@ -0,0 +1,30 @@
|
||||
version = 1
|
||||
|
||||
[defaults]
|
||||
entry = "kernel"
|
||||
|
||||
[extractors.boot.filesystem-device-match]
|
||||
has-item = "\\EFI\\BOOT\\kernel.efi"
|
||||
|
||||
[actions.chainload-kernel]
|
||||
chainload.path = "$boot\\EFI\\BOOT\\kernel.efi"
|
||||
chainload.options = ["console=hvc0"]
|
||||
chainload.linux-initrd = "$boot\\initramfs"
|
||||
|
||||
[entries.kernel]
|
||||
title = "Boot Linux"
|
||||
actions = ["chainload-kernel"]
|
||||
|
||||
[actions.chainload-shell]
|
||||
chainload.path = "$boot\\EFI\\BOOT\\shell.efi"
|
||||
|
||||
[entries.shell]
|
||||
title = "Boot Shell"
|
||||
actions = ["chainload-shell"]
|
||||
|
||||
[actions.chainload-xen]
|
||||
chainload.path = "$boot\\EFI\\BOOT\\xen.efi"
|
||||
|
||||
[entries.xen]
|
||||
title = "Boot Xen"
|
||||
actions = ["chainload-xen"]
|
||||
@@ -2,6 +2,7 @@ version = 1
|
||||
|
||||
[defaults]
|
||||
entry = "edera"
|
||||
menu-timeout = 0
|
||||
|
||||
[extractors.boot.filesystem-device-match]
|
||||
has-item = "\\EFI\\BOOT\\xen.efi"
|
||||
|
||||
@@ -2,6 +2,7 @@ version = 1
|
||||
|
||||
[defaults]
|
||||
entry = "kernel"
|
||||
menu-timeout = 0
|
||||
|
||||
[extractors.boot.filesystem-device-match]
|
||||
has-item = "\\EFI\\BOOT\\kernel.efi"
|
||||
|
||||
@@ -2,6 +2,7 @@ version = 1
|
||||
|
||||
[defaults]
|
||||
entry = "shell"
|
||||
menu-timeout = 0
|
||||
|
||||
[extractors.boot.filesystem-device-match]
|
||||
has-item = "\\EFI\\BOOT\\shell.efi"
|
||||
|
||||
@@ -2,6 +2,7 @@ version = 1
|
||||
|
||||
[defaults]
|
||||
entry = "xen"
|
||||
menu-timeout = 0
|
||||
|
||||
[extractors.boot.filesystem-device-match]
|
||||
has-item = "\\EFI\\BOOT\\xen.efi"
|
||||
|
||||
Reference in New Issue
Block a user