How to configure extra USB gadgets on BBB?

Is there a way to configure extra USB gadget endpoints in addition to the BBB default ones or do I just have to go in and edit the am335x_evm.sh script?

Thanks.

https://www.kernel.org/doc/Documentation/usb/gadget_multi.rst

Well, that documentation seems to be quite old and the shell script itself seems to indicate that I should be using a different path to a composite gadget (via libcomposite?), no? It also doesn’t seem like I need to hack the driver for things llike Ethernet anymore. Finally, that link only mentions up to Windows 7, so I suspect it is quite old, at this point.

`
if [ “${kernel_major}” -lt “${compare_major}” ] ; then
use_old_g_multi
elif [ “${kernel_major}” -eq “${compare_major}” ] ; then
if [ “${kernel_minor}” -lt “${compare_minor}” ] ; then
use_old_g_multi
else
use_libcomposite
fi
else
use_libcomposite
fi

`

What am I missing? I am, quite obviously, unfamilar with all the incantations around composite devices or I wouldn’t be asking.

And my question about “Is there a way to do this without mangling the am335x_evm.sh script?” still stands. It appears tha answer is “No.”, but I have so little experience around this that I really don’t trust my gut instincts to be useful here.

Thanks.