Device Drivers development training

This course provides the information you need to start developing Device Drivers for Linux. You will be taught how to configure, run and debug a device driver on a real device. The techniques learned are applicable to embedded systems but are independent of the platform and therefore portable on any architecture. All laboratory exercises will be compiled and tested on a development board based on ARM, BeagleBone Black.

BBB Nunchuck

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 8 GB of RAM and 40 GB of free disk space.
  • Virtual Box installed (downloadable from here).
  • We will work with Lubuntu Desktop 22.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.

Material provided on loan

  • BeagleBone Black (TI AM335x)
  • Customized board with LED and button
  • Nunchuck (Accelerometer)

What will be developed and tested

  • Minimal driver
  • Character drivers
  • Driver with udev management
  • Driver with timer (blink led)
  • Driver with INT (push button)
  • I2C driver for Nunchuck (Accelerometer) management

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

Prossimi Corsi Device Drivers

No Events
No Events

Prossimi Corsi

No Events
No Events