I used an given ArchLinux on a BeagleBone Black and used on test environment the gadget drivers(g_printer, g_serial) as I encounter driver problems with some wifi dongles. The drivers where not compatible with 4.19 of linux.
After some hassle I moved to a a raspberry pi 3+ and like that the provided debian image was more usable in this context.
Now i tried to use this image also for the other test but encounter following message
sudo modprobe g_printer dmesg | tail
[ 321.445928] udc-core: couldn't find an available UDC - added [printer] to list of pending drivers
I tried to unload all the modules with also
sudo modprobe -rf g_ether sudo modprobe -rf usb_f_mass_storage
But they where already used from the debian image to provide easy-to-use interfaces. I didn't find a way to unload all of those.
I needed to change something with the boot up. But where and how I can find the scripts and change them to avoid the load?