qemu-neo1973 and zd1211rw wifi driver
balrogg at gmail.com
Wed Sep 19 12:34:38 CEST 2007
On 18/09/2007, Salil Bijur <salilbijur at gmail.com> wrote:
> I'm trying out qemu-neo1973 using a Linux kernel compiled for neo1973
> and my own file system.
> I have been been able to detect and use USB, for instance, USB mass storage.
> The problem I'm facing is that qemu-system-arm crashes when I try to
> use the Hawking USB Wifi dongle (which uses zd1211rw driver) connected
> to my host machine's USB.
> The kernel image 'uImage' I use is compiled with the necessary drivers
> required - usb and zd1211rw
> # ./qemu-system-arm -M neo -m 130 -mtdblock openmoko-flash.image
> -kernel uImage -usbdevice keyboard -serial
> telnet:localhost:1200,server -monitor telnet:localhost:1300,server
> After the kernel boots completely, I add the usb device using the
> usb_add command in the qemu monitor. This causes the entire emulator
> qemu-system-arm to crash with a segmentation fault.
> In the qemu monitor:
> (qemu) info usbhost
> Device 5.5, speed 480 Mb/s
> Vendor Specific: USB device 0ace:1211, USB2.0 WLAN
> Device 1.2, speed 1.5 Mb/s
> Class 00: USB device 04b3:310b
> (qemu) usb_add host:0ace:1211
> (qemu) Connection closed by foreign host.
> In the serial output terminal, the kernel prints are:
> / # usb 1-1: new full speed USB device using s3c2410-ohci and address 4
> usb 1-1: configuration #1 chosen from 1 choice
> hub 1-1:1.0: USB hub found
> hub 1-1:1.0: 8 ports detected
> usb 1-1.8: new full speed USB device using s3c2410-ohci and address 5
> usb 1-1.8: not running at top speed; connect to a high speed hub
> usb 1-1.8: configuration #1 chosen from 1 choice
> usb 1-1.8: reset full speed USB device using s3c2410-ohci and address 5
> Connection closed by foreign host.
> I haven't been able to debug this using gdb since an asynchronous
> signal from SDL causes it to hang in a debug state.
> Can anyone explain why this is happening? Since usb_add is working
> fine with USB mass storage and USB Bluetooth, this problem seems to be
> specific to zd1211rw USB WiFi.
Obviously this is a bug. It's hard to say where the bug is (libusb,
qemu or local qemu-neo1973 code). I believe USB devices with
isochronous endpoints have not been tested and may cause breakage,
does the WiFi adapter have any ISO enpoints? Does it have more than
one interface? (this should not cause a segfault, but it would prevent
the USB proxy from working)
To run qemu under gdb you can tell gdb to not stop on signals, i.e.
when gdb stops, issue:
(gdb) handle SIGUSR2 nostop noprint
(same for other signals), and
Alternatively, run "ulimit -c 100000000" before running qemu and have
it dump the core, then load it in gdb with
(gdb) core core
More information about the openmoko-devel