Linux Driver Development for Embedded Processors - Second Edition: Learn to develop Linux embedded drivers with kernel 4
LINUX DRIVER DEVELOPMENT FOR EMBEDDED PROCESSORS - SECOND EDITION - The flexibility of Linux embedded, the availability of powerful, energy efficient processors designed for embedded computing and the low cost of new processors are encouraging many industrial companies to come up with new developments based on embedded processors. Current engineers have in their hands powerful tools for developing applications previously unimagined, but they need to understand the countless features that Linux offers today. This book will teach you how to develop device drivers for Device Tree Linux embedded systems. You will learn how to write different types of Linux drivers, as well as the appropriate APIs (Application Program Interfaces) and methods to interface with kernel and user spaces. This is a book is meant to be practical, but also provides an important theoretical base. More than twenty drivers are written and ported to three different processors. You can choose between NXP i.MX7D, Microchip SAMA5D2 and Broadcom BCM2837 processors to develop and test the drivers, whose implementation is described in detail in the practical lab sections of the book. Before you start reading, I encourage you to acquire any of these processor boards whenever you have access to some GPIOs, and at least one SPI and I2C controllers. One of the boards used to implement the drivers is the famous Raspberry PI 3 Model B board. You will learn how to develop drivers, from the simplest ones that do not interact with any external hardware, to drivers that manage different kind of devices: accelerometers, DACs, ADCs, RGB LEDs, Multi-Display LED controllers, I/O expanders, and Buttons. You will also develop DMA drivers, drivers that manage interrupts, and drivers that write/read on the internal registers of the processor to control external devices. To easy the development of some of these drivers, you will use different types of Frameworks: Miscellaneous framework, LED framework, UIO framework, Input framework and the IIO industrial one. This second edition has been updated to the v4.9 LTS kernel.
Why Read This Book
You will get a practical, hands-on guide to writing Linux device drivers targeted at embedded processors running kernel 4, with a strong focus on Device Tree and platform driver patterns used in real-world products. The book emphasizes concrete examples, debugging techniques, and the kernel APIs you’ll use daily so you can move from prototype to production-ready firmware with confidence.
Who Will Benefit
Embedded firmware engineers and Linux developers with some C and Linux experience who need to design, implement, and debug device drivers for ARM- or RISC-V-based embedded systems.
Level: Intermediate — Prerequisites: Comfortable C programming, basic Linux user-space familiarity (shell, toolchain), understanding of embedded hardware concepts (GPIO, interrupts, buses like I2C/SPI/UART), and experience with cross-compilation for target boards.
Key Takeaways
- Write and build kernel modules and platform drivers that integrate with the Linux device model and Device Tree
- Implement character, platform and bus (I2C/SPI/UART) drivers and expose safe user-space interfaces (sysfs, ioctl, mmap)
- Use kernel APIs for concurrency, interrupt handling, bottom halves, workqueues, and synchronous/asynchronous I/O
- Integrate DMA and memory-mapped I/O, and manage resource allocation, power management, and runtime PM for embedded devices
- Cross-compile kernels and modules, test drivers with QEMU or target boards, and apply kernel debugging and tracing tools (KGDB, ftrace, perf)
Topics Covered
- Introduction to Embedded Linux and Kernel 4 — overview and development workflow
- Linux Kernel Architecture and the Device Model
- Building and Cross-Compiling the Kernel and Modules
- Basic Kernel Module and Character Driver Programming
- Platform Drivers and Device Tree Basics
- I2C, SPI and UART Bus Drivers and Client Devices
- Interrupts, Bottom Halves, Workqueues and Synchronization
- Memory-Mapped I/O, DMA and Scatter-Gather Techniques
- Power Management, Clocks and Runtime PM for Devices
- User-Space Interfaces: sysfs, procfs, ioctl, mmap, and udev integration
- Debugging, Tracing and Performance Analysis for Drivers
- Packaging, Deployment and Best Practices for Embedded Products
Languages, Platforms & Tools
How It Compares
Covers much of the same practical driver-building ground as Jonathan Corbet et al.'s Linux Device Drivers (LDD3) but is updated for kernel 4 and emphasizes Device Tree and embedded platform workflows; more embedded-focused than general kernel texts like Robert Love's Linux Kernel Development.













