QEMU | USB Ethernet device (RNDIS) does not work on several tested operating systems (#198)
Cc'ing Paul Zimmerman for the hcd-dwc2 model.
Quoted 21 lines · programmingkidx
虎游 commented:
The same problem occurred in my Raspberry Pi 3b+ emulation.
Host: Debian 10
x86_64. Guest rootfs: https://download.canaan-creative.com/avalon921/openwrt/latest/rpi3-modelb/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz Guest kernel & dtd: https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-emulationCommand:
/usr/local/bin/qemu-system-aarch64-M raspi3 -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -dtb ../qemu-rpi-kernel/native-emulation/dtbs/bcm2710-rpi-3-b-plus.dtb -drive file=avalon.img,format=raw,if=sd,id=root -kernel ../qemu-rpi-kernel/native-emulation/5.4.51\ kernels/kernel8.img -m 1G -smp 4 -usb -device usb-mouse -device usb-kbd -nographic -no-reboot -device usb-net,netdev=eth0 -netdev tap,id=eth0,ifname=avalon,script=no,downscript=no Output:[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.51-v8+ (dom@buildbot) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 [ 0.000000] Machine model: Raspberry Pi 3 Model B+...
usbnet: failed control transaction: request
0x8006value0x600index0x0length0xausbnet: failed control transaction: request0x8006value0x600index0x0length0xausbnet: failed control transaction: request0x8006value0x600index0x0length0xa[ 3.688532] usb 1-1.3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 0.00 [ 3.688739] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=10 [ 3.689454] usb 1-1.3: Product: RNDIS/QEMU USB Network Device [ 3.689563] usb 1-1.3: Manufacturer: QEMU [ 3.689639] usb 1-1.3: SerialNumber: 1-1.3...
root@OpenWrt:/# ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:156 errors:0 dropped:0 overruns:0 frame:0 TX packets:156 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9836 (9.6 KiB) TX bytes:9836 (9.6 KiB)root@OpenWrt:/# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever Finally, there is no nic available in guest OS.
I will take a look. Might take me a couple of days to get to it though.
Quoted 25 lines · Philippe Mathieu-Daudé
Cc'ing Paul Zimmerman for the hcd-dwc2 model.
Quoted 21 lines · programmingkidx
虎游 commented:
The same problem occurred in my Raspberry Pi 3b+ emulation.
Host: Debian 10
x86_64. Guest rootfs: https://download.canaan-creative.com/avalon921/openwrt/latest/rpi3-modelb/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz Guest kernel & dtd: https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-emulationCommand:
/usr/local/bin/qemu-system-aarch64-M raspi3 -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -dtb ../qemu-rpi-kernel/native-emulation/dtbs/bcm2710-rpi-3-b-plus.dtb -drive file=avalon.img,format=raw,if=sd,id=root -kernel ../qemu-rpi-kernel/native-emulation/5.4.51\ kernels/kernel8.img -m 1G -smp 4 -usb -device usb-mouse -device usb-kbd -nographic -no-reboot -device usb-net,netdev=eth0 -netdev tap,id=eth0,ifname=avalon,script=no,downscript=no Output:[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.51-v8+ (dom@buildbot) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 [ 0.000000] Machine model: Raspberry Pi 3 Model B+...
usbnet: failed control transaction: request
0x8006value0x600index0x0length0xausbnet: failed control transaction: request0x8006value0x600index0x0length0xausbnet: failed control transaction: request0x8006value0x600index0x0length0xa[ 3.688532] usb 1-1.3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 0.00 [ 3.688739] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=10 [ 3.689454] usb 1-1.3: Product: RNDIS/QEMU USB Network Device [ 3.689563] usb 1-1.3: Manufacturer: QEMU [ 3.689639] usb 1-1.3: SerialNumber: 1-1.3...
root@OpenWrt:/# ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:156 errors:0 dropped:0 overruns:0 frame:0 TX packets:156 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9836 (9.6 KiB) TX bytes:9836 (9.6 KiB)root@OpenWrt:/# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever Finally, there is no nic available in guest OS.
Quoted 1 line · Paul Zimmerman
I will take a look. Might take me a couple of days to get to it though.
Thanks!
Odd, your comment appears as posted by myself on GitLab:
https://gitlab.com/qemu-project/qemu/-/issues/198#note_599551747
BTW Paul, could you join QEMU GitLab project to help us with this issue?
https://gitlab.com/qemu-project/qemu/-/project_members/request_access
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 25 lines
Cc'ing Paul Zimmerman for the hcd-dwc2 model.
Quoted 21 lines · programmingkidx
虎游 commented:
The same problem occurred in my Raspberry Pi 3b+ emulation.
Host: Debian 10
x86_64. Guest rootfs: https://download.canaan-creative.com/avalon921/openwrt/latest/rpi3-modelb/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz Guest kernel & dtd: https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/native-emulationCommand:
/usr/local/bin/qemu-system-aarch64-M raspi3 -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -dtb ../qemu-rpi-kernel/native-emulation/dtbs/bcm2710-rpi-3-b-plus.dtb -drive file=avalon.img,format=raw,if=sd,id=root -kernel ../qemu-rpi-kernel/native-emulation/5.4.51\ kernels/kernel8.img -m 1G -smp 4 -usb -device usb-mouse -device usb-kbd -nographic -no-reboot -device usb-net,netdev=eth0 -netdev tap,id=eth0,ifname=avalon,script=no,downscript=no Output:[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.51-v8+ (dom@buildbot) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 [ 0.000000] Machine model: Raspberry Pi 3 Model B+...
usbnet: failed control transaction: request
0x8006value0x600index0x0length0xausbnet: failed control transaction: request0x8006value0x600index0x0length0xausbnet: failed control transaction: request0x8006value0x600index0x0length0xa[ 3.688532] usb 1-1.3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 0.00 [ 3.688739] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=10 [ 3.689454] usb 1-1.3: Product: RNDIS/QEMU USB Network Device [ 3.689563] usb 1-1.3: Manufacturer: QEMU [ 3.689639] usb 1-1.3: SerialNumber: 1-1.3...
root@OpenWrt:/# ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:156 errors:0 dropped:0 overruns:0 frame:0 TX packets:156 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9836 (9.6 KiB) TX bytes:9836 (9.6 KiB)root@OpenWrt:/# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever Finally, there is no nic available in guest OS.
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 1 line · Paul Zimmerman
I will take a look. Might take me a couple of days to get to it though.
Thanks!
Odd, your comment appears as posted by myself on GitLab:
https://gitlab.com/qemu-project/qemu/-/issues/198#note_599551747BTW Paul, could you join QEMU GitLab project to help us with this issue?
https://gitlab.com/qemu-project/qemu/-/project_members/request_access
OK, I put in a request to join the project.
- Paul
Quoted 11 lines · Paul Zimmerman
Quoted 9 lines · Philippe Mathieu-Daudé
Quoted 1 line · Paul Zimmerman
I will take a look. Might take me a couple of days to get to it though.
Thanks!
Odd, your comment appears as posted by myself on GitLab:
https://gitlab.com/qemu-project/qemu/-/issues/198#note_599551747
Quoted 6 lines
Quoted 2 lines
BTW Paul, could you join QEMU GitLab project to help us with this issue?
https://gitlab.com/qemu-project/qemu/-/project_members/request_accessOK, I put in a request to join the project.
- Paul
This is Paul again.
I looked at the issue from 虎游 @hu60.cn about the dwc2 problem, and it looks like the issue there is that he/she is using a modular kernel, but the root disk image does not contain any modules for that kernel. It looks like at least cdc_ether.ko and cdc_subset.ko are needed for the ethernet to work. I checked that by using the 2020-08-20-raspios-buster image that is referenced on the page where they downloaded that kernel, and with that the network comes up.
- Paul