diff --git a/package/Config.in b/package/Config.in index 06472aa972..39a2110b96 100644 --- a/package/Config.in +++ b/package/Config.in @@ -655,6 +655,7 @@ endmenu source "package/usb_modeswitch/Config.in" source "package/usb_modeswitch_data/Config.in" source "package/usbguard/Config.in" + source "package/usbip/Config.in" source "package/usbmount/Config.in" source "package/usbutils/Config.in" source "package/w_scan/Config.in" diff --git a/package/usbip/Config.in b/package/usbip/Config.in new file mode 100644 index 0000000000..25f8fb8577 --- /dev/null +++ b/package/usbip/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_USBIP + bool "usbip" + depends on BR2_PACKAGE_HAS_UDEV + help + The USB-over-IP suite of tools. + + Note: you'll have to enable either (or both) of "VHCI hcd" + (CONFIG_USBIP_VHCI_HCD) if you want to access a remote USB + device, or "Host driver" (CONFIG_USBIP_HOST) if you want + to share a USB device, in your kernel configuration. The + Buildroot package "hwdata" with the "usb.ids" file is also + useful (but not mandatory) to list and identify USB device + by name. + + https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/tools/usb/usbip + +comment "usbip needs udev /dev management" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/usbip/usbip.hash b/package/usbip/usbip.hash new file mode 100644 index 0000000000..dc901617bf --- /dev/null +++ b/package/usbip/usbip.hash @@ -0,0 +1,5 @@ +# From https://cdn.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc +sha256 d450ab215de4e1f8bb85e0f4216760fa33fd024b4526b144f4ce0d9012b29c9e linux-6.12.6.tar.xz + +# Locally computed +sha256 cd5c66af63b509ccd75ec85fee41b6e5cbb77cd6bf9392a54900acc0f02be4a6 tools/usb/usbip/COPYING diff --git a/package/usbip/usbip.mk b/package/usbip/usbip.mk new file mode 100644 index 0000000000..77dd341f9b --- /dev/null +++ b/package/usbip/usbip.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# usbip +# +################################################################################ + +# Since linux 3.17, usbip is part of the linux source tree. Usually, we'd add +# such a tool in the linux-tools package. +# +# However, usbip is autotools-based, so we'd have to duplicate the autotools +# infra in linux-tools; the basic infra is easy to duplicate, but then come +# the conditional libtool patches, and it's not trivial to do. And of course, +# there would be the maintenance cost... +# +# usbip is not very tied to the kernel, in fact. It is pretty stable, API-wise, +# so we can just use a recent kernel version. +USBIP_VERSION = 6.12.6 +USBIP_SOURCE = linux-$(USBIP_VERSION).tar.xz +USBIP_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v6.x +USBIP_DL_SUBDIR = linux + +# usbip's licensing diverges from that of the rest of the kernel +USBIP_LICENSE = GPL-2.0-or-later +USBIP_LICENSE_FILES = tools/usb/usbip/COPYING + +USBIP_DEPENDENCIES = udev + +USBIP_SUBDIR = tools/usb/usbip +USBIP_INSTALL_STAGING = YES + +USBIP_AUTORECONF = YES +USBIP_CONFIGURE_OPTS = --without-tcp-wrappers + +define USBIP_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_USB_SUPPORT) + $(call KCONFIG_ENABLE_OPT,CONFIG_USBIP_CORE) +endef + +$(eval $(autotools-package))