"/sys/kernel/config/usb_gadget" missing

On beagle, to see usb_gadget folder, I have to run a script that has:


....
mkdir -p /config	
mount -t configfs none /config
...

But some other build I see ‘usb_gadget’ inside ‘/sys/kernel/config’.

Anyone know flags or configurations that make this different?

Many thanks,

Try:

modprobe libcomposite

Then try the mount.

https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt

Hi, we added it as bulitin module and already called.

mmm, this is on a new install on a BBB:

debian@beaglebone:~$ uname -a
Linux beaglebone 4.19.94-ti-r42 #1buster SMP PREEMPT Tue Mar 31 19:38:29 UTC 2020 armv7l GNU/Linux

debian@beaglebone:~$ ls -l /sys/kernel/config
total 0
drwxr-xr-x 3 root root 0 Jun 24 14:55 usb_gadget

debian@beaglebone:~$ ls -l /sys/kernel/config/usb_gadget/g_multi/functions/
total 0
drwxr-xr-x 2 root root 0 Jun 24 14:55 acm.usb0
drwxr-xr-x 2 root root 0 Jun 24 14:55 ecm.usb0
drwxr-xr-x 3 root root 0 Jun 24 14:55 mass_storage.usb0
drwxr-xr-x 3 root root 0 Jun 24 14:55 rndis.usb0

Poking around I guess this is setup by /opt/scripts/boot/am335x_evm.sh