From bd3b64efb70bd11e38f1fd999c4d90faa90d87c9 Mon Sep 17 00:00:00 2001 From: Liav A Date: Tue, 14 Jan 2020 16:19:05 +0200 Subject: [PATCH] Kernel: Fix run script to enable networking on Q35 machines Also, we enable KVM to accelerate the execution when booting with q35_cmd or qcmd options in the run script. --- Kernel/run | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Kernel/run b/Kernel/run index 12fdb75514..138e1a104c 100755 --- a/Kernel/run +++ b/Kernel/run @@ -19,7 +19,7 @@ cd "$script_path" $SERENITY_EXTRA_QEMU_ARGS -s -m $SERENITY_RAM_SIZE -cpu max --d cpu_reset,guest_errors +-d cpu_reset,guest_errors -device VGA,vgamem_mb=64 -hda _disk_image -device ich9-ahci @@ -84,7 +84,9 @@ elif [ "$1" = "q35_cmd" ]; then # ./run: qemu with SerenityOS with custom commandline $SERENITY_QEMU_BIN \ $SERENITY_COMMON_QEMU_Q35_ARGS \ - -device e1000 \ + $SERENITY_KVM_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 e1000,netdev=breh \ -kernel kernel \ -append "${SERENITY_KERNEL_CMDLINE}" elif [ "$1" = "qcmd" ]; then @@ -98,7 +100,9 @@ elif [ "$1" = "qcmd" ]; then # ./run: qemu with SerenityOS with custom commandline $SERENITY_QEMU_BIN \ $SERENITY_COMMON_QEMU_ARGS \ - -device e1000 \ + $SERENITY_KVM_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 e1000,netdev=breh \ -kernel kernel \ -append "${SERENITY_KERNEL_CMDLINE}" else