فهرست منبع

kernel: add option for USB FunctionFS gadget

Add menuconfig option 'kmod-usb-gadget-fs' for the USB FunctionFS gadget
module

OpenWRT is perfect for USB gadgets that are network-enabled, since it
provides everything needed to easily manage the device. Having support
for the FunctionFS gadget enables the use of any custom USB devices
that does not have a specific module, like Media Transfer Protocol.

Signed-off-by: Dominic Germain <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21207
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 22a69dfa4a9a04833aaac62b9f0a7814571b9e07)
Dominic Germain 1 ماه پیش
والد
کامیت
8bf13dcb36
1فایلهای تغییر یافته به همراه18 افزوده شده و 0 حذف شده
  1. 18 0
      package/kernel/linux/modules/usb.mk

+ 18 - 0
package/kernel/linux/modules/usb.mk

@@ -154,6 +154,24 @@ endef
 
 $(eval $(call KernelPackage,usb-gadget-hid))
 
+define KernelPackage/usb-gadget-fs
+  TITLE:=USB FunctionFS Gadget Support
+  KCONFIG:=CONFIG_USB_FUNCTIONFS \
+    CONFIG_USB_FUNCTIONFS_ETH=n \
+    CONFIG_USB_FUNCTIONFS_RNDIS=n
+  FILES:= \
+	  $(LINUX_DIR)/drivers/usb/gadget/legacy/g_ffs.ko \
+	  $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_fs.ko
+  AUTOLOAD:=$(call AutoLoad,52,usb_f_fs)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite +kmod-dma-buf)
+endef
+
+define KernelPackage/usb-gadget-fs/description
+  Kernel support for USB FunctionFS Gadget.
+endef
+
+$(eval $(call KernelPackage,usb-gadget-fs))
+
 define KernelPackage/usb-gadget-ehci-debug
   TITLE:=USB EHCI debug port Gadget support
   KCONFIG:=\