[vbox-dev] [PATCH] VirtualBox USB support under FreeBSD 8/9+

Hans Petter Selasky hselasky at c2i.net
Thu Nov 4 13:44:52 PDT 2010


Please find attached files and patches needed to make USB support fully work 
in VirtualBox under FreeBSD 8/9+. All patches and code is given under the MIT 
license, if that was not already clear to you.

I also want to thank all the people that sponsored me to do this "upgrade" of 
the existing FreeBSD USB code in VirtualBox with $500.


1) Replace the USBProxyDevice-freebsd.cpp found in the virtualbox 
sources by the one attached to this e-mail.

2) Apply the attached patches

Additional, how to automatically give VirtualBox rights to USB devices:

# /usr/local/etc/devd/virtualbox_dev_0x1234.conf
notify 50 {
        match "system"          "USB";
        match "subsystem"       "DEVICE";
        match "type"            "ATTACH";
        match "vendor"          "0x1234";
        action "chown virtualbox:virtualbox /dev/$cdev";

3) If USB 2.0 support is not present in VirtualBox, try:

sysctl hw.usb.ehci.no_hs=1

And then re-plug the device. Then the all USB HIGH speed USB devices will 
attach like FULL speed ones.

--HPS (one of the maintainers of the USB stack in FreeBSD 8+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DevOHCI.cpp.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20101104/5eef864c/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: USBProxyDevice-freebsd.cpp
Type: text/x-c++src
Size: 26944 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20101104/5eef864c/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: USBProxyServiceFreeBSD.cpp.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20101104/5eef864c/attachment-0005.bin 

More information about the vbox-dev mailing list