Linux Device Drivers: Where the Kernel Meets the Hardware

Hardware. Linux Books. Resource Center leondumoulin.nl is a complete catalog .. Linux Device Drivers up to date is increasingly a challenge; the Linux kernel.
Table of contents

Counterintuitive though it might be from a proprietary viewpoint, this lack of internal kernel interface stability is preferable because both the kernel code and all of the drivers relying on it are open source. In fact, driver code is an integral part of the Linux operating system, not a second-class add-on. Once a driver is accepted into the mainline kernel, it will be maintained over time as internal kernel interfaces change.

That is, when a subsystem maintainer accepts a patch to make an incompatible change to a kernel interface, that patch will simultaneously upgrade every driver that relies on the interface. And, new drivers and any upgrades to them automatically flow downstream from the mainline kernel to all Linux distributions. The key strength of this approach from the user's viewpoint is that, in happy contrast with proprietary operating systems like Windows Vista, once a device is working on a given version of Linux, that support continues through all future versions.

Devices are generally only removed when they have become so rare that no users can be found. In Linux, hardware support only gets better; it never gets worse.

tab:linux-device-driver-model [Linux Foundation Wiki]

From the IHV's point of view, the big benefit is that an IHV's driver is maintained over time by the community, meaning that other people fix, tune, and add features to the driver. When internal kernel interfaces change in each new OS release, IHVs don't need to write and release a new driver; their driver is upgraded automatically. Obsolete interfaces can be deprecated and removed rather than being maintained indefinitely. Common subsystems can be factored out of drivers, enabling leaner, less buggy device drivers while adding more functionality for all hardware.

This improves the stability, security, and maturity of both the OS and the driver. In addition, the Linux model enables cross-architecture driver support nearly for free. Even when an IHV only tests their driver on one chip architecture, interested developers ensure that the driver works with every architecture that Linux supports, which is more than any other OS in history. The strength of this approach has been especially apparent over the last decade as many chip architectures have moved from the 32 to 64 bits.

Nearly all Linux drivers were quickly updated to support these newer architectures, while driver support for bit Windows Vista even on the highest volume x86 architecture remains extremely poor today. The biggest hurdle of the Linux driver model for some IHVs is the need to open source their driver code, which a small but thankfully dwindling number have been reluctant to do.

Also, once a driver is accepted into the mainline, it can take up to 18 months to be deployed into an enterprise distro. It has not until now been convenient to backport the driver to existing distros, but that is improving with the Driver Backport Workgroup. Having hardware reliably supported by Linux means getting the driver accepted into the mainline kernel. Supporting an out-of-mainline open source driver creates significant, never-ending support costs for the IHV, as new versions constantly need to be released as the kernel API changes.

But it is a consistent and compelling approach, and has been successful at supporting nearly the entire universe of computer hardware. Moreover, the vast majority of all IHVs have adapted to Linux and have thriving businesses that work with the Linux driver development model.

For the very small number of remaining IHVs that do not support mainline Linux drivers, it is time to embrace the Linux development model. Accommodating this Linux model means lower costs, more stable drivers, and brings the IHV into the mainstream of Linux development, the largest and most successful collaborative development project in history.

IHVs can get their driver written for free by volunteer kernel developers.

Linux Device Drivers, 3rd Edition

The IHV provides a specification that describes how their device works, the email address of an engineer willing to answer questions, and ideally a few sample devices. An expert developer team of volunteers led by Greg Kroah-Hartman returns a complete and working Linux driver that is added to the mainline Linux kernel source tree. The driver like all Linux drivers is automatically kept up to date and working through all Linux kernel API changes. The driver will work with all of the different CPU types supported by Linux, the largest number of CPU types supported by any operating system ever.

More info is on the Linux Driver Project website. There's a recent call from Linus Torvalds and the subsystem maintainers for IHVs to merge new drivers early, as long as the new driver:. Readers will find new chapters on important types of drivers not covered previously, such as consoles, USB drivers, and more. Best of all, you don't have to be a kernel hacker to understand and enjoy this book. All you need is an understanding of the C programming language and some background in Unix system calls. And for maximum ease-of-use, the book uses full-featured examples that you can compile and run without special hardware.

Today Linux holds fast as the most rapidly growing segment of the computer market and continues to win over enthusiastic adherents in many application areas. With this increasing support, Linux is now absolutely mainstream, and viewed as a solid platform for embedded systems.

If you're writing device drivers, you'll want this book. In fact, you'll wonder how drivers are ever written without it. Understanding the Linux Kernel. The Linux Programming Interface. Windows Internals, Part 1. A Beginners Guide, Sixth Edition. The Official Ubuntu Server Book.

Books & Videos

Hands-on Guide to the Red Hat Exams. Squid Proxy Server 3.

Linux Device Drivers Training

Understanding and Using C Pointers. Red Hat Enterprise Linux 6 Administration. Developing Drivers with the Windows Driver Foundation.


  • Linux Device Drivers, Third Edition [leondumoulin.nl].
  • The Father Omega Sextet.
  • A Practical Guide to Single Storey House Extensions.
  • Linux Device Drivers, 3rd Edition - O'Reilly Media.
  • The Blacksmiths Cottage;
  • Aristotle and the Philosophy of Friendship.

Eric van der Vlist. C in a Nutshell. Kernel programming is very different from system programming is very different from device driver programming. A very good kernel programmer may not know a lot about interrupt latency and hardware determinism, but she will know a lot about how locks, queues, and Kobjects work.

A device driver programmer will know how to use locks, queues, and other kernel interfaces to get their hardware working properly and responsively, but he won't be as likely to fix a page allocation bug or write a new scheduler. So, pick what interests you most, perhaps by surveying development lists or bug trackers, and see what kinds of impact you want to make. Then, contribute and build experience by working on those projects and efforts. I have a BSCE degree. So I'm not an amateur. Software engineering has become just like medicine in that practitioners must specialize.

But when your company downsizes and lays you off after 10 years of being a specialist, you find the job market has changed and you're not current. Companies used to not be so selective - frequently now the only candidate who has all the skills in the wishlist are those already working for that company or a direct competitor! Its become quite tough. I am in this situation now and while its hard, there are a few strategies you can use to get hired.

But first, you MUST become proficient in the technology because if hired, you'll be expected to produce. Once you feel ready, consider the following:. Look for a small company to start with.


  • Reward Yourself?
  • Flight.
  • Spring 2013.
  • Advances in Heterocyclic Chemistry: 95.
  • Executive Summary.

They cannot be so picky about who they hire as are the big guys. Spend a year or two there and after that, you'll have the professional experience on the resume to qualify. Consider contracting, especially if you are not working full time. Companies are much more willing to take a chance on a contractor than full time. Again, once you have verifiable experience to put on your resume, it opens doors.

Do a small project or two on your own and create a portfolio to present to prospective employers.

What is Kobo Super Points?

This may open the door to entering not only a small company but a midsized one as well. In addition to the above, consider using a professional recruiter from a company such as Kforce, Aerotek, etc. The employer pays the recruitment fee and the recruiter will help sell you in a way that you cannot do on your own.