Device Drivers development training

This course provides you with the information you need to start developing device drivers for Linux. Learn how to set up, run, and debug device drivers on real devices. The skills learned can be applied to embedded systems, but are platform independent, making them portable to any architecture. All labs are built and tested on the BeagleBone Black, an ARM-based development board.

Details
  • Duration: 1 day (from 9:00 to 18:00)
  • Type: ~ 50% presentations, ~ 50% practical exercises
  • Slides language and material provided: English
  • Oral presentation language: Italian or English
  • Number of participants: maximum 10 people
Equipment required

Each participant must have a Laptop on which a Virtual Machine provided by the teacher at the beginning of the course will be installed. All the necessary material is provided by Koan except the PC. Therefore participants must have their own laptop with:

  • Laptop PC with at least 4 GB of RAM and 40 GB of free disk space.
  • Virtual Box installed 
  • We will work with Lubuntu Desktop 18.04 (64 bit). (We don’t support other distributions, because we can’t test all possible versions).
  • Internet connection (direct or through the company proxy).
  • For security reasons it is necessary that each participant backup their computer before the course.
Hardware used

The practical exercises will be run on a BeagleBone Black with a Cortex ARM CPU provided on loan during the course.

beagleBone Black training

All exercises will be applicable to any other type of board supported by Linux.

Prerequisites

To get the best results from this course it is advisable to know the following topics:

  • Knowledge of embedded Linux as described in our embedded Linux training
  • Basic knowledge of the command line shell
  • Programming knowledge C
  • Experience with Embedded GNU / Linux (kernel, user space, root file system, tools)
  • Practice of Unix or GNU / Linux commands
  • Cross-compilers
  • Linux kernel
  • u-boot bootloader
Course structure

Below are listed some of the topics covered during the course.

Device driver basics
  • Types of device driver
  • Different ways for applications to interact with the driver
  • Building and testing a simple character device driver
Kernel Modules
  • get kernel sources
  • configure/build/install
  • device drivers (statically linked, loaded at runtime)
  • Writing a module and compiling “out of tree”
  • Loading and testing on the target
  • Passing parameters
  • Modules and the GPL license
  • init/exit
  • licensing
  • EXPORT SYMBOL GPL
  • out of tree makefile
  • module-init-tools
  • module in kernel tree
  • Kconfig and Makefile
Character Device Drivers
  • architecture
  • user/kernel interface
  • I/O subsystem
  • VFS
  • sysfs (devices, bus, drivers, classes),
  • kobject/ktype/kset
  • linux kernel driver model
  • device files
  • char driver
    • initialization
    • registration
    • open, release
    • cdev, cdev add, cdev del,…
    • major/minor numbers
    • udev, udevmonitor, udevadm
Interrupts
  • interrupts vs. polling
  • interrupt
  • program sections
  • reentrancy
  • events
  • interrupt handler
  • shared interrupt handler
  • interrupt flow
  • interrupt control
Deferring Work
  • top/bottom halves
  • softirqs
  • tasklets
  • work queues
  • threaded interrupts
Scroll to Top