1. Driver framework
1. The relationship between Linux kernel modules and character drivers
Modules are a way for Linux to manage components.
Structure: For the management of the device, the kernel needs to abstract a structure to describe all the common information of the device. Writing the driver needs to apply for a structure and assign (initialize), and then register it to the kernel for unified management by the kernel
Driver: It is managed uniformly by the kernel, so the driver needs to follow a framework of character devices provided by the kernel when writing. 3. SI4 complete installation and crack file decompression password biu
Two: structure and its information
1. Describe the structure of all character device drivers
cdev结构体:
struct cdev{
const struct file_opeartions *ops;
dev_t dev; //设备号