kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #144933
[Bug 898003] Re: usbip source is maintained in kernel tree now
For Trusty, you must compile usbip from sources yourself. I did it a
couple of times in Linux Mint 17 (based on Trusty) and Debian 7. Here is
what I ended up with:
On the Linux server that will share the USB devices or on any Linux client that will need to access shared devices on other servers:
- download the kernel source: apt-get install linux-source-3.13.0 (replace with your desired kernel version)
- extract the usbip sources from the kernel source tarball (e.g.: /usr/src/linux-source-3.13.0.tar.bz2): they should be under drivers/staging/usbip (or something like that); for instance, extract them to /root/usbip
- find where the file usb.ids from usbutils package is located in your system: apt-file search usb.ids (in my case it's at /usr/share/misc/usb.ids)
- enter /root/usbip/userspace to build the userspace tools:
./autogen.sh
./configure --with-usbids-dir=/usr/share/misc
make install
(replace the usb.ids path as needed)
- if the build fails, you may need some additional libraries; take a look at the README file; for instance, I needed to install libtool (apt-get install libtool)
- the executable files /usr/local/sbin/usbip and /usr/local/sbin/usbipd will be installed, as well as some libraries into /usr/local/lib
- try to run usbip or usbipd to see if they complain about something; if they say some library is missing, try to launch them by preceding with a proper LD_LIBRARY_PATH setting; for instance, you may need to run usbip in this way:
LD_LIBRARY_PATH=/usr/local/lib; usbip
Until now, we've compiled the userspace tools required to control usbip; then, we need to compile the kernel modules, too. The following is again needed on the Linux server that will share the USB devices:
- the kernel headers are required:
apt-get install linux-headers-`uname -r`
cd /usr/src/linux-headers-`uname -r`
make M=/root/usbip
(replace the path after M= with the folder where you extracted the usbip sources in the previous steps)
- the kernel modules will be installed in the usbip folder; to load them:
modprobe usbip-core.ko
modprobe usbip-host.ko
After you've loaded the kernel modules, type:
usbipd -D
Then, you can start to use the usbip tool to list the attached USB
modules and bind them.
If you want to load the kernel modules automatically on system startup:
sudo echo usbip-core >>/etc/modules
sudo echo usbip-host >>/etc/modules
If you want to start the usbipd daemon automatically on system startup, one way to achieve this is to edit /etc/rc.local and add the following line before the line with "exit 0":
/usr/local/sbin/usbipd -D
(remember the LD_LIBRARY_PATH thing, if you determined it's needed)
Please note that if you plan to use Windows clients, you need to try the
LATEST compiled binaries, otherwise they will fail to work. When I last
used usbip, I had to use some binaries compiled by users posting on the
usbip forum, because the one published on the usbip website were
outdated and did not work. That's another huge problem with this tool, I
think.
Hope this helps someone.
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/898003
Title:
usbip source is maintained in kernel tree now
Status in linux package in Ubuntu:
Fix Released
Status in usbip package in Ubuntu:
Confirmed
Status in linux source package in Utopic:
Fix Released
Status in usbip source package in Utopic:
Confirmed
Bug description:
Both the userspace and kernel module parts of usbip are in the linux
kernel tree now. The source used in this package is quite old.
I'm not sure how to best handle the packaging aspects here -- I
imagine that it would be undesirable for usbip to be built as a side
effect of the main kernel package build, because then the kernel
package build would be even slower and usbip is probably not updated
enough to justify that.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/898003/+subscriptions
Follow ups