📄 modules
字号:
Managing Modules================The hardcore way is to insmod each of them by hand. This is not verypractical, though. It is better to install them in a subdirectory thatmodprobe examines. /lib/modules/current/extra/misc comes to mind.You need to add this path to your /etc/modules.conf (or /etc/conf.modules,which file is used depends on your distribution): (modules-2.0.0): path[misc]=/lib/modules/current/extra/misc (modutils-2.1.x): path=/lib/modules/current/extraDo always a 'depmod -a' after changing either your configuration file or changing a module in one of the module directories; you also need to doa 'killall -HUP kerneld' if you still use kerneld (kernel 2.2.x usuallyuses kmod).Now you can do 'modprobe i2c-elv', and all dependent modules are loadedautomatically. You could, of course, add this statement (and relatedstatements for other drivers) somewhere in your rc files. But, mostdistributions are set up to load automatically all files in the'boot' directories on system start, so why not use this? The bestway to do this is to create directory /lib/modules/boot, and toput *links* to the real modules in there. Why links? Well, by linkingto /lib/modules/current/whatever, this will function for any kernel(provided /lib/modules/current is correctly set up to point to thecurrent kernel). So: mkdir -p /lib/modules/boot ln -s ../current/extra/misc/lm78.o /lib/modules/boot/i2c-elv.o # etc.It is also possible to specify default options, that you would normallyenter at the insmod command, in the configuration file. The syntax isas follows: options i2c-core debug=2Finally, it is possible to auto-load the i2c-dev module if a /dev/i2c-*file is accessed. You need the following line in the configuration file: alias char-major-89 i2c-devWith the above, the managing of all those modules is suddenly no problemat all!
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -