[LEDE-DEV] [PATCH] kernel: clean up usb gadget support

Felix Fietkau nbd at nbd.name
Tue Sep 6 14:59:41 PDT 2016


On 2016-09-06 22:50, Tim Harvey wrote:
> 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. 
opkg really doesn't like it when one package overwrites files from
another - understandably.

> 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.
Yes, you can do that. But you don't need to touch kmod-usb-libcomposite
for it... The parts that remove it are completely unnecessary.

- Felix



More information about the Lede-dev mailing list