Linux Device Drivers
By Alessandro Rubini
February 1998
Pages: 439
ISBN 10: 1-56592-292-1 |
ISBN 13: 9781565922921




(3) (Average of 9 Customer Reviews)
This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.
The latest edition is also available on Safari Books Online.
Description
This practical guide is for anyone who wants to support computer peripherals under the Linux operating system or who wants to develop new hardware and run it under Linux. It shows step-by-step how to write a driver for character devices, block devices, and network interfaces, illustrated with examples you can compile and run. Focuses on portability.
Full Description
This book is for anyone who wants to support computer peripherals under the Linux operating system or who wants to develop new hardware and run it under Linux. Linux is the fastest-growing segment of the UNIX market and is winning over enthusiastic adherents in many application areas. This book reveals information that heretofore has been passed by word-of-mouth or in cryptic source code comments, showing how to write a driver for a wide range of devices.
You don't have to be a kernel hacker to understand and enjoy this book; all you need is an understanding of C and some background in UNIX system calls. Drivers for character devices, block devices, and network interfaces are all described in step-by-step form and are illustrated with full-featured examples that show driver design issues, which can be executed without special hardware.
For those who are curious about how an operating system does its job, this book provides insights into address spaces, asynchronous events, and I/O.
Portability is a major concern in the text. The book is centered on version 2.0, but also covers 1.2.13 and experimental versions up to 2.1.43. You are also told how to maximize portability among hardware platforms.
Contents include:
- Building a driver and loading modules
- Complete character, block, and network drivers
- Debugging a driver
- Timing
- Memory management and DMA
- Interrupts
- Portability issues
- Peripheral Component Interconnect (PCI)
- A tour of kernel internals
Featured customer reviews

