Re: modules problems

Jacques Gelinas (jack@solucorp.qc.ca)
Fri, 20 Sep 1996 10:44:57 -0400 (EDT)


On Fri, 20 Sep 1996, Sheldon E. Newhouse wrote:

> I think the HOW-TO and /usr/src/linux/Documentation/modules.txt should
> be revised to clarify this point. At least when I read that text, I
> thought that insmod and rmmod were the natural tools to use. It seemed
> that depmod was only a cute add-on. Also, is it possible that my problems have
> arisen because I have the directories /lib/modules/1.2.13 and
> /lib/modules/2.0.20 and the modprobe does not know which to look
> in? The man page seems to indicate that this is not so, but I have not
> played to see.
>
> What is the recommended way to set up the default paths so that each new
> build of kernel and modules will search for the properly compiled
> modules? If the current kernel is 2.0.20, I suppose one could set up a link
> /lib/modules/current -> /lib/modules/2.0.20
> and pass options to depmod in /etc/conf.modules to search this
> directory, but this requires the link to be updated with each new
> kernel build. Is there a better way?

The proper way to do this is to "do nothing". The module utilities use the
following path to locate the proper modules

/lib/modules/`uname -r`/

You can see this by doing

/sbin/modprobe -c | more

So to compile and install the modules properly, you simply do

make modules && make modules_install

Add the command "/sbin/depmod -a" in your /etc/rc.d/rc.S (or equivalent)
and this is it.

The problem still to be fixed is a way to differentiate modules compiled
for SMP and those for non-SMP. Working on it!

--------------------------------------------------------
Jacques Gelinas (jacques@solucorp.qc.ca)
Linuxconf: The ultimate administration system for Linux.
see http://www.solucorp.qc.ca:/linuxconf