[OpenWrt-Devel] kernel: add kmod-usb-gadget-cdc-composite

Message ID 20181220095447.32366-1-karlp@etactica.com
State New
Headers show
Series
  • [OpenWrt-Devel] kernel: add kmod-usb-gadget-cdc-composite
Related show

Commit Message

Karl Pálsson Dec. 20, 2018, 9:55 a.m.
This builds the "g_cdc" gadget module, providing ethernet+serial.

Signed-off-by: Karl Palsson <karlp@etactica.com>
---
 package/kernel/linux/modules/usb.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Patch

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index fafa9a021e..c4b5715c5c 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -237,6 +237,22 @@  endef
 
 $(eval $(call KernelPackage,usb-gadget-mass-storage))
 
+define KernelPackage/usb-gadget-cdc-composite
+  TITLE:= USB CDC Composite (Ethernet + ACM)
+  KCONFIG:=CONFIG_USB_CDC_COMPOSITE
+  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite \
+	+kmod-usb-gadget-eth +kmod-usb-gadget-serial
+  FILES:= $(LINUX_DIR)/drivers/usb/gadget/legacy/g_cdc.ko
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-gadget-cdc-composite/description
+  Kernel support for the USB CDC Composite gadget.
+  This appears as an ethernet + ACM serial gadget.
+endef
+
+$(eval $(call KernelPackage,usb-gadget-cdc-composite))
+
 
 define KernelPackage/usb-uhci
   TITLE:=Support for UHCI controllers