Linux Device Drivers Review,
June 03 2001
Submitted by Han Kim
[
Respond |
View]
I liked the book and it presented a useful model of the Linux Kernel
well.
As many others have pointed out, there have been many changes to the
Kernel versions after 2.1 and the book's source code examples are
mostly for version 2.0.
If you are using this book with a 2.2 or later kernel (Redhat's
version 7 binary is version 2.2 and the source is 2.4), be sure to
read "Chapter 17 Recent Development's" BEFORE you try the code
examples in Chapter 2. It will save you alot of time trying to
find the 2.0 kernel features such as the symtab_begin.h and symtab_end.h
header files.
Linux Device Drivers Review,
May 22 2001
Submitted by ashutosh trivedi
[
Respond |
View]
The book is really a piece of great work by a great mind.It takes u off from ground level and after reading the whole book u feel like a real life kernel hacker.Hats off to the author.........
Really a brilliant work..........
Linux Device Drivers Review,
May 03 2001
Submitted by Stephen Forster
[
Respond |
View]
When I complained that the content was outdated several months ago, I was informed that the 2nd edition was due out this month (May 2001). When it is available, I will probably buy it.
Whatever you do, don't buy this one.
Read all reviews
Linux Device Drivers Review,
February 19 2001
Submitted by mike b
[
Respond |
View]
Shame on you for selling such an outdated book!
Being new to Linux kernel programming, I didn't realize how useless it really was until I got it home. Also, the continuity between the examples and the text are not up to the typical O'Reilly standards. May have been a good book a long time ago.
Linux Device Drivers Review,
February 04 2001
Submitted by Phil
[
Respond |
View]
Nice book, very usefull for a lot of info but I still miss info on usefull toolkits like Jungo's WinDriver.(jungo.com)
Linux Device Drivers Review,
January 07 2001
Submitted by stephen forster
[
Respond |
View]
A superb book back in 1998 and worthy of a 'Definitive' back then, though two kernel versions later, it really does need replacing. Now that the 2.4 kernel has arrived, I would wait for the second edition to come out before parting with my money.
It isn't fair on the customer selling this book ( however good it was in its day ) when the second edition is about to make its debut. That's why I can only give this book an average rating.
Linux Device Drivers Review,
November 28 2000
Submitted by Matt Benjamin
[
Respond |
View]
I just finished my second, more careful reading of Linux Device Drivers. (I read it originally in 1998, shortly after it appeared.)
I found the book even more rewarding the second time through, and although I think it is time for an updated edition covering 2.2 and 2.4 kernels,I thoroughly recommend it to anyone interested in kernel development, not merely in hardware device drivers.
Again, I'd like to see a 2nd edition. Thanks, in this regard, for publishing examples updated for Linux 2.4.
Linux Device Drivers Review,
July 11 2000
Submitted by Mikkel Holm Olsen
[
Respond |
View]
An excellent book on the internals of the Linux kernel, and very nice for looking up stuff while writing a driver.
Unfortunantly the coverage of 2.2 kernels only scratches the surface (first edition only covers up to 2.1.43).
But grepping the kernel sources provide a lot of nice
Linux Device Drivers Review,
June 27 2000
Submitted by Franz Korntner
[
Respond |
View]
Personally, one of the problems with Linux is the absence of proper documentation. I guess that this is partly caused by the fact that developers consider the source to be the ultimate documentation. Although there is nothing wrong with that point of view, it does complicate the learning curve and development time.
As the Linux kernel source is huge, writing modules and drivers is a long and tedious job, especially if it is your first. Eventually you will pull the old 'copy-modify-and-paste
Linux Device Drivers Review,
August 31 1999
Submitted by laotie
[
Respond |
View]
hi,all
this is really a very good book, and as a member
of lisoleg(Linux Source Learning Group, http://lisoleg.yeah.net ot lisoleg.citf.net),
our lisoleg coreteam have finished the translation of this book to Chinese.
It is really a very good book! But I found some errors:
My version is 6/98
(1)p169 1KB resistor should be 1K ohm
(2)p184 the last line code should ident
lao_tie@263.net
Linux Device Drivers Review,
August 05 1999
Submitted by HeeGoo Han
[
Respond |
View]
i have found excellent stuff and finished reading.
it gives me the history of kernel improvement,
the concept of linux system, and the approach to
the OS internals.
Linux Device Drivers Review,
July 20 1999
Submitted by Christopher Hicks
[
Respond |
View]
Thanks to this book it only took me eight
hours to write a complete, useful device
driver, build the device (a little 4-digit
seven segment LED display) and get it all
running. A very useful book.
Only gripe is that it appears a lot has changed
in 2.2.X and this is only just touched on in the
book. I guess that's just bad luck timing-wise!
Linux Device Drivers Review,
July 08 1999
Submitted by Yi Chang
[
Respond |
View]
This book is a good reference and start for
device driver writing. But the version only
covers to kernel 2.0. If you use a newer kernel,
some things are different.
Like the "current"(struct task_struct),
timeout has been wiped out.
So most examples in Ch6 are not excutable.
And I have to start looking for how to modify it...
Linux Device Drivers Review,
June 02 1999
Submitted by Christopher Marshall
[
Respond |
View]
This book is the only computer book I have ever read in the same class with "The C Programming Language." If only most computer books were so well written.
Extremely well written and a real joy to work through. I especially like the summary at the end of each chapter of all of the include files, global variables, types, defines, and function calls covered.
Way to go!
I have been struggling to learn the internals of Linux in my pitiful amount of free time since October of 1998 and this book is a godsend. The author has paved the way for many more linux kernel hackers to cut their teeth.
Linux Device Drivers Review,
February 07 1999
Submitted by Tim Hockin
[Respond | View]
I have had this book for a while, but just started reading it. I wish I had started earlier.
This was my problem. With a 2.2.x (or 2.1.x) kernel I could not get even the very first example to work. I trackesd it down and adding
-include /usr/src/linux-2.2.1/include/linux/modversions.h
to the compile string got rid of the "unresolved symbol printk" error.
I hope this will be updated, and I hope this note helps other people with the same problem.
(dual processor, redhat 5.2, kernel 2.2.x triggered this problem)
Tim
Linux Device Drivers Review, February 02 1999
Submitted by System programmer(new in linux)
[Respond | View]
I would like to see or to receive logical structure and explanation of all examples you did in book.I can understand "C" source codes, But I also would like to see something like help in "Turbo C" about consistant of .h - files and standard functions used in examples. And please, don't use references before definitions.
Linux Device Drivers Review, December 08 1998
Submitted by Alan Turner
[Respond | View]
A truly excellent book. Well written, clear and easy to understand. I would recommend it to anyone who plans to impliment a Linux device driver (or anyone who would like to understand the kernel better). Thanks Mr Rubini.
Cheers,
Alan
Media reviews
"Linux Device Drivers is one of the best programmers' books I have ever read, and I do not say such things lightly. It covers the subject completely, is well organized, uses relevant examples, and is written in a clear and concise style." --Al Stevens, Dr Dobbs Journal, June 2001
"Since the book was printed, ver. 2.2 of the Linux kernel has been released. Nevertheless, I consider it the most complete text available and recommend it." --Alex Ivchenko, Test & Measurement World, May 2000
"Amazon.com's Bestselling Title of 1998 in the Category of Device Drivers for Computers"
Read all reviews