mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00:00
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.
This commit is contained in:
parent
4f3c0fa659
commit
ad480505af
1 changed files with 28 additions and 16 deletions
26
Meta/run.sh
26
Meta/run.sh
|
@ -185,19 +185,17 @@ if [ -z "$SERENITY_ETHERNET_DEVICE_TYPE" ]; then
|
||||||
SERENITY_ETHERNET_DEVICE_TYPE="e1000"
|
SERENITY_ETHERNET_DEVICE_TYPE="e1000"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$SERENITY_COMMON_QEMU_ARGS" ] && SERENITY_COMMON_QEMU_ARGS="
|
if [ -z "$SERENITY_MACHINE" ]; then
|
||||||
$SERENITY_EXTRA_QEMU_ARGS
|
if [ "$SERENITY_ARCH" = "aarch64" ]; then
|
||||||
|
SERENITY_MACHINE="-M raspi3"
|
||||||
|
else
|
||||||
|
SERENITY_MACHINE="
|
||||||
-m $SERENITY_RAM_SIZE
|
-m $SERENITY_RAM_SIZE
|
||||||
-cpu $SERENITY_QEMU_CPU
|
|
||||||
-d guest_errors
|
|
||||||
-smp $SERENITY_CPUS
|
-smp $SERENITY_CPUS
|
||||||
-display $SERENITY_QEMU_DISPLAY_BACKEND
|
-display $SERENITY_QEMU_DISPLAY_BACKEND
|
||||||
-device $SERENITY_QEMU_DISPLAY_DEVICE
|
-device $SERENITY_QEMU_DISPLAY_DEVICE
|
||||||
-drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk
|
-drive file=${SERENITY_DISK_IMAGE},format=raw,index=0,media=disk
|
||||||
-usb
|
|
||||||
$SERENITY_SPICE_SERVER_CHARDEV
|
|
||||||
-device virtio-serial,max_ports=2
|
-device virtio-serial,max_ports=2
|
||||||
-chardev stdio,id=stdout,mux=on
|
|
||||||
-device virtconsole,chardev=stdout
|
-device virtconsole,chardev=stdout
|
||||||
-device isa-debugcon,chardev=stdout
|
-device isa-debugcon,chardev=stdout
|
||||||
-device virtio-rng-pci
|
-device virtio-rng-pci
|
||||||
|
@ -209,6 +207,20 @@ $SERENITY_AUDIO_HW
|
||||||
-device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3
|
-device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3
|
||||||
-device ich9-ahci,bus=bridge3
|
-device ich9-ahci,bus=bridge3
|
||||||
"
|
"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[ -z "$SERENITY_COMMON_QEMU_ARGS" ] && SERENITY_COMMON_QEMU_ARGS="
|
||||||
|
$SERENITY_EXTRA_QEMU_ARGS
|
||||||
|
$SERENITY_MACHINE
|
||||||
|
-cpu $SERENITY_QEMU_CPU
|
||||||
|
-d guest_errors
|
||||||
|
-usb
|
||||||
|
$SERENITY_SPICE_SERVER_CHARDEV
|
||||||
|
-chardev stdio,id=stdout,mux=on
|
||||||
|
"
|
||||||
|
|
||||||
if [ "$SERENITY_ARCH" != "aarch64" ]; then
|
if [ "$SERENITY_ARCH" != "aarch64" ]; then
|
||||||
if "${SERENITY_QEMU_BIN}" -chardev help | grep -iq spice; then
|
if "${SERENITY_QEMU_BIN}" -chardev help | grep -iq spice; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue