Driving to Domination
Linux is a tortoise to the proprietary OS hares of the world. We all know how the story goes, and we've watched it play out in servers and embedded devices. (Still waiting on cell phones, but the turtle is gaining there too.)
Desktops and laptops are another matter. In no race has the going been slower for the tortoise, or its ultimate victory more inevitable, than in the race to make personal computers ready to drive any device that comes along. Lack of device drivers has always been blamed for slowing Linux's march to world domination in desktops and laptops.
But Linux will win that one too. Why? Because Linux likes its drivers in the kernel tree. There's no need to annoy the hacker and confuse the user with a CD full of binary code and promotional lockware. Instead you write an LKM. Here's how the HOWTO explains it:
Some people think of LKMs as outside of the kernel. They speak of LKMs communicating with the kernel. This is a mistake; LKMs (when loaded) are very much part of the kernel. The correct term for the part of the kernel that is bound into the image that you boot, i.e. all of the kernel except the LKMs, is "base kernel." LKMs communicate with the base kernel...
There is a tendency to think of LKMs like user space programs. They do share a lot of their properties, but LKMs are definitely not user space programs. They are part of the kernel.
The HOWTO goes on to explain the many advantages of LKMs. Some big hardware vendors have discovered those advantages, too. At the Linux Desktop Summit earlier this year, HP showed off how well its printers "just work" with a Linux box.
Ah, but what if you're not HP? What's to stop you from developing a device driver of your own?
Not much anymore. Greg Kroah-Hartman, Linux kernel subsystem maintainer, author of the LKM HOWTO, and co-author of Linux Device Drivers, 3rd Edition (O'Reilly, 2005), released a Device Driver Kit at FreedomHEC. "Have you felt left out of the crowd when looking at the 36 cdrom package of documentation and example source code that other operating systems provide for their developers? Well feel ashamed no longer!" he wrote. His version, in the Linux tradition, is a comparatively minimal: One cd image with what Greg says is "everything that a Linux device driver author would need in order to create Linux drivers". That includes a full copy of Greg's Linux Device Drivers book, and pre-built copies of all in-kernel docbook documentation. "It even has a copy of the Linux source code that you can directly build external kernel modules against." Greg adds. The kit is based on the 2.6.16.18 kernel release.
nybody can also download a copy for free here: http://www.kernel.org/pub/linux/kernel/people/gregkh/ddk/
- Doc Searls