2017年1月17日 星期二

Note for Linux Device Drivers

Linux Kernel 2.4

Ch1.


write kernel code to access the hardware, but don't force particular policies on the user.

Class of Devices and Modules
1. Character Devices
Ex: text console, serial port


2. Block Devices
Ex: /dev file system

3. Network interfaces
Ex: eth0

4.Other
SCSI

Ch2. 

modularization
kernel header __KERNEL__ preprocessor

prevent namespace pollution and declare all symbols as static

Ch3.

Character Devices

Ch4.

Debugging skills

Ch5.

important operations: select, ioctl

Ch6.

time management

Ch7.

memory allocation