From: Thomas Richard Date: Tue, 5 Aug 2025 07:32:48 +0000 (+0200) Subject: kernel: usb: add kmod-usb-common package X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=defce7cefdf3f98d9e48c5422b5f965db4465a19;p=openwrt%2Fstaging%2Fxback.git kernel: usb: add kmod-usb-common package Move usb-common driver from usb-core package to a new usb-common package. The usb-common driver is needed by usb-gadget driver which can be used without host support. Signed-off-by: Thomas Richard Link: https://github.com/openwrt/openwrt/pull/19246 Signed-off-by: Hauke Mehrtens --- diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 4155082901..445a8ff0a1 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -11,15 +11,24 @@ USBNET_DIR:=net/usb USBHID_DIR?=hid/usbhid USBINPUT_DIR?=input/misc +define KernelPackage/usb-common + TITLE:=USB common + HIDDEN:=1 + DEPENDS:=@(USB_SUPPORT||USB_GADGET_SUPPORT) + KCONFIG:=CONFIG_USB_COMMON + FILES:=$(LINUX_DIR)/drivers/usb/common/usb-common.ko + AUTOLOAD:=$(call AutoLoad,20,usb-common,1) +endef + +$(eval $(call KernelPackage,usb-common)) + define KernelPackage/usb-core SUBMENU:=$(USB_MENU) TITLE:=Support for USB - DEPENDS:=@USB_SUPPORT + DEPENDS:=@USB_SUPPORT +USB_SUPPORT:kmod-usb-common KCONFIG:=CONFIG_USB CONFIG_XPS_USB_HCD_XILINX=n CONFIG_USB_FHCI_HCD=n - FILES:= \ - $(LINUX_DIR)/drivers/usb/core/usbcore.ko \ - $(LINUX_DIR)/drivers/usb/common/usb-common.ko - AUTOLOAD:=$(call AutoLoad,20,usb-common usbcore,1) + FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.ko + AUTOLOAD:=$(call AutoLoad,20,usbcore,1) $(call AddDepends/nls) endef