Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
News Books Media Book Reviews

Review: Linux Device Drivers

Trevor has written up a review of ORA's Linux Device Drivers. Like Linux Application Development this is a pretty important book. We all know about getting drivers written, and getting the hardware to work-now learn about how to be better at doing that. Read below for more.
Linux Device Drivers
author Alessandro Rubini
pages
publisher O'Reilly & Associates
rating 8/10
reviewer trevor@mindspring.com
ISBN
summary
REVIEW: Linux Device Drivers
Alessandro Rubini
O'Reilly & Associates, Inc.

Nutshell
Review:

Rating: 8/10
trevor@mindspring.com

The Scenario

Though written for linux programmers working on device drivers, Linux Device Drivers by Alessandro Rubini also serves as a tour of the kernel for C programmers interested in the design decisions that give us modern linux. For anyone who is undertaking the process of creating a linux driver from scratch, Mr. Rubini has taken the disparate source files involved and created a coherent mosaic of reference which eases the path from idea to implementation. As a result of Mr. Rubini's well structured book, first time driver programmers will save hours of hand tracing code. The code examples are clearly explained and each chapter ends with a reference section to be quickly accessed while programming. This book is current through 2.1.43 and it clearly notes where code changes are necessary in moving from 2.0.x to 2.1.x.

What's Bad?

As with any traditional book on linux, Linux Device Drivers will eventually be out of date for programmers working with the most current linux source.

What's Good?

Chapters 1 through 8 cover the basics of how the kernel loads and unloads modules. It begins with a simple "hello world, I'm a module" example and moves on to more complex examples. This section does not require the use of any special hardware as it implements a memory "software device" which turns out to be handy for other programming tasks. The book's FTP site has each code sample available so no retyping is necessary. For programmers who can do snazzy tricks with data structures, but are new (or rusty) with lower level hardware programming, chapter 8 is a clear and quick (re)introduction to the issues. Chapter 9 introduces the hairy art of interrupt handling and steps through the pitfalls of race conditions and other such monsters.

The second section, Chapters 10 through 15, can be treated as stand alone works on the topics of kerneld, block drivers, mmap and DMA, network devices, and a short overview of peripheral buses. Depending on your programming goals, these chapters may or may not be immediately useful. However, the reference sections at the end of each chapter can help identify where driver problems originate. Each chapter is recommended reading, but covering them all in one sitting is a sure way to overflow your buffer.

The final two chapters are on the topics of the physical layout of the kernel source and recent developments in the experimental line of kernels. The first chapter in this section serves as a boot to shutdown guide to which source handles different kernel operations. For those who need to know (or are simply interested) in the how linux handles the differences in various architectures, this chapter is a good spring board for the necessary code diving. The last chapter of the book, Recent Developments, details where the linux community of kernel programmers seems to be headed. Though there is no replacement for subscribing to the relevant lists and reading the newsgroups, this chapter can bring those new to open source development up to speed.

So What's In It For Me?

Linux Device Drivers maintains the high standard set by other linux related books published by O'Reilly & Associates. Alessandro Rubini has created a solid guide to the tasks and ideas of the linux kernel. It is a fine addition to the bookshelves of linux users and driver writers alike.

Pick this book up at Amazon.

Table of Contents

  1. An Introduction to the Linux Kernel
  2. Building and Running Modules
  3. Char Drivers
  4. Debugging Techniques
  5. Enhanced Char Driver Operations
  6. Flow of Time
  7. Getting Hold of Memory
  8. Hardware Management
  9. Interrupt Handling
  10. Judicious Use of Data Types
  11. Kerneld and Advanced Modularization
  12. Loading Block Drivers
  13. MMAP and DMA
  14. Network Drivers
  15. Overview of Peripheral Buses
  16. Physical Layout of the Kernel Source
  17. Recent Developments
This discussion has been archived. No new comments can be posted.

Review: Linux Device Drivers

Comments Filter:

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...