0

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?

0

Well you can start a search where the usb0 interface is loaded or which driver is used in every file by searching recursively in every file.

sudo grep -r "usb0" /

follow the input, if it is slow enough you will see some scripts in /opt/scripts/boot/. The grep will crash in the end.

debian@beaglebone:~$ ls /opt/scripts/boot/
am335x_evm.sh           autoconfigure_usb1.sh  capemgr.sh  generic.sh          legacy           omap5_uevm.sh
autoconfigure_usb0.sh~  beagle_x15.sh          default     generic-startup.sh  omap3_beagle.sh
debian@beaglebone:~$

As you can see I wanted to avoid loading of autoconfigure_usb0.sh by adding a '~' to it. But that didn't helped. The interface where already generated and the driver loaded.

So instead to manipulate the g_multi driver to parallel load the driver by using the configfs I decided to edit the am335x_evm.sh.

I added following line

USB_NETWORK_DISABLED="yes"
USB_IMAGE_FILE_DISABLED="yes"

but that didn't avoid the loading within the ifs. Actually I don't understand why but i guessed the environment variables are interpreted at start of the script or i don't set the right values to trigger following ifs

if [ ! "x${USB_NETWORK_DISABLED}" = "xyes" ]; then

So i moved the file by using

mv /opt/scripts/boot/am335x_evm.sh /opt/scripts/boot/am335x_evm.sh~

and restarted the system with

sudo shutdown -r now

Well and see I can use gadget driver g_printer.

Following links helped me. Everyone that hassle to much with the beagle bone should at least stay some hours in the beagle chat room Chat group around the beagle bone

They pointed again to the /opt/scripts/boot/ folder and different ways to dynamically load multiple drivers Drivers to load multiple driver instances and the provided interfaces Kernel USB Gadget Configfs Interface.

How do I grep recursively helped.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.