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.
- 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
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 (downloadable from here).
- We will work with Lubuntu Desktop 14.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.
The practical exercises will be run on a BeagleBone Black with a Cortex ARM CPU provided on loan during the course.
All exercises will be applicable to any other type of board supported by Linux.
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
- Linux kernel
- u-boot bootloader
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
- get kernel sources
- 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
- EXPORT SYMBOL GPL
- out of tree makefile
- module in kernel tree
- Kconfig and Makefile
Character Device Drivers
- user/kernel interface
- I/O subsystem
- sysfs (devices, bus, drivers, classes),
- linux kernel driver model
- device files
- char driver
- open, release
- cdev, cdev add, cdev del,…
- major/minor numbers
- udev, udevmonitor, udevadm
- interrupts vs. polling
- program sections
- interrupt handler
- shared interrupt handler
- interrupt flow
- interrupt control
- top/bottom halves
- work queues
- threaded interrupts