mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Meta: Enable attaching NVMe storage devices to qemu
Add an option to enable NVMe storage device as the boot drive. To enable NVMe support, run the following: $ SERENITY_NVME_ENABLE=1 Meta/serenity.sh run i686 root=/dev/nvme0n1
This commit is contained in:
parent
e99fafb683
commit
344cfa0db4
Notes:
sideshowbarker
2024-07-17 21:50:45 +09:00
Author: https://github.com/Panky-codes Commit: https://github.com/SerenityOS/serenity/commit/344cfa0db4a Pull-request: https://github.com/SerenityOS/serenity/pull/11222 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/FireFox317 Reviewed-by: https://github.com/Sylvyrfysh Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/supercomputer7 ✅
1 changed files with 15 additions and 1 deletions
16
Meta/run.sh
16
Meta/run.sh
|
@ -189,6 +189,19 @@ else
|
|||
SERENITY_QEMU_DISPLAY_DEVICE="VGA,vgamem_mb=64 "
|
||||
fi
|
||||
|
||||
# Check if SERENITY_NVME_ENABLE is unset
|
||||
if [ -z ${SERINITY_NVME_ENABLE+x} ]; then
|
||||
SERENITY_BOOT_DRIVE="-drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk"
|
||||
else
|
||||
if [ "$SERINITY_NVME_ENABLE" -eq 1 ]; then
|
||||
SERENITY_BOOT_DRIVE="-drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk,if=none,id=disk"
|
||||
SERENITY_BOOT_DRIVE="$SERENITY_BOOT_DRIVE -device i82801b11-bridge,id=bridge4 -device sdhci-pci,bus=bridge4"
|
||||
SERENITY_BOOT_DRIVE="$SERENITY_BOOT_DRIVE -device nvme,serial=deadbeef,drive=disk,bus=bridge4"
|
||||
else
|
||||
SERENITY_BOOT_DRIVE="-drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$SERENITY_DISABLE_GDB_SOCKET" ]; then
|
||||
SERENITY_EXTRA_QEMU_ARGS="$SERENITY_EXTRA_QEMU_ARGS -s"
|
||||
fi
|
||||
|
@ -206,7 +219,6 @@ if [ -z "$SERENITY_MACHINE" ]; then
|
|||
-smp $SERENITY_CPUS
|
||||
-display $SERENITY_QEMU_DISPLAY_BACKEND
|
||||
-device $SERENITY_QEMU_DISPLAY_DEVICE
|
||||
-drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk
|
||||
-device virtio-serial,max_ports=2
|
||||
-device virtconsole,chardev=stdout
|
||||
-device isa-debugcon,chardev=stdout
|
||||
|
@ -219,6 +231,7 @@ if [ -z "$SERENITY_MACHINE" ]; then
|
|||
-device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3
|
||||
-device ich9-ahci,bus=bridge3
|
||||
-chardev stdio,id=stdout,mux=on
|
||||
$SERENITY_BOOT_DRIVE
|
||||
"
|
||||
fi
|
||||
fi
|
||||
|
@ -289,6 +302,7 @@ $SERENITY_EXTRA_QEMU_ARGS
|
|||
-device virtio-rng-pci
|
||||
$SERENITY_AUDIO_BACKEND
|
||||
$SERENITY_AUDIO_HW
|
||||
$SERENITY_BOOT_DRIVE
|
||||
"
|
||||
|
||||
export SDL_VIDEO_X11_DGAMOUSE=0
|
||||
|
|
Loading…
Reference in a new issue