DKMS and weak-modules (kABI)

Panu Matilainen pmatilai at laiskiainen.org
Fri Feb 9 03:20:27 CST 2007


Hi,

I've been converting our kernel module packages over to dkms at work 
and simply loving it for the most part :) One of the "issues" I'm having 
with it is that while automatic compiling on boot is very, very nice, it 
can take significant amount of time and it'd be nice to skip it when 
it's not strictly needed. Enter kABI (and RHEL5 beta which is where I'm 
testing this stuff).

I have a patch to make dkms call /sbin/weak-modules after installing a new 
module, and that works as expected, the newly built+installed dkms modules 
get linked to all compatible kernels. So far so good, but here is where 
the trouble starts:
- the module dkms just built now potentially exists in several kernel 
versions, but dkms doesn't know about it
- when booting to a new kernel which is covered by weak-modules 
symlinking, dkms thinks an original module exists in that kernel, and then 
goes on to build and install its modules anyway, making backups of the 
symlinks basically :) and undoing the whole purpose of the symlinks
- when the above happens (original modules exist) dkms_autoinstall seems
to exit with an error code making the condition look far worse than it 
actually is

Various workarounds to avoid needlessly rebuilding are possible and 
easyish, but I suppose optimally dkms should know about links created by 
weak-modules and keep record of them in its db so it can *really* handle 
them and show correct status output etc.

Any thoughts on how to best handle this? I'm willing to do (much of) the 
work once we agree how it should be done.

 	- Panu -



More information about the DKMS-devel mailing list