DKMS inter-module dependencies

Christoph Mathys eraserix at gmail.com
Fri Jun 18 06:17:00 CDT 2010


Hello Martin

> Is it somehow possible to declare inter-module dependencies in DKMS to
> make sure that some modules are compiled in a pre-configured order?

Have you been able to find a solution to this dependency problem
(other than putting all into one dkms-module and see to the order
yourself)?

I face the same problem, but I'd really like to avoid putting all
kernel modules into one dkms module. Some of the modules can only be
built for specific kernels and dkms handles this quite nicely. The
whole problem arises because the modules depending on another module
need to have access to Modules.symvers of the module they depend on
(Module.symvers is created during module build). If they can't access
this file, the build will spit out some warning about unknown symbols
but run through. However, kernels with CONFIG_MODVERSIONS set will
refuse to load the module (and at least the ubuntu kernels I saw had
this always set).

dkms itself seems to only care about a specific directory at a time.
So adding some ordering to dkms_autoinstaller seems the easy way to
go. This would of course only work if all automated module building
(reboot, new kernel, etc) uses this script. If some script unaware of
ordering constraints uses 'dkms build' directly, it may brake (or not,
you can't tell before insmod and chances are that you will end up
having an unloadable .ko).


Christoph



More information about the DKMS-devel mailing list