module-init-tools: config file for weak-modules

Matt Domsch Matt_Domsch at dell.com
Tue Mar 20 13:34:32 CST 2007


On Tue, Mar 20, 2007 at 08:13:57PM +0100, Marco d'Itri wrote:
> On Mar 20, Jon Masters <jonathan at jonmasters.org> wrote:
> 
> > Matt_Domsch at dell.com wrote:
> > 
> > >I propose module-init-tools adds a config file,
> > >/etc/sysconfig/module-init-tools, with values as such:
> Matt, maybe you could explain what this weak-modules tool is for and
> why distributions need to do something about it?

Both Red Hat and SuSE kernel installation routines invoke the
weak-modules script to make 3rd party modules built for earlier
kernels be available for the newly installed kernel.


If you look at Fedora Core 6, SLES10, RHEL5, you find the weak-modules
script.  Fundamentally, it looks for add-on kernel modules in
/lib/modules/$kernelver/extra.  For each, it generates the list of
versioned kernel symbols used by those modules, and compares against
the list of installed kernels for matches.  It then creates
directories /lib/modules/$otherkernelver/weak-modules/ and puts
symlinks there back to the add-on kernel module.  In this way, kernel
$otherkernelver can make use of modules built for kernel $kernelver as
long as the KABI for those modules matches in $otherkernelver.  This
avoids the manditory recompile/relink of add-on kernel modules just
because a newer kernel is installed.  It now becomes optional.

DKMS now also invokes weak-modules, but has to look for it in a few
places, and the directory it should install its modules into is
different based on the distro/version.  My proposal lets each distro
specify where it wants those add-on modules to go, and where to find
the weak-modules script - without DKMS having to know specifics for
each distro/version itself.


Thanks,
Matt


-- 
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com



More information about the DKMS-devel mailing list