[LEDE-DEV] [PATCH] kernel: clean up usb gadget support
Tim Harvey
tharvey at gateworks.com
Tue Sep 6 13:50:01 PDT 2016
On Tue, Sep 6, 2016 at 1:15 PM, Felix Fietkau <nbd at nbd.name> wrote:
> On 2016-09-06 18:57, Tim Harvey wrote:
>> On Sat, Sep 3, 2016 at 5:00 AM, Felix Fietkau <nbd at nbd.name> wrote:
>>> Adding libcomposite.ko to multiple packages is a really bad idea.
>>> Why did you prefer that over having proper dependencies in place?
>>
>> I don't believe I added any deps - I removed libcomposite from the
>> menu selection and included it directly in the gadgets that require it
>> because as far as I know there is no point in having libcomposite.ko
>> without the g_* drivers that use it.
> Adding libcomposite.ko to multiple packages is exactly the problem.
> That way you make it impossible to cleanly install multiple gadget
> modules. And besides, duplicating the same files in multiple packages is
> rather ugly.
What I was attempting to accomplish here was make it such that the
various 'gadget' drivers appear in a sub-menu of kmod-usb-gadget
because the way it is now kmod-usb-eth-gadget and
kmod-usb-serial-gadget are in completely different places and don't
appear until you select kmod-usb-lib-composite (how is a user supposed
to know that they need to select those first?). I'm not sure why
adding libcomposite.ko to multiple packages would create a problem...
it just gets installed once. You know way more about the openwrt/lede
kbuild system so please feel free to school me on the way to properly
make these menu's less confusing.
It seems to me a user should be able to say 'Add gadget support' which
then expands a sub-menu with the various available gadgets.
>
>> On a related note, what do you think about replacing all gadget
>> drivers (g_*) with usb_f_* modules using CONFIG_USB_CONFIG_FS allowing
>> userspace configuration of gadgets? I can see an OpenWrt init script
>> that builds composite gadgets based off of UCI config options. I'm not
>> sure what the future holds for the various g_* modules as you can
>> re-create those easily in userspace now.
> Makes sense to me, but I don't know much about this stuff.
>
Ok, I'll leave that for a later task after the gadget module selection
is cleaned up and a few more basic modules are added.
Tim
More information about the Lede-dev
mailing list