dkms cool!

july 18, 2007

For a long while, I was using kernel modules built at atrpms to drive the Atheros-based wifi card in my old P3 notebook.  The only drawback with using pre-compiled kernel modules is that whenever there is a kernel upgrade, I'd be left without the module for that newer kernel -- and without wifi access until the module showed up on atrpms.  The other route I could have taken was to download the source for madwifi and build the kernel module every time I got a kernel upgrade.  That was cool and all, but it was still work. Recently, I discovered dkms (dynamic kernel module support).  This is a cool little project by Dell (of all people).  Its purpose is two fold.  First, dkms is a way to manage different versions of driver code by separating kernel modules versions from kernel versions.  Second, it allows for rpm to manage packages and dkms to manage modules.  It may seem like a tiny job, but it is actually very useful.  The biggest thing for me is the auto build and installation of kernel modules.  Now, when the kernel is upgraded, on reboot, dkms will dynamically build a new kernel module and load it.  The old kernel modules are also kept, so that if I ever needed to go back to an older kernel, I could -- and dkms would take care of loading the correct module for me. dkms makes drivers a lot more like how they work in Windows -- where you install a driver once and forget about it,  you don't have to worry about the kernel version changing.  Kudos to Dell for putting out this very useful tool.  For my old P3 notebook running CentOS5, I now use rpmforge to get modules as dkms packages.  I also use the protect-base plugin for yum to protect the base CentOS5 packages from being overwritten by rpmforge (yum install yum-protectbase).  When my subscription for RHEL5 runs out next year, I'll probably switch my current RHEL notebook over the CentOS5 using the same scheme to get kernel modules for the 3945abg wifi card in that notebook.

<< back || ultramookie >>