标题:usbip小记 出处:Felix021 时间:Thu, 17 Dec 2015 09:55:48 +0000 作者:felix021 地址:https://www.felix021.com/blog/read.php?2153 内容: 好早以前看到过这个项目,不过当时没有测试成功,昨天晚上看了一下,有点眉目了,先记录一点东西。 1. 项目主页:http://usbip.sourceforge.net/ ,但是这里实际上已经没有再维护了,内核模块已经merge到linux kernel(drivers/usb/usbip)。这里有提供经过ReactOS(这个神奇的项目)签名的windows驱动程序(windows下只有client,没有server),但是不知道四年过去了还能不能用…… 2. ubuntu默认安装没有相关模块,需要安装 linux-image-extras ,然后 cd /lib/modules/[KERNEL_VER]/kernel/drivers/usb/usbip && sudo insmod *.ko 3. ubuntu源里的usbip包已经是很老的版本,无法利用新的内核模块,会提示“usbipd requires usbip_common_mod.ko and usbip.ko kernel modules”,实际上userspace tool也已经挪到kernel source里了,位于 linux-source/tools/usb/usbip,编译方法可参考该目录下的README文件,类似于: 引用 ./autogen.sh ./configure --with-usbids-dir=/usr/share/misc/ sudo make install 但是我是直接下载的kernel source,没有安装在系统目录,所以在编译的时候会提示 libsrc/usbip_common.h 找不到 linux/usbip.h ,解决方法很简单,把那一行改为 #include "usbip.h" ,然后把 linux-source/include/uapi/linux/usbip.h 复制到 libsrc 目录,再编译就行了(对,就是这么粗暴简单)。 4. update@2015-12-25:在linux下测试成功。windows的driver废弃太久,已经不能支持新版代码的协议了。 p.s. 还有一个收费的商业项目 usb-over-ethernet ,有free trial版本,但是没尝试过。 p.s. 2. 还有一个开源的项目SPICE,有一个 usbredir 模块 http://www.spice-space.org/page/UsbRedir ,不过好像还不完善。 Generated by Bo-blog 2.1.0