@@ -8,7 +8,7 @@ nopreempt=0
88network=1
99fs_type=9pfs
1010no_user_aslr=0
11- no_virtio_serial =0
11+ virtio_serial =0
1212tmux=0
1313
1414exec_args=" "
@@ -28,8 +28,8 @@ function show_help () {
2828 echo " vhd (Uses .dev/vda.vhd)"
2929 echo " (rm .dev/vda.vhd to repopulate the disk image)"
3030 echo " --no-user-aslr Disable user-space ASLR (default: no)"
31- echo " --no- virtio-serial"
32- echo " Disable virtio-serial and use PCI serial instead (default: no)"
31+ echo " --virtio-serial"
32+ echo " Use virtio-serial instead of PCI serial (default: no)"
3333 echo " --no-preempt Disable preemption (default: no)"
3434 echo " "
3535 exit 1
@@ -69,8 +69,8 @@ while [ "${1:-}" != '' ]; do
6969 --no-user-aslr )
7070 no_user_aslr=1
7171 ;;
72- --no- virtio-serial )
73- no_virtio_serial =1
72+ --virtio-serial )
73+ virtio_serial =1
7474 ;;
7575 --no-preempt )
7676 nopreempt=1
@@ -165,10 +165,10 @@ elif [[ $fs_type == "vhd" ]]; then
165165 root_cmd=" root=/dev/vda rw"
166166fi
167167
168- if [[ $no_virtio_serial == 0 ]]; then
169- console_cmd=" console=hvc0 kgdboc=hvc1"
170- else
168+ if [[ $virtio_serial == 0 ]]; then
171169 console_cmd=" console=ttyS0,115200 kgdboc=ttyS1,115200"
170+ else
171+ console_cmd=" console=hvc0 kgdboc=hvc1"
172172fi
173173
174174if [[ $tmux == 1 ]]; then
@@ -225,16 +225,16 @@ if [[ $network == 1 ]]; then
225225 )
226226fi
227227
228- if [[ $no_virtio_serial == 0 ]]; then
228+ if [[ $virtio_serial == 0 ]]; then
229229 qemuFlags+=(
230- -device " virtio-serial-pci,id=virtio-serial0"
231- -device " virtconsole,chardev=stdio"
232- -device " virtconsole,chardev=kgdb"
230+ -device " pci-serial,chardev=stdio"
231+ -device " pci-serial,chardev=kgdb"
233232 )
234233else
235234 qemuFlags+=(
236- -device " pci-serial,chardev=stdio"
237- -device " pci-serial,chardev=kgdb"
235+ -device " virtio-serial-pci,id=virtio-serial0"
236+ -device " virtconsole,chardev=stdio"
237+ -device " virtconsole,chardev=kgdb"
238238 )
239239fi
240240
0 commit comments