[LEDE-DEV] [PATCH] kernel: add additional gadget drivers
Rafał Miłecki
zajec5 at gmail.com
Fri Sep 16 06:02:56 PDT 2016
On 16 September 2016 at 14:53, John Crispin <john at phrozen.org> wrote:
> 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.
Hint: a separated package for libcomposite.ko that will be selected by
both of your packages.
--
Rafał
More information about the Lede-dev
mailing list