Linux Device Drivers

Buy Now

Course Description

Course Results

Products Supported

Who Should Attend

Course Format

Please see course datasheet for further details here 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
  • Describe the workings of the different kernel subsystems and how they impact the structure of a device driver
  • Debug Linux device drivers
  • Wind River Linux 5.0.1
  • Wind River Workbench 3.3.4
  • The following targets are available:
  • –– QEMU simulated target (Intel® x86-64)
    –– QEMU simulated target (PPC)
  • 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: Getting started

Introduction to Linux Kernel Modules

  • Overview
  • Anatomy of a kernel module
  • Module licensing
  • Building modules
  • Installing modules
  • Managing modules
  • Module parameters
  • LAB: Developing a basic kernel module
  • LAB: Developing kernel modules in Workbench

Character Device Drivers

  • Driver lifecycle
  • Major and minor numbers
  • Character driver entry points
  • Blocking operations
  • Controlling a device
  • Querying read/write ability
  • Restricting operations
  • LAB: Developing a 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: Managing memory

Concurrency in Linux Device Drivers

  • Concurrency
  • Race conditions
  • Locking primitives
  • Deadlock
  • Atomic variables
  • LAB: Managing concurrency

Managing Time in Linux Device Drivers

  • Measuring time in the kernel
  • Delaying execution
  • Deferring execution
  • LAB: Managing time

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
  • LAB: Configuring KGDB
  • LAB: Kernel debugging with GDB

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 URBs
  • Communicating without URBs
  • LAB: Using USB core

Block Device Drivers

  • Driver lifecycle
  • Major and minor numbers
  • Block driver entry points
  • Processing requests
  • Controlling a device
  • LAB: Developing a block device driver

Linux Network Device 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.
  • Students gain hands-on experience and receive personal guidance from expert Wind River instructors.
  • Specific questions are addressed.
Subscribe to Wind River