Linux Kernel Programming Developing kernel architecture and device drivers for character, block, USB, and network interfaces (THIERRY GAYET) (Z-Library)
Linus Torvald released the first version of a kernel in 1991, inspired at the time by both proprietary Unix and the Minix system. Thirty-four years later, this system has evolved with stability and robustness, making it almost indispensable for the DevSecOps community. The Linux kernel forms the robust core of countless systems, from embedded devices to vast data centers, driving unparalleled power and flexibility. This book is your essential guide to deeply understanding this fundamental component and mastering the art of developing high-performance kernel-level code
This book meticulously details the kernel's history, architectural evolution, and custom build processes. You will master device driver fundamentals, distinguishing user from kernel space, and understanding the Linux Device Model (LDM). It explores Linux Security Modules, intricate kernel memory management, and various vital communication interfaces like I2C, SPI, SERIAL, PCI, and RTC. The guide concludes with task/process management, real-time concepts, and essential kernel debugging and profiling.
By the end of this book, you will be well-equipped to confidently develop, optimize, and debug kernel-level code. This empowers you to build custom Linux systems, craft efficient device drivers, and troubleshoot complex issues, ready to tackle advanced Linux system programming challenges. You will also be able to better understand this system and develop your own drivers or low-level developments for it.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on guide to Linux kernel internals and driver development that walks you from kernel history and build tooling to character, block, USB, and network drivers, then into memory, security, and debugging. Best for embedded and systems developers who already write C and want to move below the syscall boundary.
【Book Arc】
- **Opening (~0%–15%)**: Sets the stage with kernel history (Unix/Minix lineage, GNU/Linux, GPL) and the practical groundwork — downloading sources, configuring and building a custom kernel, packaging for Debian/RPM, and boot sequence.
- **Early (~15%–30%)**: Introduces device drivers and the Linux Device Model: user vs. kernel space, syscalls, in-tree vs. out-of-tree compilation (including Buildroot/Yocto), module loading, parameters, licensing, DKMS, plus bus/device/driver/class structures, procfs, and the device tree.
- **Middle (~30%–55%)**: The driver-type core — character drivers (mknod, udev, read-only/read-write/ioctl variants), block drivers and the VFS/storage stack with I/O schedulers, USB architecture and libusb, and network drivers with sk_buff, Netfilter, and DPDK context.
- **Late (~55%–80%)**: Security and memory depth — Linux Security Modules and mandatory access control (SELinux lineage, writing a custom LSM), then physical/virtual memory, allocation APIs, NUMA, and DMA.
- **Ending (~80%–100%)**: Hardware interfaces (I2C, SPI, serial, PCI, RTC), process/task management and scheduling with real-time concepts, and kernel debugging/profiling tools.
【Key Takeaways】
- **The kernel is best learned as a layered system, not a monolith** (Opening): the Unix "onion" model and Linux's monolithic-with-modules design frame every later chapter, so the history section is scaffolding, not filler.
- **Building your own kernel is a prerequisite skill** (Early): configuring, compiling, packaging, and booting a custom kernel is treated as the entry gate before any driver work.
- **The Linux Device Model is the backbone of driver registration** (Early): bus, device, driver, and class abstractions plus sysfs/udev and the device tree recur throughout the book.
- **Drivers come in distinct families with distinct contracts** (Middle): character, block, USB, and network drivers each get their own chapter and communication model, so expect to learn four separate mental templates.
- **Security is designed in via hooks, not bolted on** (Late): LSM architecture and mandatory access control explain how SELinux-style policies intercept kernel operations, with guidance toward writing your own module.
- **Memory and DMA are where performance and correctness collide** (Late): physical/virtual mapping, allocation functions, NUMA, and CPU-bypassing DMA are covered as one connected topic.
- **Hardware buses are the practical bridge to embedded work** (Ending): I2C, SPI, serial, PCI, and RTC are presented as the interfaces you will actually wire drivers against.
- **Debugging and profiling are first-class skills** (Ending): the book closes by acknowledging that kernel complexity demands dedicated tooling, giving an overview rather than a single silver bullet.
【Reading Tips】
- Deep-read the build/config and Device Model chapters early; they are referenced constantly and skipping them makes later driver chapters harder.
- Skim the Unix/Minix history if you already know it, but keep the release-milestone timeline as a reference for why kernel APIs look the way they do.
- Treat the four driver chapters as a progression: master character drivers first, then block, USB, and network, since each adds a new subsystem on top of shared concepts.
- Have a disposable VM or embedded board ready; module loading, DKMS, and debugging chapters are far more useful when you compile and load code yourself.
- Use the LSM, memory/DMA, and debugging chapters as targeted references when a real problem appears rather than reading them linearly.
【Coverage Limits】
This guide is synthesized from stratified excerpts covering the front matter, table of contents, and early historical chapters; the excerpts do not cover the detailed technical content of the driver, memory, security, or debugging chapters, so specifics there are inferred from chapter listings and the blurb.
Excerpt 1
ications, India eISBN: 978-93-65897-913 All Rights Reserved. No part of this publication may be reproduced, distributed or transmitted in any form or by any...
e-tune a driver or a specific part of the kernel is another. Indeed, due to their relative complexity, the Linux kernel has seen the development of specific...
m Tenenbaum's MINIX text, which was part of the Unix course. On August 25, 1991, Torvalds posted the following to comp.os.minix , a Usenet newsgroup. Here is...
nts in Linux 2.2 include: Stability and bug fixes : Linux 2.2 included numerous bug fixes and stability improvements, addressing issues present in earlier ve...
r than the introduction of a specific revolutionary feature. It continues the tradition of continuous development and refinement of the Linux kernel, with im...
uter, but also on the bandwidth of your internet connection. However, on a modern model and a fiber optic internet connection, it will take around 30 minutes...
inclusion of a wide range of subsystems and device drivers. This complexity can make it challenging to understand and maintain the kernel codebase. High perf...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Linux Kernel Programming Developing kernel architecture and device drivers for character, block, USB, and network interfaces (THIERRY GAYET) (Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Linux Kernel Programming Developing kernel architecture and device drivers for character, block, USB, and network interfaces (THIERRY GAYET) (Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment