summaryrefslogtreecommitdiff
path: root/Meta/run.sh
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-08-28 13:10:09 -0400
committerLinus Groh <mail@linusgroh.de>2021-08-28 21:51:30 +0100
commitad480505af9c9d3e43ef04b934552c61e77ea55e (patch)
tree40a8d728e4f068bb80e63051435b663bc53cbce3 /Meta/run.sh
parent4f3c0fa659b312e994fecbfc65d27982c6745884 (diff)
downloadserenity-ad480505af9c9d3e43ef04b934552c61e77ea55e.zip
Meta: Introduce SERENITY_MACHINE variable in run.sh
Set it to all the `-m`, `-display`, `-device` flags for Intel, and to just "-M raspi3" for aarch64 builds.
Diffstat (limited to 'Meta/run.sh')
-rwxr-xr-xMeta/run.sh44
1 files changed, 28 insertions, 16 deletions
diff --git a/Meta/run.sh b/Meta/run.sh
index bf5f43ac3f..60ac6bc8d2 100755
--- a/Meta/run.sh
+++ b/Meta/run.sh
@@ -185,29 +185,41 @@ if [ -z "$SERENITY_ETHERNET_DEVICE_TYPE" ]; then
SERENITY_ETHERNET_DEVICE_TYPE="e1000"
fi
+if [ -z "$SERENITY_MACHINE" ]; then
+ if [ "$SERENITY_ARCH" = "aarch64" ]; then
+ SERENITY_MACHINE="-M raspi3"
+ else
+ SERENITY_MACHINE="
+ -m $SERENITY_RAM_SIZE
+ -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
+ -device virtio-rng-pci
+ $SERENITY_AUDIO_BACKEND
+ $SERENITY_AUDIO_HW
+ -device sb16,audiodev=snd0
+ -device pci-bridge,chassis_nr=1,id=bridge1 -device $SERENITY_ETHERNET_DEVICE_TYPE,bus=bridge1
+ -device i82801b11-bridge,bus=bridge1,id=bridge2 -device sdhci-pci,bus=bridge2
+ -device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3
+ -device ich9-ahci,bus=bridge3
+ "
+ fi
+fi
+
+
+
[ -z "$SERENITY_COMMON_QEMU_ARGS" ] && SERENITY_COMMON_QEMU_ARGS="
$SERENITY_EXTRA_QEMU_ARGS
--m $SERENITY_RAM_SIZE
+$SERENITY_MACHINE
-cpu $SERENITY_QEMU_CPU
-d guest_errors
--smp $SERENITY_CPUS
--display $SERENITY_QEMU_DISPLAY_BACKEND
--device $SERENITY_QEMU_DISPLAY_DEVICE
--drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk
-usb
$SERENITY_SPICE_SERVER_CHARDEV
--device virtio-serial,max_ports=2
-chardev stdio,id=stdout,mux=on
--device virtconsole,chardev=stdout
--device isa-debugcon,chardev=stdout
--device virtio-rng-pci
-$SERENITY_AUDIO_BACKEND
-$SERENITY_AUDIO_HW
--device sb16,audiodev=snd0
--device pci-bridge,chassis_nr=1,id=bridge1 -device $SERENITY_ETHERNET_DEVICE_TYPE,bus=bridge1
--device i82801b11-bridge,bus=bridge1,id=bridge2 -device sdhci-pci,bus=bridge2
--device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3
--device ich9-ahci,bus=bridge3
"
if [ "$SERENITY_ARCH" != "aarch64" ]; then