CG wrote:
> Hello,
> I would like to have the process to be able to load usb gadget modules with
> modprobe command.
> when I execute modprobe g_serial
> I got this message errors
> insmod: /lib/modules/2.6.12: No such file or directory
> insmod: /lib/modules: No such file or directory
> insmod: g_Serial.o: no module by that name found
> Any idea to create these directories and have these modules in there.

# make modules
# make modules_install

You then have to create the dependencies file: /lib/modules/2.6.12/modules.dep. 
I have a special script for this that I borrowed from Busybox which
allows me to do a cross platform "makedep". Download Busybox and go to 
/examples/depmod.pl

Call depmod.pl like so (and change the paths to the directory you make the 
ramdisk from):

./depmod.pl -v -k ./vmlinux -F ./System.map -b 
../../fs/lib/modules/2.6.12-rc1-vrs1/ > 
../../fs/lib/modules/2.6.12-rc1-vrs1/modules.dep


> Do I have to create /lib/modules/2.6.12 in ramdisk?

Yes.

Then you can use modprobe and it will know which modules need to be loaded to 
support other modules. This makes life a LOT easier. It also helps with
hotplugging.

e.g.
# lsmod
Module                  Size  Used by
at91_i2c                1540  0
i2c_dev                 5120  0
i2c_core               11696  2 at91_i2c,i2c_dev

# modprobe g_serial
udc: at91_udc version 8 March 2005
gs_bind: Gadget Serial v2.0 bound
gs_module_init: Gadget Serial v2.0 loaded

# lsmod
Module                  Size  Used by
g_serial               13708  0
at91_udc                7392  1 g_serial
at91_i2c                1540  0
i2c_dev                 5120  0
i2c_core               11696  2 at91_i2c,i2c_dev


regards,

Aras Vaichas




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to