Linux Device Driver and Board Support Package Development
Acquire the skills necessary to develop, deploy, and debug their own customized Linux device drivers and BSPs in the Wind River® Linux environment.
Course Description
The Linux Device Driver and Board Support Package Development 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 and BSPs in the Wind River® Linux environment.
Course Results
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
- Use the Yocto Project tools to create a new BSP and customize, patch, and validate the BSP
- Port Wind River Linux platform projects to new boards
Products Supported
- Wind River Linux 9
- The following target is available: QEMU simulated target
Who Should Attend
- Anyone new to device driver and BSP development in Linux
- Linux application developers who need insight into how the Linux kernel works
- Developers interested in the interface between the Linux kernel and device drivers
- Developers who plan to use Wind River Linux on an unsupported board (hardware architecture is supported)
Course Format
- This four-day expert-led course consists of lectures.
- Participants receive individual guidance from an expert engineer who has extensive experience with Wind River technologies.
Syllabus
Day 1
Introduction to Linux Device Drivers
- Linux architecture overview
- Device driver types
- Linux device model
Linux Kernel Source Code
- Source code organization
- The kernel configurator
- Working with kernel patches
- LAB: Getting Started with the Wind River Linux Lab Environment
- LAB: Managing Simulated Targets from the Command Line
Introduction to Linux Kernel Modules
- Anatomy of a kernel module
- Module licensing
- Building modules
- LAB: Managing Kernel Modules
- LAB: Developing Kernel Modules
Character Device Drivers
- Driver lifecycle
- Major and minor numbers
- Character driver entry points
- Querying read/write ability
- Restricting operations
- LAB: Developing a Character Device Driver
Day 2
Managing Memory in the Linux Device Drivers
- How Linux manages memory
- Allocating memory with kmalloc()
- Page-based memory allocation
- Manipulating memory
- Implementing the mmap operation
- LAB: Managing Memory in Kernel Code
Concurrency in Linux Device Drivers
- Race conditions
- Locking primitives
- Deadlock
- Atomic variables
- LAB: Managing Concurrency in Kernel Code
Managing Time in Linux Device Drives
- Measuring time in the kernel
- Delaying execution
- Deferring execution
- LAB: Managing Execution of Driver Code
Handling Interrupts in Linux Device Drivers
- IRQ threads
- Interrupt handlers
- LAB: Implementing Interrupt Handlers
Debugging Linux Device Drivers
- Debugging by printing
- Debugging by querying
- Debugging by observation
- Using a kernel debugger
- LAB: Implementing Debugging Strategies in Kernel Code
- LAB: Configuring KGDB
- LAB: Kernel Debugging with GDB
Day 3
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: Driving Devices over PCI
Linux USB Device Drivers
- USB architecture
- Matching devices and drivers
- Driver registration
- Communicating with the device
- LAB: Driving Devices over USB
Block Device Drivers
- Driver lifecycle
- Major and minor numbers
- Block driver entry points
- Processing requests
- Controlling a device
- LAB: Developing a Block Device Driver
Network Device Drivers
- Overview of network devices
- Driver registration
- Network driver entry points
- Controlling interfaces
- Packet transmission
- Packet reception
- LAB: Developing a Network Device Driver
Day 4
Wind River Linux BSP Overview
- Role of a Wind River Linux BSP
- Wind River Linux BSP structure
- Setting up the build environment
- Configuring user space
Creating Wind River Linux BSPs
- BSP development overview
- Starting from scratch
- Starting with third-party code
- Enabling supported boards
- Cloning BSPs
- Packaging Wind River Linux BSPs
- LAB: Managing Kernel Modules
- LAB: Developing Kernel Modules
- LAB: Creating a BSP
Prerequisites
Prerequisite Courses
Prerequisite Skills
- Familiarity with the Yocto Project build environment
- Familiarity with makefiles and the GNU toolchain
- Understanding of how to deploy and debug Linux-based applications in a cross-development environment
- C or C++ programming experience on Linux/UNIX
Related Courses
COURSE DETAILS SUMMARY
- Duration: 4 Days
- Course Information: View
- Format: Lectures and Labs
- Type: Instructor-led