[beagleboard] gadgetfs

I have been trying to work through the sample code for a gadgetfs
usermode driver for a usb device (http://www.linux-usb.org/gadget/
usb.c). The system I have loaded on the BeagleBoard is Angstrom LINUX
(http://www.angstrom-distribution.org/building-angstrom). The problem
I find myself working through is this, in the usb.c code you need to
access the files /dev/gadget/{ep1in, ep1out, ep3}.

From the source:

/* Something based on Mentor USB Highspeed Dual-Role Controller */
} else if (stat (DEVNAME = "musb_hdrc", &statb) == 0) {
    HIGHSPEED = 1;
    device_desc.bcdDevice = __constant_cpu_to_le16 (0x0107),

      = hs_source_desc.bEndpointAddress
      = USB_DIR_IN | 1;
    EP_IN_NAME = "ep1in";
    fs_sink_desc.bEndpointAddress = hs_sink_desc.bEndpointAddress
      = USB_DIR_OUT | 1;
    EP_OUT_NAME = "ep1out";

    source_sink_intf.bNumEndpoints = 3;
      = hs_status_desc.bEndpointAddress
      = USB_DIR_IN | 3;
    EP_STATUS_NAME = "ep3";


I have loaded the gadgetfs module:

root@beagleboard:~# lsmod
Module Size Used by Not tainted
gadgetfs 18100 1

And I have mounted the gadgetfs filesystem

root@beagleboard:~# cat /etc/fstab
# stock fstab - you probably want to override this with a machine
specific one

rootfs / auto
defaults 1 1
proc /proc proc
defaults 0 0
devpts /dev/pts devpts
mode=0620,gid=5 0 0
usbfs /proc/bus/usb usbfs
defaults 0 0
tmpfs /var/volatile tmpfs
defaults 0 0
tmpfs /dev/shm tmpfs
mode=0777 0 0
tmpfs /media/ram tmpfs
defaults 0 0
gadget /dev/gadget gadgetfs
defaults 0 0
#gadget /dev/gadget gadgetfs
noauto,user,group 0 0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1 /media/card auto
defaults,sync,noauto 0 0


When I check the /dev/gadget directory, all I have is

root@beagleboard:~# ls /dev/gadget/

The kernel build is

root@beagleboard:~# cat /proc/version
Linux version 2.6.29-omap1 (tinyNome@ubuntu) (gcc version 4.3.1
(GCC) ) #1 PREEMPT Tue Apr 13 14:05:53 EDT 2010

Any thoughts? Have I failed to load a module I need? Is there a known
issue with this kernel and the beagleboard. I have checked online and
could not find any information. Thanks.

Hi there,

I’m stuck with the same problem but with a beaglebone black running angstrom v2012.2.
Using the same example I always ended up in the else-branch of init function.
Then I tried forcing the execution into the musb_hdrc branch by exchanging the if statetement for an if ( true) statement.
After that I still got errors but this time:
musb_hdrc: No such file or directory

I noticed that there seem to be some files related to the musb_hdrc device in
namely directories called musb-hdrc.0.auto and musb-hdrc.1.auto as well as “power”, “uevent”, “subsystem”, “modalias” and “driver”.

Did you succeed with your problem? Can you help me out?

Thanks and regards