Hi,
How do I include the following in the system startup?
insmod g_file_storage.ko file=/dev/mmcblk0p1stall=0 removable=1
I have create a shell script to run the command and put a link to the shell script in /etc/rc5.d but I get an error:
“insmod: cannot insert ‘g_file_storage.ko’: Cannot allocate memory”
I need to set up the system to do the above, then auto launch another executable at boot with no login. How do I do that?
-Stevo
In angstrom you can edit /etc/default/usb-gadget*, the accompanying app will load it at boot.
regards
Koen
Hi Koen,
Thanks for the help. Is there any online docs you can point me to on how to setup the gadget stuff in /etc/default/usb-gadget*?
-Stevo
If you look a the file you'll see it only really takes 2 options: name and options, so in your case 'storage' and 'file=/dev/mmcblk0p1 stall=0 removable=1'. I didn't think that would warrant wasting bytes online on 
Hi Koen,
Thanks again for the help. I was not with the device at the time I wrote the last e-mail. Now I am.
I did not have the file you were referring to in that directory. I have created the file and these are the contents:
root@BeagleBoard:/# cat /etc/default/usb-gadget
USB_MODE="storage"
MODULE_OPTIONS="file=/dev/mmcblk0p1 stall=0 removable=1"
I currently have the kernel built to include the file storage gadget as built-in.
Upon boot, I'm getting the following error:
"g_file_storage gadget: no file given for LUN0"
What am I missing?
Thanks again for all your help!
-Stevo