root/i2c/trunk/doc/modules

Revision 3380, 1.8 kB (checked in by frodo, 9 years ago)

More documentation updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 Managing Modules
2 ================
3
4 The hardcore way is to insmod each of them by hand. This is not very
5 practical, though. It is better to install them in a subdirectory that
6 modprobe examines. /lib/modules/current/extra/misc comes to mind.
7 You need to add this path to your /etc/modules.conf (or /etc/conf.modules,
8 which file is used depends on your distribution):
9   (modules-2.0.0):
10     path[misc]=/lib/modules/current/extra/misc
11   (modutils-2.1.x):
12     path=/lib/modules/current/extra
13 Do always a 'depmod -a' after changing either your configuration file or
14 changing a module in one of the module directories; you also need to do
15 a 'killall -HUP kerneld' if you still use kerneld (kernel 2.2.x usually
16 uses kmod).
17
18 Now you can do 'modprobe i2c-elv', and all dependent modules are loaded
19 automatically. You could, of course, add this statement (and related
20 statements for other drivers) somewhere in your rc files. But, most
21 distributions are set up to load automatically all files in the
22 'boot' directories on system start, so why not use this? The best
23 way to do this is to create directory /lib/modules/boot, and to
24 put *links* to the real modules in there. Why links? Well, by linking
25 to /lib/modules/current/whatever, this will function for any kernel
26 (provided /lib/modules/current is correctly set up to point to the
27 current kernel). So:
28   mkdir -p /lib/modules/boot
29   ln -s ../current/extra/misc/lm78.o /lib/modules/boot/i2c-elv.o
30   # etc.
31
32 It is also possible to specify default options, that you would normally
33 enter at the insmod command, in the configuration file. The syntax is
34 as follows:
35   options i2c-core debug=2
36
37 Finally, it is possible to auto-load the i2c-dev module if a /dev/i2c-*
38 file is accessed. You need the following line in the configuration file:
39   alias char-major-89 i2c-dev
40
41 With the above, the managing of all those modules is suddenly no problem
42 at all!
43
44
Note: See TracBrowser for help on using the browser.