Linux Device Drivers, Third Edition
By Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman
February 2005
Pages: 636
ISBN 10: 0-596-00590-3 |
ISBN 13: 9780596005900




(Average of 7 Customer Reviews)


Description
Over the years, this bestselling guide has helped countless programmers learn how to support computer peripherals under the Linux operating system, and how to develop new hardware under Linux. Now, with this third edition, it's even more helpful, covering all the significant changes to Version 2.6 of the Linux kernel. Includes full-featured examples that programmers can compile and run without special hardware.
Full Description
Device drivers literally drive everything you're interested in--disks, monitors, keyboards, modems--everything outside the computer chip and memory. And writing device drivers is one of the few areas of programming for the Linux operating system that calls for unique, Linux-specific knowledge. For years now, programmers have relied on the classic
Linux Device Drivers from O'Reilly to master this critical subject. Now in its third edition, this bestselling guide provides all the information you'll need to write drivers for a wide range of devices.
Over the years the book has helped countless programmers learn:
- how to support computer peripherals under the Linux operating system
- how to develop and write software for new hardware under Linux
- the basics of Linux operation even if they are not expecting to write a driver
The new edition of
Linux Device Drivers is better than ever. The book covers all the significant changes to Version 2.6 of the Linux kernel, which simplifies many activities, and contains subtle new features that can make a driver both more efficient and more flexible. 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.
Featured customer reviews

