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

John Crispin john at phrozen.org
Fri Sep 16 05:53:06 PDT 2016


Hi,


On 15/09/2016 16:51, Tim Harvey wrote:
> 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 \

this is included here and ...

> +	$(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 \

here again. this seems wrong and will result in an error when both are
installed and then one of the 2 is removed.

	John

> +	$(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:= \
> 



More information about the Lede-dev mailing list