“Probably the most wide ranging and complete Linux device driver book I’ve read.” --Alan Cox, Linux Guru and Key Kernel Developer “Very comprehensive and detailed, covering almost every single Linux device driver type.” --Theodore Ts’o, First Linux Kernel Developer in North America and Chief Platform Strategist of the Linux Foundation The Most Practical Guide to Writing Linux Device Drivers Linux now offers an exceptionally robust environment for driver development: with today’s kernels, what once required years of development time can be accomplished in days. In this practical, example-driven book, one of the world’s most experienced Linux driver developers systematically demonstrates how to develop reliable Linux drivers for virtually any device. Essential Linux Device Drivers is for any programmer with a working knowledge of operating systems and C, including programmers who have never written drivers before. Sreekrishnan Venkateswaran focuses on the essentials, bringing together all the concepts and techniques you need, while avoiding topics that only matter in highly specialized situations. Venkateswaran begins by reviewing the Linux 2.6 kernel capabilities that are most relevant to driver developers. He introduces simple device classes; then turns to serial buses such as I2C and SPI; external buses such as PCMCIA, PCI, and USB; video, audio, block, network, and wireless device drivers; user-space drivers; and drivers for embedded Linux–one of today’s fastest growing areas of Linux development. For each, Venkateswaran explains the technology, inspects relevant kernel source files, and walks through developing a complete example. • Addresses drivers discussed in no other book, including drivers for I2C, video, sound, PCMCIA, and different types of flash memory • Demystifies essential kernel services and facilities, including kernel threads and helper interfaces • Teaches polling, asynchronous notification, and I/O control • Introduces the Inter-Integrated Circuit Protocol for embedded Linux drivers • Covers multimedia device drivers using the Linux-Video subsystem and Linux-Audio framework • Shows how Linux implements support for wireless technologies such as Bluetooth, Infrared, WiFi, and cellular networking • Describes the entire driver development lifecycle, through debugging and maintenance • Includes reference appendixes covering Linux assembly, BIOS calls, and Seq files
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.
Nwely updated to include new calls and techniques introduced in Versions 2.2 and 2.4 of the Linux kernel, a definitive resource for those who want to support computer peripherals under the Linux operating system explains how to write a driver for a broad spectrum of devices, including character devices, network interfaces, and block devices. Original. (Intermediate)
This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version. The Most Practical Guide to Writing Linux Device Drivers Linux now offers an exceptionally robust environment for driver development: with today's kernels, what once required years of development time can now be accomplished in days. In this practical, example-driven book, one of the world's most experienced Linux driver developers systematically demonstrates how to develop reliable Linux drivers for virtually any device. Essential Linux Device Dri.
Author: Daniel P. Bovet
Publisher: "O'Reilly Media, Inc."
Release Date: 2005-11-17
In order to thoroughly understand what makes Linux tick and why it works so well on a wide variety of systems, you need to delve deep into the heart of the kernel. The kernel handles all interactions between the CPU and the external world, and determines which programs will share processor time, in what order. It manages limited memory so well that hundreds of processes can share the system efficiently, and expertly organizes data transfers so that the CPU isn't kept waiting any longer than necessary for the relatively slow disks. The third edition of Understanding the Linux Kernel takes you on a guided tour of the most significant data structures, algorithms, and programming tricks used in the kernel. Probing beyond superficial features, the authors offer valuable insights to people who want to know how things really work inside their machine. Important Intel-specific features are discussed. Relevant segments of code are dissected line by line. But the book covers more than just the functioning of the code; it explains the theoretical underpinnings of why Linux does things the way it does. This edition of the book covers Version 2.6, which has seen significant changes to nearly every kernel subsystem, particularly in the areas of memory management and block devices. The book focuses on the following topics: Memory management, including file buffering, process swapping, and Direct memory Access (DMA) The Virtual Filesystem layer and the Second and Third Extended Filesystems Process creation and scheduling Signals, interrupts, and the essential interfaces to device drivers Timing Synchronization within the kernel Interprocess Communication (IPC) Program execution Understanding the Linux Kernel will acquaint you with all the inner workings of Linux, but it's more than just an academic exercise. You'll learn what conditions bring out Linux's best performance, and you'll see how it meets the challenge of providing good system response during process scheduling, file access, and memory management in a wide variety of environments. This book will help you make the most of your Linux system.
Master the Linux Tools That Will Make You a More Productive, Effective Programmer The Linux Programmer's Toolbox helps you tap into the vast collection of open source tools available for GNU/Linux. Author John Fusco systematically describes the most useful tools available on most GNU/Linux distributions using concise examples that you can easily modify to meet your needs. You'll start by learning the basics of downloading, building, and installing open source projects. You'll then learn how open source tools are distributed, and what to look for to avoid wasting time on projects that aren't ready for you. Next, you'll learn the ins and outs of building your own projects. Fusco also demonstrates what to look for in a text editor, and may even show you a few new tricks in your favorite text editor. You'll enhance your knowledge of the Linux kernel by learning how it interacts with your software. Fusco walks you through the fundamentals of the Linux kernel with simple, thought-provoking examples that illustrate the principles behind the operating system. Then he shows you how to put this knowledge to use with more advanced tools. He focuses on how to interpret output from tools like sar, vmstat, valgrind, strace, and apply it to your application; how to take advantage of various programming APIs to develop your own tools; and how to write code that monitors itself. Next, Fusco covers tools that help you enhance the performance of your software. He explains the principles behind today's multicore CPUs and demonstrates how to squeeze the most performance from these systems. Finally, you'll learn tools and techniques to debug your code under any circumstances. Coverage includes Maximizing productivity with editors, revision control tools, source code browsers, and "beautifiers" Interpreting the kernel: what your tools are telling you Understanding processes–and the tools available for managing them Tracing and resolving application bottlenecks with gprof and valgrind Streamlining and automating the documentation process Rapidly finding help, solutions, and workarounds when you need them Optimizing program code with sar, vmstat, iostat, and other tools Debugging IPC with shell commands: signals, pipes, sockets, files, and IPC objects Using printf, gdb, and other essential debugging tools Foreword Preface Acknowledgments About the Author Chapter 1 Downloading and Installing Open Source Tools Chapter 2 Building from Source Chapter 3 Finding Help Chapter 4 Editing and Maintaining Source Files Chapter 5 What Every Developer Should Know about the Kernel Chapter 6 Understanding Processes Chapter 7 Communication between Processes Chapter 8 Debugging IPC with Shell Commands Chapter 9 Performance Tuning Chapter 10 Debugging Index
There's a great deal of excitement surrounding the use of Linux in embedded systems -- for everything from cell phones to car ABS systems and water-filtration plants -- but not a lot of practical information. Building Embedded Linux Systems offers an in-depth, hard-core guide to putting together embedded systems based on Linux. Updated for the latest version of the Linux kernel, this new edition gives you the basics of building embedded Linux systems, along with the configuration, setup, and use of more than 40 different open source and free software packages in common use. The book also looks at the strengths and weaknesses of using Linux in an embedded system, plus a discussion of licensing issues, and an introduction to real-time, with a discussion of real-time options for Linux. This indispensable book features arcane and previously undocumented procedures for: Building your own GNU development toolchain Using an efficient embedded development framework Selecting, configuring, building, and installing a target-specific kernel Creating a complete target root filesystem Setting up, manipulating, and using solid-state storage devices Installing and configuring a bootloader for the target Cross-compiling a slew of utilities and packages Debugging your embedded system using a plethora of tools and techniques Using the uClibc, BusyBox, U-Boot, OpenSSH, thttpd, tftp, strace, and gdb packages By presenting how to build the operating system components from pristine sources and how to find more documentation or help, Building Embedded Linux Systems greatly simplifies the task of keeping complete control over your embedded operating system.
ESSENTIAL LINUX ADMINISTRATION: A COMPREHENSIVE GUIDE FOR BEGINNERS enables the reader to understand and utilize Linux-based networking and server administration better than ever before. Whereas most Linux system guides are either too technical or overly
Learn to develop customized device drivers for your embedded Linux system About This Book Learn to develop customized Linux device drivers Learn the core concepts of device drivers such as memory management, kernel caching, advanced IRQ management, and so on. Practical experience on the embedded side of Linux Who This Book Is For This book will help anyone who wants to get started with developing their own Linux device drivers for embedded systems. Embedded Linux users will benefit highly from this book. This book covers all about device driver development, from char drivers to network device drivers to memory management. What You Will Learn Use kernel facilities to develop powerful drivers Develop drivers for widely used I2C and SPI devices and use the regmap API Write and support devicetree from within your drivers Program advanced drivers for network and frame buffer devices Delve into the Linux irqdomain API and write interrupt controller drivers Enhance your skills with regulator and PWM frameworks Develop measurement system drivers with IIO framework Get the best from memory management and the DMA subsystem Access and manage GPIO subsystems and develop GPIO controller drivers In Detail Linux kernel is a complex, portable, modular and widely used piece of software, running on around 80% of servers and embedded systems in more than half of devices throughout the World. Device drivers play a critical role in how well a Linux system performs. As Linux has turned out to be one of the most popular operating systems used, the interest in developing proprietary device drivers is also increasing steadily. This book will initially help you understand the basics of drivers as well as prepare for the long journey through the Linux Kernel. This book then covers drivers development based on various Linux subsystems such as memory management, PWM, RTC, IIO, IRQ management, and so on. The book also offers a practical approach on direct memory access and network device drivers. By the end of this book, you will be comfortable with the concept of device driver development and will be in a position to write any device driver from scratch using the latest kernel version (v4.13 at the time of writing this book). Style and approach A set of engaging examples to develop Linux device drivers
Author: Bob Neveln
Publisher: Prentice Hall Professional
Release Date: 2000
Master x86 language from the Linux point of view with this one-concept-at-a-time guide. Neveln gives an "under the hood" perspective of how Linux works and shows how to create device drivers. The CD-ROM includes all source code from the book plus edlinas, an x86 simulator that's perfect for hands-on, interactive assembler development.
Author: Wolfgang Mauerer
Publisher: John Wiley & Sons
Release Date: 2010-03-11
Find an introduction to the architecture, concepts and algorithms of the Linux kernel in Professional Linux Kernel Architecture, a guide to the kernel sources and large number of connections among subsystems. Find an introduction to the relevant structures and functions exported by the kernel to userland, understand the theoretical and conceptual aspects of the Linux kernel and Unix derivatives, and gain a deeper understanding of the kernel. Learn how to reduce the vast amount of information contained in the kernel sources and obtain the skills necessary to understand the kernel sources.
Debugging Linux Systems discusses the main tools available today to debug 2.6 Linux Kernels. We start by exploring the seemingly esoteric operations of the Kernel Debugger (KDB), Kernel GNU DeBugger (KGDB), the plain GNU DeBugger (GDB), and JTAG debuggers. We then investigate Kernel Probes, a feature that lets you intrude into a kernel function and extract debug information or apply a medicated patch. Analyzing a crash dump can yield clues for postmortem analysis of kernel crashes or hangs, so we take a look at Kdump, a serviceability tool that collects a system dump after spawning a new kernel. Profiling points you to code regions that burn more CPU cycles, so we learn to use the OProfile kernel profiler and the gprof application profiler to sense the presence of code bottlenecks. Because tracing provides insight into behavioral problems that manifest during interactions between different code modules, we delve into the Linux Trace Toolkit, a system designed for high-volume trace capture. The section “Debugging Embedded Linux” takes a tour of the I/O interfaces commonly found on embedded hardware, such as flash memory, serial port, PCMCIA, Secure Digital media, USB, RTC, audio, video, touch screen, and Bluetooth, and provides pointers to debug the associated device drivers. We also pick up some board-level debugging skills with the help of a case study. The section “Debugging Network Throughput” takes you through some device driver design issues and protocol implementation characteristics that can affect the horsepower of your network interface card. We end the shortcut by examining several options available in the kernel configuration menu that can emit valuable debug information.