QEMU versatilepb默认networking适配器

我用qemu来模仿覆盆子pi。 我开始像这样的qemu:

qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu-4.1.13-jessie \ -cpu arm1176 -m 256 -M versatilepb \ -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw console=tty0 console=/dev/ttyAMA3,115200" \ -hda image.qcow2 -serial stdio -monitor none 

这提出了一个工作的NATnetworking接口。 现在我试图修改networkingconfiguration。 我试过添加-netdev tap,helper=...,id=hn0 -device virtio-net-pci,netdev=hn0,id=nic1 。 这启动,但我没有以太网设备。

我使用的设备似乎并不重要,要么是出现所需总线不存在的错误(对于USB或virtio-bus设备),要么在没有networking设备的情况下成功启动(对于PCI设备 – 我期望得到原因这就是客户机没有任何内核模块)。

当我用默认的networkingconfiguration启动时,那里的设备正在使用smc91x驱动程序。 但是,如果我尝试使用smc91c111设备, smc91c111收到错误消息qemu-system-arm: Option '-device smc91c111' cannot be handled by this machine

我如何定制这台机器上的networkingconfiguration?

您可以尝试离开设备部分默认像这样:

 qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb \ -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" \ -hda ~/raspbian.img -net nic,macaddr=22:33:99:44:55:66 -net user