[LEDE-DEV] [PATCH] kernel: add additional gadget drivers

Tim Harvey tharvey at gateworks.com
Thu Sep 15 07:51:47 PDT 2016


Add the following gadget driver modules:
 - kmod-usb-gadget-ncm (g_ncm)
 - kmod-usb-gadget-hid (g_hid)

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 package/kernel/linux/modules/usb.mk | 39 +++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 020f474..14c7050 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -316,6 +316,45 @@ endef
 $(eval $(call KernelPackage,usb-gadget-mass-storage))
 
 
+define KernelPackage/usb-gadget-hid
+  TITLE:=USB HID Gadget
+  KCONFIG:=CONFIG_USB_G_HID
+  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
+  FILES:= \
+	$(LINUX_DIR)/drivers/usb/gadget/libcomposite.ko \
+	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_hid.ko \
+	$(LINUX_DIR)/drivers/usb/gadget/legacy/g_hid.ko
+  AUTOLOAD:=$(call AutoLoad,52,usb_f_hid g_hid)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-gadget-hid/description
+  Kernel support for USB HID Gadget
+endef
+
+$(eval $(call KernelPackage,usb-gadget-hid))
+
+
+define KernelPackage/usb-gadget-ncm
+  TITLE:=USB CDC Ethernet (NCM)
+  KCONFIG:=CONFIG_USB_G_NCM
+  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
+  FILES:= \
+	$(LINUX_DIR)/drivers/usb/gadget/libcomposite.ko \
+	$(LINUX_DIR)/drivers/usb/gadget/function/u_ether.ko \
+	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ncm.ko \
+	$(LINUX_DIR)/drivers/usb/gadget/legacy/g_ncm.ko
+  AUTOLOAD:=$(call AutoLoad,52,usb_f_ncm g_ncm)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-gadget-ncm/description
+  Kernel support for USB CDC NCM gadget
+endef
+
+$(eval $(call KernelPackage,usb-gadget-ncm))
+
+
 define KernelPackage/usb-uhci
   TITLE:=Support for UHCI controllers
   KCONFIG:= \
-- 
1.9.1




More information about the Lede-dev mailing list