DKMS (Dynamic Kernel Module Support) is a framework where device driver source can reside outside the kernel source tree so that it is very easy to rebuild modules as you upgrade kernels. This allows Linux vendors to provide driver drops without having to wait for new kernel releases (as a stopgap before the code can make it back into the kernel), while also taking out the guesswork for customers attempting to recompile modules for new kernels. For veteran Linux users it also provides some advantages since a separate framework for driver drops will remove kernel releases as a blocking mechanism for distributing code.
| Tags | Systems Administration |
|---|---|
| Licenses | GPL |
| Operating Systems | POSIX Linux |
Recent releases


Changes: This release resolves minor bugs with the auto installation service in indicating failures.


Changes: The big improvement here is that Fedora rawhide (will be Fedora 9) now includes RPM hooks, similar to Ubuntu's triggers, to invoke the DKMS autoinstaller at the end of an RPM transaction when a new kernel is installed. This means there is no need to wait for a reboot to invoke the dkms_autoinstaller: it is now invoked right after a new kernel is installed, so one can rebuild drivers immediately and include them in the initial ramdisk.


Changes: This release will call udevtrigger if it installs a module for the currently running kernel. It will uninstall from /extra before DEST_MODULE_LOCATION, and run depmod after uninstallation.


Changes: An issue where installs during --rpm_safe_upgrade could incorrectly fail was fixed. SLES10 driver disk creation was broken (and may still be). Ubuntu packaging and a mkdeb command (which has been accepted into Ubuntu Universe for Gutsy) were provided. mkrpm now adds automatic Provides: lines with modalias info. This will eventually be used to automatically download drivers that match the hardware you have in your system.


Changes: The ability to generate Ubuntu driver disks and debs was added.
- All comments
Recent comments*Very* pleasently suprised!
DKMS is good stuff! My employer packages a product that requires a number of kernel modules, and keeping the modules up-to-date with vender's kernel patches had been something of a pain point. DKMS not only automates this nicely, but does so with an astonishingly painless-to-write config file syntax. (Incidentally, I've posted my dkms.conf files to the dev lists and/or patch trackers of the relevant projects; hopefully they'll be adopted upstream).
My only quibble is that I've had to write a few quick scripts here and there to support operations like "recompile all installed modules against all kernels which aren't already prepped" and the like. Supporting --all in more places might be nice, likewise for somewhat more in-depth and less ambiguous documentation ("[--foo bar]" should just be "--foo bar" in a usage string if --foo is a mandatory parameter!), but these are all trivial quibbles (and may already be fixed in the development version, which I haven't looked at yet). DKMS has already saved me a great deal of time and frustration; Kudos!
Re: DKMS White Paper
Also, check out this more recent paper which deals with DKMS more from the systems management and administration perspective: http://www.dell.com/downloads/global/power/1q04-ler.pdf
DKMS White Paper
Read more about DKMS in this paper.
http://www.linuxjournal.com/article.php?sid=6896
Re: Test module package to try DKMS with
> The RPM is located at:
> http://www.lerhaupt.com/dkms/qla2x00-clariion_dkms-v6.04.00-0p.noarch.rpm
The latest testable RPM is now at:
http://www.lerhaupt.com/dkms/qla2x00-clariion_dkms-v6.04.00-0s.noarch.rpm
Test module package to try DKMS with
To get the full feeling of how DKMS works, you'll probably need to try it with a module which supports DKMS. All this really requires is a module tarball with an additional properly formatted dkms.conf file.
I have created a QLogic RPM which installs modules source and then uses DKMS to build and install the driver. The RPM is located at: http://www.lerhaupt.com/dkms/qla2x00-clariion_dkms-v6.04.00-0p.noarch.rpm
If you don't like RPMs, I've mocked up a qlogic tarball with the dkms.conf file and an install script which calls dkms to do all the dirty work. The mocked up tarball is at: http://www.lerhaupt.com/dkms/qla2x00-clariion_dkms-v6.04.00.tar.gz