Share E-Book

Linux Kernel Programming Developing kernel architecture and device drivers for character, block, USB, and network interfaces (THIERRY GAYET) (Z-Library)

Author

Mobile
Language English

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.

Format EPUB
Size 13.8 MB
313
Views

AI Guide

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

Full assistant
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.

Passage locations

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...
View in text
Excerpt 2
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...
View in text
Excerpt 3
ral Component Interconnect architecture Usage Conclusion 12.  Process Management Introduction Structure Objectives Tasks scheduling GNU/Linux and real-time K...
View in text
Excerpt 4
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...
View in text

Recommended for You

Loading recommended books...
Failed to load, please try again later

Tip the Site

Scan the WeChat Pay or Alipay code to tip. No login required.

WeChat Pay
Alipay
Back to List