In-Depth Analysis of Linux Kernel Linked Lists: The Secrets and Practical Guide to list.h

In-Depth Analysis of Linux Kernel Linked Lists: The Secrets and Practical Guide to list.h

In the world of the Linux kernel, data structures are like the foundation of a building, supporting the efficient operation of the entire system. Linked lists, as a flexible and commonly used data structure, play a crucial role in the kernel. Today, we will delve into the implementation of linked lists in the Linux kernel—list.h—and … Read more

Basics of Device Driver Development in C Language

Basics of Device Driver Development in C Language

Basics of Device Driver Development in C Language A device driver is a bridge between the operating system and hardware, responsible for managing and controlling hardware devices. This article will introduce how to develop simple device drivers using the C language, suitable for beginners. 1. What is a Device Driver? A device driver is a … Read more

OpenWrt Compilation Command Record

OpenWrt Compilation Command Record

cp ipq60xx-all.config .config make defconfig make menuconfig # Enter the graphical configuration interface Save and exit: After configuration is complete, press <Esc> until you exit the configuration interface. The system will prompt to save the configuration, choose to save. make oldconfig # Generate configuration based on existing configuration # This method updates and applies your … Read more

An Overview of the Dynamic Module Loading Mechanism in Embedded Linux

An Overview of the Dynamic Module Loading Mechanism in Embedded Linux

1. Design Philosophy and Core Advantages of Dynamic Module Loading The Linux dynamic module loading mechanism (Loadable Kernel Modules, LKMs) is not merely a technical choice, but a systematic solution evolved to meet the core needs of embedded systems—resource efficiency, hardware diversity, security control, and development flexibility—which are deeply integrated into its design philosophy and … Read more

The C Language in Operating Systems: Applications of C in the Linux Kernel

The C Language in Operating Systems: Applications of C in the Linux Kernel

The C Language in Operating Systems: Applications of C in the Linux Kernel In the field of operating systems, the C language is undoubtedly a crucial programming language. Especially in the development of the Linux kernel, C serves as the primary programming language, allowing users to interact with hardware at a lower level. In this … Read more

Operating System in C: Device Drivers

Operating System in C: Device Drivers

Operating System in C: Device Drivers Introduction Device drivers are a crucial component of an operating system, acting as a bridge between hardware and software. Through device drivers, the operating system can control and manage hardware devices such as printers, graphics cards, and network adapters. In this article, we will delve into how to write … Read more

Embedded Linux Driver Development: Starting with Character Devices

Embedded Linux Driver Development: Starting with Character Devices

1. What is a Character Device? First, we need to understand what a character device is. A character device is, simply put, a device that reads and writes data byte by byte, like keyboards, mice, and serial ports. Unlike block devices (like hard drives), character devices do not support random access; data must be read … Read more

Using SystemTap to Trace Custom Kernel Modules

Using SystemTap to Trace Custom Kernel Modules

One Background After reading the article “Dynamic Tracing Technology Discussion” (https://blog.openresty.com.cn/cn/dynamic-tracing/), I thought about using SystemTap to trace my own developed kernel module. However, the official documentation of SystemTap (https://sourceware.org/systemtap/documentation.html) only gives examples of tracing kernel modules by using drivers from the kernel source tree, for example: probe module(“ext3”).function(“*”) { }, and indeed, the verification … Read more

Linux Character Device Driver Example

Linux Character Device Driver Example

globalmem Looking at Linux device driver development details, the chapter on character device drivers provides test code and application programs that are very helpful for beginners. The reason for writing this article is that I noticed I had not yet written about character devices, despite having previously published articles. As for the role of the … Read more

Introduction to Linux Device Drivers

Introduction to Linux Device Drivers

01 — Linux Architecture The Linux architecture can be divided into user space and kernel space, which interact with each other through the system call interface. The so-called System Call Interface is a mature interface predefined by the Linux kernel for user space applications. User applications can call the services provided by the operating system … Read more