|
|
|
|
|
|
|
|
|
Linux Device Driver Development |
Duration: 5 days |
|
|
This hands-on course is intended
for system programmers who will be writing Linux device drivers using the Device Driver Module API. |
|
|
|
|
Description |
This course gives developers the
knowledge to design, write, and debug Linux device drivers. For this
course, we will use a Fedora Core 4 Linux system |
|
Objectives |
- Explain the responsibilities and structure of a Linux device
- Understand the development and operating environment for a Linux device driver
- Explain the Linux Device Driver Module API
- Write drivers for character devices (e.g., serial port)
- Write drivers for block devices (e.g., disk)
- Understand how network drivers are written for Linux
- Debug and deploy Linux device drivers
|
|
Course Outline |
Establishing an Environment for Linux Device Driver Development
- Kernel Mode vs. User Mode
- Kernel Versions and CONFIG_MODVERSIONS
- Include Files
- Kernel Data Types
- Build and Install (or recompile) a Kernel
- Getting and Installing the Kernel Sources
- Configuring and Compiling the Replacement Kernel
- Safely Booting the Freshly Compiled Kernel with Grub
The Device Driver Module API
- The Format of a Device Driver Module
- Loading and Unloading a Device Driver Module
- Interdependency among Device Driver Modules
- Mutual Exclusion
Memory Management
- Supporting mmap()
- Zero-copy user-space access for I/O
- Atomic kmaps
- Quick access to high-memory via kmap_atomic()
|
|
Character Drivers
- Character Driver Module API
- Hardware Resources Needed by the Driver
- Probing for and Allocating the I/O Addresses
- Interrupts
- Interrupt Handlers
- Adding ioctl Functionality
- PCI Device Drivers
- The PCI Bus
- Read/Write Functionality
Nonblocking and Asynchronous Operation
- Blocking and Nonblocking Operations
- Select and Poll
- Asynchronous Operations
Block Drivers
- RAM Disk Driver
- Entry Points
- The request_fn
- Remaining Functions
- Using the RAM Disk
Network Drivers
- Comparison to Block and Character Drivers
- Exploring the Skeleton Driver - Stage 1
- Exploring the Skeleton Driver - Stage 2, Interrupts
- The Virtual Network Interface
Debugging Kernel Code
- Using printk
- oops and ksymoops
- The Magic SysRq Key
- Using strace
- Remote Debugging via the Serial Port
| |
|
|