Meta: Add option to run SerenityOS on a QEMU ISA-PC machine

The ISA-PC machine type provides no PCI bus support, no IOAPIC support
and other modern PC features of our generation.

This is mainly a good environment for testing abstractions in the kernel
space, and can help with improving on them for the sake of porting the
OS to other chipsets and CPU architectures.
This commit is contained in:
Liav A 2022-01-21 16:25:38 +02:00 committed by Andreas Kling
parent 30eeba1981
commit 2dbbec66e4
Notes: sideshowbarker 2024-07-17 18:02:04 +09:00

View file

@ -277,6 +277,17 @@ if [ "$SERENITY_ARCH" != "aarch64" ]; then
fi
fi
[ -z "$SERENITY_COMMON_QEMU_ISA_PC_ARGS" ] && SERENITY_COMMON_QEMU_ISA_PC_ARGS="
$SERENITY_EXTRA_QEMU_ARGS
-m $SERENITY_RAM_SIZE
-cpu pentium3
-machine isapc
-d guest_errors
-chardev stdio,id=stdout,mux=on
-device isa-debugcon,chardev=stdout
$SERENITY_BOOT_DRIVE
"
[ -z "$SERENITY_COMMON_QEMU_Q35_ARGS" ] && SERENITY_COMMON_QEMU_Q35_ARGS="
$SERENITY_EXTRA_QEMU_ARGS
-m $SERENITY_RAM_SIZE
@ -373,6 +384,17 @@ elif [ "$SERENITY_RUN" = "q35" ]; then
-kernel Kernel/Prekernel/Prekernel \
-initrd Kernel/Kernel \
-append "${SERENITY_KERNEL_CMDLINE}"
elif [ "$SERENITY_RUN" = "isapc" ]; then
# Meta/run.sh q35: qemu (q35 chipset) with SerenityOS
echo "Starting SerenityOS with QEMU ISA-PC machine, Commandline: ${SERENITY_KERNEL_CMDLINE}"
"$SERENITY_QEMU_BIN" \
$SERENITY_COMMON_QEMU_ISA_PC_ARGS \
$SERENITY_VIRT_TECH_ARG \
-netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-10.0.2.15:8888,hostfwd=tcp:127.0.0.1:8823-10.0.2.15:23 \
-device ne2k_isa,netdev=breh \
-kernel Kernel/Prekernel/Prekernel \
-initrd Kernel/Kernel \
-append "${SERENITY_KERNEL_CMDLINE}"
elif [ "$SERENITY_RUN" = "q35grub" ]; then
# Meta/run.sh q35grub: qemu (q35 chipset) with SerenityOS, using a grub disk image
"$SERENITY_QEMU_BIN" \