I have the following on the host machine
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I would like second in a line device to be passed through to the machine.
Also
$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
|__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
What should I write in qemu command line? I wrote
-usb -hostbus=1 -hostport=3
and in failed to run with
qemu-system-arm: -hostbus=1: invalid option
I wrote
-usb \
-device usb-host,hostbus=1,hostport=3 \
And got
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
errors during boot under conventional used. If ran under sudo
I got no errors, but also got no USB
working under quest.
# lsusb
unable to initialize libusb: -99
Full command line
sudo qemu-system-arm \
-kernel kernel-qemu-4.4.34-jessie \
-cpu arm1176 -m 256 -M versatilepb \
-serial stdio \
-append "root=/dev/sda2 rootfstype=ext4 rw" \
-hda myimage.img \
-usb \
-device usb-host,hostbus=1,hostport=3 \
-redir tcp:5022::22 \
-redir tcp:5080::80 \
-no-reboot
I have recompiled QEMU with
./configure --enable-libusb
but this didn't help. lsusb
still gives an error. Also no rows about usb
in dmesg
. On real raspberri pi there are many usb
rows including dwc_otg
.
udev
rules or by simplychown
'ing files. Again, try googling first. You seem to be averse to finding answers on your own.qemu
the same way on both systems.sudo
will work for you 100%.sudo
, see section "full command line"