pmb.qemu.run: replace -nic option with -netdev and -device
On qemu-system-riscv64 the -nic option doesn't seem to work correctly. qemu-system-riscv64: warning: requested NIC (anonymous, model virtio-net-pci) was not created (not supported by this machine?) Using -netdev and -device provides the same functionality and also works on riscv64. Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org> Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20221029114536.100268-1-luca@z3ntu.xyz%3E
This commit is contained in:
parent
38f850161c
commit
0624a1ae33
|
@ -184,10 +184,8 @@ def command_qemu(args, arch, img_path, img_path_2nd=None):
|
|||
else:
|
||||
command += ["-device", "virtio-mouse-pci"]
|
||||
command += ["-device", "virtio-keyboard-pci"]
|
||||
command += ["-nic",
|
||||
"user,model=virtio-net-pci,"
|
||||
"hostfwd=tcp::" + port_ssh + "-:22,"
|
||||
]
|
||||
command += ["-netdev", "user,id=net,hostfwd=tcp::" + port_ssh + "-:22"]
|
||||
command += ["-device", "virtio-net-pci,netdev=net"]
|
||||
|
||||
if arch == "x86_64":
|
||||
command += ["-vga", "virtio"]
|
||||
|
|
Loading…
Reference in New Issue