summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-07-31 16:28:07 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-02 00:35:22 +0200
commitc73c40a21d00880b68807d59238a93dc12a95221 (patch)
treef3e5c526ba24fe1b0a2554b5e6b020109b772e7b
parentf599f2be3d338af09aff7c64008fd8c93eac78dd (diff)
downloadserenity-c73c40a21d00880b68807d59238a93dc12a95221.zip
Meta: Fix compatibility with QEMU 5.x
QEMU 5 doesn't support -machine pcspk-audiodev so we need to fall back to using -soundhw for that.
-rwxr-xr-xMeta/run.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/Meta/run.sh b/Meta/run.sh
index edcfe1a1b7..928cf0a55f 100755
--- a/Meta/run.sh
+++ b/Meta/run.sh
@@ -104,6 +104,12 @@ else
SERENITY_AUDIO_BACKEND="-audiodev pa,id=snd0"
fi
+if [ "$installed_major_version" -gt 5 ]; then
+ SERENITY_AUDIO_HW="-machine pcspk-audiodev=snd0"
+else
+ SERENITY_AUDIO_HW="-soundhw pcspk"
+fi
+
SERENITY_SCREENS="${SERENITY_SCREENS:-1}"
if [ "$SERENITY_SPICE" ]; then
SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-spice-app}"
@@ -157,7 +163,7 @@ $SERENITY_SPICE_SERVER_CHARDEV
-device isa-debugcon,chardev=stdout
-device virtio-rng-pci
$SERENITY_AUDIO_BACKEND
--machine pcspk-audiodev=snd0
+$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
@@ -199,7 +205,8 @@ $SERENITY_EXTRA_QEMU_ARGS
-device virtconsole,chardev=stdout
-device isa-debugcon,chardev=stdout
-device virtio-rng-pci
--soundhw pcspk
+$SERENITY_AUDIO_BACKEND
+$SERENITY_AUDIO_HW
-device sb16
"