Wind River Education Services

Linux Device Drivers

Buy Now

Course Description

Course Results

Products Supported

Who Should Attend

Course Format

Buy Now

Course Details Summary

  • Duration: 4 Days
  • Course Information: View
  • Format: Lectures and Labs
  • Type: Instructor-led
  • Price/Schedule: View

The Linux Device Drivers course provides engineers with a fast, cost-effective way to acquire the skills necessary to develop, deploy, and debug their own customized Linux device drivers.

After this course, participants will be able to perform the following:

  • Develop and manipulate Linux kernel modules
  • Develop Linux device drivers for the various types of devices supported in Linux
  • Understand how the different kernel subsystems work and what effect they have on the structure of a device driver
  • Debug Linux device drivers
  • Linux kernel 2.6.33
  • Anyone new to device driver development in Linux
  • Linux application developers who are looking to gain more insight into how the Linux kernel works
  • Developers interested in the interface between the Linux kernel and device drivers

Day 1

Introduction to Linux Device Drivers

  • Linux architecture overview
  • Linux device driver overview
  • Device driver types
  • Linux device model
  • In-tree vs. out-of-tree driver development

Linux Kernel Source Code

  • Source code organization
  • The kernel configurator
  • The kernel build system
  • Working with kernel patches
  • LAB: Development environment

Introduction to Linux Kernel Modules

  • Anatomy of a kernel module
  • Module licensing
  • Building modules
  • Managing modules
  • Module parameters
  • LAB: Kernel module

Character Device Drivers

  • Driver life cycle
  • Major and minor numbers
  • Character driver entry points
  • Blocking operations
  • Controlling a device
  • Querying read/write ability
  • Restricting operations
  • LAB: Character device driver

Day 2

Managing Memory in Linux Device Drivers

  • How Linux manages memory
  • Allocating memory with kmalloc()
  • Page-based memory allocation
  • Manipulating memory
  • Memory mapped I/O
  • Accessing user space memory
  • Implementing the mmap operation
  • LAB: Memory management

Concurrency in Linux Device Drivers

  • Concurrency
  • Race conditions
  • Locking primitives
  • Deadlock
  • Atomic variables
  • LAB: Concurrency management

Managing Time in Linux Device Drivers

  • HZ
  • Jiffies and Jiffies_64
  • Delaying execution
  • Deferring execution
  • LAB: Time management

Day 3

Handling Interrupts in Linux Device Drivers

  • How interrupts work
  • IRQs
  • Top half processing
  • Bottom half processing
  • LAB: Handling interrupts

Debugging Linux Device Drivers

  • Debugging by printing
  • Debugging by querying
  • Debugging by observation
  • Using a kernel debugger
  • LAB: Debugging drivers

Linux TTY Device Drivers

  • TTY architecture
  • TTY driver life cycle
  • TTY driver entry points
  • Line settings
  • struct tty_struct
  • LAB: Using TTY core

Linux PCI Device Drivers

  • PCI configuration space
  • Identifying devices
  • Matching devices and drivers
  • Driver registration
  • Probe() function
  • Memory and I/O regions
  • DMA
  • Remove() function
  • LAB: Using PCI core

Day 4

Linux USB Device Drivers

  • USB architecture
  • Matching devices and drivers
  • Driver registration
  • Probe function
  • Communicating with USB request blocks (URBs)
  • Communicating without URBs
  • LAB: Using USB core

Block Device Drivers

  • Driver life cycle
  • Major and minor numbers
  • Block driver entry points
  • Processing requests
  • Controlling a device
  • LAB: Block device driver

Linux Network Drivers

  • Overview of network devices
  • Driver registration
  • Network driver entry points
  • Controlling interfaces
  • Packet transmission
  • Interrupt-driven packet reception
  • NAPI drivers
  • LAB: Network device driver

Prerequisite Course

Prerequisite Skills

  • Familiarity with makefiles and GNU toolchain
  • Understanding of various methods used to deploy and debug Linux-based applications in a cross-development environment
  • C or C++ programming experience on Linux/UNIX
  • This four-day expert-led course consists of lectures and lab sessions.
  • Attendees use Linux kernel 2.6.3 to gain experience with the topics presented.
  • Participants examine and exercise simulated network topologies in hands-on labs.
  • Students examine details of the Wind RiverĀ® Workbench environment, focusing on the most commonly used areas.
  • Participants receive individual guidance from an expert engineer who has extensive experience with Wind River technologies.