/sys/kernel/config/usb_gadget not created

Hello All.

I have been trying to run a gadget-side driver on beaglebone black.

The driver has earlier been run on a x86_64 machine using a dummy-HCD and configs, now trying on beaglebone-black. For using configfs, we need to have the /sys/kernel/config/usb_gadget directory, where the driver-function/device details can be specified.

Following are the steps that have been taken (on the beaglebone black machine) :

  1. git clone GitHub - beagleboard/linux: The official BeagleBoard and BeagleBone kernel repository
  2. git checkout 4.19.94-ti-r42
  3. Kernel and modules were built and installed.

Thereafter, following are run after reboot :

$ uname -r

$ ls -lrth /sys/kernel/config/
total 0

$ sudo modprobe libcomposite

$ lsmod | grep libcomposite
libcomposite           61440  0 

$ lrth /sys/kernel/config/
total 0

$ sudo mount none /config -t configfs

$ ls -lrth /sys/kernel/config/
total 0

What am I missing?

Thanks and Regards,

Got it solved. The correct ordering is :

sudo mount none /sys/kernel/config -t configfs
sudo lsmod libcomposite

After the above, /sys/kernel/config/usb_gadget was created.

Okay this makes more sense now… between r42 and r73 CONFIGFS_FS has been moved to built-in…

voodoo@hestia:/opt/github/bb.org/4.19.x$ cat normal/version.sh  | grep BUILD
voodoo@hestia:/opt/github/bb.org/4.19.x$ cat normal/patches/defconfig | grep CONFIGFS_FS