mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 13:30:17 +00:00
boot improvements and acceleration
This commit is contained in:
39
hack/boot.sh
39
hack/boot.sh
@@ -5,31 +5,52 @@ cd "$(dirname "${0}")/.." || exit 1
|
||||
|
||||
. "hack/common.sh"
|
||||
|
||||
./hack/build.sh "${TARGET_ARCH}" "${RUST_PROFILE}"
|
||||
if [ "${SKIP_BUILD}" != "1" ]; then
|
||||
./hack/build.sh "${TARGET_ARCH}" "${RUST_PROFILE}"
|
||||
fi
|
||||
|
||||
clear
|
||||
|
||||
set --
|
||||
|
||||
if [ "${TARGET_ARCH}" = "x86_64" ]; then
|
||||
set -- "${@}" qemu-system-x86_64 -M q35
|
||||
elif [ "${TARGET_ARCH}" = "aarch64" ]; then
|
||||
set -- "${@}" qemu-system-aarch64 -M virt -cpu cortex-a57
|
||||
fi
|
||||
|
||||
if [ -n "${QEMU_ACCEL}" ]; then
|
||||
set -- "${@}" "-accel" "kvm"
|
||||
fi
|
||||
|
||||
if [ "${QEMU_GDB}" = "1" ]; then
|
||||
set -- "${@}" "-s"
|
||||
fi
|
||||
|
||||
if [ "${QEMU_GDB_WAIT}" = "1" ]; then
|
||||
set -- "${@}" "-S"
|
||||
fi
|
||||
|
||||
set -- "${@}" -smp 2 -m 4096
|
||||
|
||||
if [ "${NO_GRAPHICAL_BOOT}" = "1" ]; then
|
||||
set -- "${@}" -nographic
|
||||
else
|
||||
set -- "${@}" \
|
||||
-device virtio-serial-pci,id=vs0 \
|
||||
-chardev stdio,id=stdio0 \
|
||||
-device virtconsole,chardev=stdio0,id=console0
|
||||
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
|
||||
|
||||
set -- "${@}" \
|
||||
-vga none \
|
||||
-device "virtio-gpu,edid=on,xres=1024,yres=768"
|
||||
if [ "${QEMU_LEGACY_VGA}" = "1" ]; then
|
||||
set -- "${@}" -vga std
|
||||
else
|
||||
set -- "${@}" \
|
||||
-vga none \
|
||||
-device "virtio-gpu,edid=on,xres=1024,yres=768"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f "${FINAL_DIR}/ovmf-boot.fd"
|
||||
|
||||
Reference in New Issue
Block a user