On Wednesday 18 October 2006 10:29, cl@isbd.net wrote:
How do modules get installed (as in attached to the kernel when the system starts up)? In my previous encounters with modules I think it was a totally manual process in that one had to add the required modprobe command to the rc files. Is this still true or is there some sort of automatic process that does this nowadays?
You can install modules with modprobe (remove them with rmmod, and list the currently installed ones with lsmod, though I'm sure you know that). In Debian, you can add the names of any additional modules you want to be installed at boot to the file /etc/modules. I'm not sure how other distros handle this. However, at least on my machine, the boot process is pretty good at finding all the hardware I have and automatically installing the modules it needs.
What does setting a device to [M] in the kernel configuration actually do? It can't be necessary for a module to work as otherwise one wouldn't be able to add new modules would you? (E.g. I seem to have added my RTL8168 module by just compiling it and installing it, it doesn't appear in the kernel configuration - or does it?)
If you set a module to M in the kernel config, the kernel builder will compile it as a module (the other options are to have in compiled into the main kernel binary, or not compiled at all - in which case its unavailable). Any LKM compatible binary can be installed into a running kernel, it doesn't have to been shipped with the kernel distribution or compiled by the kernel builder. If you compile and install a kernel module independently of the main kernel source then, no, it won't appear in the kernel config. (The principal situation where 3rd party modules /would/ be included in the kernel config is when they need to be compiled into the main kernel binary, in which case the distributor will most likely produce diffs to be applied to the kernel source.)
Cheers, Richard