usbip – Why is linux version different in linux-source package and uname -r?

I am trying to install and run usbip using this link. But the version of linux tools does not corespond with uname.
I get an error when I try this:

/usr/lib/linux-tools/`uname -r`/usbipd

When running uname I get this:

root@allan-MS-7998:/# uname -r
4.2.0-42-generic

In /usr/lib/linux-tools/ is a folder named 3.13.0-100-generic and not 4.2.0-42-generic. I checked witch source is installed using dpkg.

root@allan-MS-7998:/# dpkg -s linux-source
Package: linux-source
Status: install ok installed
Priority: optional
Section: devel
Installed-Size: 30
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: all
Source: linux-meta
Version: 3.13.0.100.108
Depends: linux-source-3.13.0
Description: Linux kernel source with Ubuntu patches
This package will always depend on the latest Linux kernel source code
available. The Ubuntu patches have been applied.

Answer

To install USBIP 2.0 on 4.2.0-42-generic I had to find the source code to USBIP. It is not /usr/lib/linux-tools/. The source was to be found in the folder: linux-lts-wily-4.2.0
I found the source in this folder: linux-lts-wily-4.2.0/tools/usb/usbip

Following the instructions in this link I was able to compile, install and run USBIP.

Installing linux-tools-generic did not work. I had to compile from source.

I can now connect to my Arduino on my Raspberry Py’s USB port from my Ubuntu computer. Much faster than using XRDP and running Arduino IDE directly on the Raspberry Pi.

Attribution
Source : Link , Question Author : Allan Bertelsen , Answer Author : Kristopher Ives

Leave a Comment