@@ -14,18 +14,27 @@
#
# 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.
+#
+# but when a kernel is being built, use the local kernel source
+ifeq ($(BR2_LINUX_KERNEL),y)
+USBIP_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION))
+USBIP_SITE = $(LINUX_DIR)/tools/usb/usbip
+USBIP_SITE_METHOD = local
+USBIP_LICENSE_FILES = COPYING
+USBIP_DEPENDENCIES = linux udev
+else
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_SUBDIR = tools/usb/usbip
+USBIP_LICENSE_FILES = tools/usb/usbip/COPYING
+USBIP_DEPENDENCIES = udev
+endif
# 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
@@ -39,3 +48,4 @@ define USBIP_LINUX_CONFIG_FIXUPS
endef
$(eval $(autotools-package))
+
adding a conditional that detects if a kernel is being built, and if so, use that kernels usbip sources when a kernel is not being built, use a pinned kernel version Signed-off-by: Benjamin DeCamp <benjamin8532@protonmail.com> --- package/usbip/usbip.mk | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)