High-water mark for LDD development books,
May 29 2008
Submitted by
Janaka
[
Respond |
View]
Introduction
I picked this book up as an experience embedded software engineer who wanted to explore and learn about Linux device drivers. With a background in real-time embedded software development(with some RTOS experience) and years of Linux/nix user/developer experience this book nicely matched my learning path.
Layout of the book:
The chapters are layed out in a logical and incremental fashion where introductory chapters stick to the big picture stuff while later on chapters delve deep in to the internals.
Contents and Examples:
Book takes the approach of explaining the subjects in concise manner with examples and interesting incite. However the code examples in many cases are incomplete, and duly so. I say this because the lot of examples, in their entirety, are provided on their web/ftp site.
Currentness and compatibility:
The book uses x86 as its platform and for its examples. I found some minor differences in API interfaces on other platforms(ppc). Also some of the latest kernels have altered some of the APIs slightly.
For who:
In my opinion this book is for software engineers/developers who has experience in C and Makefiles. Any embedded development experience will help understand why things are done the way they are and the deeper issues of concurrency and timing.
Conclusion:
This book is the benchmark for Linux device driver books. It is well set out and a easy read. To get the maximum out of the book you will need to play around with the examples/ideas that are covered in this book.
Linux Device Drivers, Third Edition reviewed by Carl J. Nobile of Ubuntu NY LoCo team,
December 04 2007
Submitted by
samiam010203
[
Respond |
View]
Linux Device Drivers, Third Edition
Book Reviewed by
Carl J. Nobile
December 1, 2007
My original intent was to write a chapter by chapter review of this book however, I ran into some major obstacles in doing so. As with most books code examples this book requires that you at least understand the code in order to understand the presented material. It is always best to actually see the code run.
When I first started reading this book I set up a Ubuntu Feisty 7.04 system using kernel 2.6.20 to compile and run the code presented in this book. Right off nothing compiled, so after some time searching the net I found at a Florida State University site some partially fixed and compilable code. The two professors that fixed this code are Ted Baker and Andy Wang. Their URL is: http://www.cs.fsu.edu/~baker/devices/. In an email correspondence Ted Baker told me he only did the minimal work to the code just enough to get it to compile meaning some drivers still did not work.
After finding this updated code I thought I had the tools I needed to get to work on understand the book and writing the original version of this review. During this process I installed a Ubuntu Gutsy 7.10 system using kernel 2.6.22 on a different and faster machine. Well to make a long story short the code I got from the nice professors at Florida State University ceased to compile on this kernel.
I suppose the moral of this story is that kernel code is in constant flux which I guess I had already known, but did not know to what extent it is in flux. This is after all the nature of software as my15 years as a developer has taught me. It would be nice however, if the authors of this book could keep their own code up to date. I am guessing here but between kernel 2.6.10, the version used by the authors, to the version I mentioned above I doubt that the driver architecture in the kernel has changed all that much. Most of the issues with compilation I tracked down myself have been constants and structures being moved between headers. As the authors are the most familiar with the code it is only logical that they keep this code in a compiled state.
In summery I would venture to say that a large percentage of the information in this book is still valid to the current kernels, but the newbie to driver and kernel development will not be able to fix this code easily. So my recommendation is that if you are already familiar with driver development and need a good reference book this is the book for you. If on-the-other-hand you are, like me, new to driver development and have some cycles to burn you might, in the mean time, want to pick up a language like Python or Ruby while waiting for the example code to get updated.
Spotty Coverage of Mapping Device Memory,
October 07 2006
Submitted by
Kent
[
Respond |
View]
I was hoping to use the information in this book to
help me write a driver to map some memory on a PCI
Express card to user space. While the book has lots
of partial examples that discuss how this could be
done, there is no complete example of a driver that
does this. I found this more than a little disappointing since it appears that there is a relatively complex sequence of events needed to pull this off.
Read all reviews
Very bad spanish translation,
September 11 2006
Submitted by
jlz
[
Respond |
View]
My english is not good, so I will buy spanish version of the book. The
book is good but the spanish translation is
very, very ,very bad. I hope more for a 44 € book.
Thanks.
Disappointing but no alternative,
August 02 2006
Submitted by Anonymous Reader [
Respond |
View]
This book has negative and positive sides:
Negative: the 3rd editions contains many wrong references to non-existing paragraphs etc. Very annoying if you want to follow the discussions. Many code snippets are unnecessary complicated which makes the general line of thought sometimes difficult to follow. For people with low knowledge of the kernel this will be a stopper. All listings are incomplete, but the online examples are no help either: it's an unordered set of files, sometimes not working or at least too little explanatory text.
There are not many alternative texts on this subject with all these details, so the book is a must-have for anybody who starts to write kernel modules. A very good outline of kernel characteristics wrt writing modules etc. Read it without a bottom-up approach in mind - you will need a lot more information, but this can be easily found on internet.
It was nice to see that many of the 2.4 kernel issues have been refreshed for 2.6.
A little disappointed,
February 09 2006
Submitted by Anonymous Reader [
Respond |
View]
I bought this book, after having very good experiences with the first two editions and now I'm a bit disappointed.
The main reason for buying was the "Backwards compatibility" section of each chapter, which contained some very nice hints and suggestions in the last two editions.
Although being a nice book for kernel 2.6 only development, this book is not the book I wanted to buy, since I do still have to compare between several sources in order to get the information I need.
Can't Work Without It,
August 09 2005
Submitted by
John
[
Respond |
View]
As a professional developer with Linux drivers deployed in the field, I can honestly say there is no way I could do it without this book; or at least not without a lot of headache, guesswork, uncertainty, inefficiency, and more time than any manager is willing to allot for a project! From the 1st edition to the 3rd, "Linux Device Drivers" is the bible of Linux device driver development.
My only criticism of the book (all editions) is Chapter 2, which describes the build process. This is the chapter that always leaves the most questions unanswered. For the 3rd edition in particular, the content is certainly sufficient for small-scale projects and hobbyists, but it is not sufficient for production environments with large development
trees. For anything significant, be prepared to resort to trial and error.
On the other hand, I'd hate to try to build even the simplest driver without the information that
is presented in Chapter 2!
Not only is this book a "must-read" for any Linux driver developer, but it is also an indispensible desk resource that will be referred to often... and frequently borrowed by colleagues throughout the office! This book isn't a dust collector.
Why not provide a free copy ?,
March 03 2005
Submitted by
albcamus
[
Respond |
View]
I'm not in America , and cannot buy this book that will be translated some months later,because the latter is always pretty miserable.
WHY NOT PROVIDE A FREE DISTRIBUTION ? THANK YOU...
Media reviews
"For anyone interested in writing device drivers for Linux the definitive text is O'Reilly's
Linux Device Drivers, now in its third edition...A
tour de force, this is a comprehensive, detailed, and clearly expressed text. The the authors and publisher manage to keep this title up to date is a feat in itself."
-- Major Keary, Book News
"Jonathan Corbet, Alessandro Rubini and Greg Kroah-Hartman's
Linux Device Drivers appears in its third updated edition to provide the latest update for any who wish to run new hardware under Linux. Linux kernal programming is at the heart of a title which reveals the basics of Unix system calls and C--but users needn't be hardcore programmers to find useful topics such as driver debugging, memory management, and driver models."
--Diane Donovan,
Donovan's Bookshelf, MBR Bookwatch, May 2005
Read all reviews