Linux kernel and driver development: five-day training

The Linux kernel is the layer between your hardware and every user-space application. This five-day, hands-on course is a guided tour from the kernel source tree to a working device driver. It starts with the kernel’s role in the system, its source layout and release model, then moves through configuration and cross-compilation, booting with U-Boot, modules and the Device Tree, the device and driver model, I2C and the kernel frameworks, and the kernel internals that drivers depend on: memory management, VFS and the page cache, MMIO, clocks and power, scheduling, interrupts, locking and DMA. The course closes with kernel debugging and the upstream contribution process.

The course follows the mainline Linux source tree and the public kernel-slides deck. The labs build and boot a kernel for a target, using QEMU or a supported board.

A character driver in the kernel, a slide from the Linux kernel and driver development training

Selected slides from the course deck.

Duration

5 days

Participants

Minimum 3

Trainer

Michael Trimarchi

Delivery

On site only

Price

On request

Download the course preview (PDF)

Request a quotation

Contact us

What you will learn

  • Navigate the kernel source tree, understand the release model and choose a base for a product.

  • Configure, cross-compile and install a kernel, and boot it with U-Boot.

  • Write, build, load and parameterise kernel modules; follow the kernel coding style and pass checkpatch.pl.

  • Describe non-discoverable hardware in the Device Tree, configure pin muxing and validate bindings.

  • Follow the device and driver model: buses, platform devices, probe() and deferred probing.

  • Write an I2C client driver and use the character-driver, input, regmap and devres frameworks.

  • Work with kernel memory management, the VFS and page cache, and MMIO.

  • Use the clock, power and misc frameworks, and reason about scheduling, interrupts, locking and DMA.

  • Debug the kernel with printk, dynamic debug, debugfs, oops decoding, ftrace, perf and BPF.

  • Prepare, check, post and revise a patch for upstream review.

Who it is for

Kernel and driver developers

Engineers moving from application or BSP work into kernel code, who want a structured path through the kernel’s APIs and frameworks.

BSP and platform teams

Teams that maintain board support and need to understand the Device Tree, the driver model and the subsystems behind their hardware.

Teams moving to mainline

Teams coming from vendor kernels that want to reduce their delta, support hardware in mainline and contribute fixes upstream.

Five-day programme

The suggested timing is five days. Each day combines lectures, kernel source walkthroughs and practical exercises; each block ends with a checkpoint and discussion.

Day 1

Foundations

  • Kernel introduction: role, system calls and pseudo filesystems

  • Official, stable, LTS and vendor kernel sources

  • Source tree, versioning, development model and release cycle

  • Configuration, Kconfig and cross-compilation

  • Booting with U-Boot, the command line and the kernel log

Day 2

Modules and hardware description

  • Kernel modules, utilities and autoloading

  • Developing modules: hello module, symbols and parameters

  • Kernel coding style and checkpatch.pl

  • Device Tree syntax, bindings and validation

  • Pin muxing and the pinctrl subsystem

Day 3

Drivers

  • Device and driver model: buses, platform devices and probe()

  • Deferred probing and driver data structures

  • I2C subsystem and an I2C client driver

  • Character drivers, file operations and ioctl

  • Input subsystem, regmap and devres

Day 4

Kernel internals

  • Memory management, allocators, reclaim and huge pages

  • VFS, the page cache and file I/O paths

  • Memory-mapped I/O and ioremap()

  • Common Clock Framework and devfreq

  • Processes, EEVDF scheduling and SMP

Day 5

Concurrency, debugging and upstream

  • Interrupts, threaded IRQs and deferred work

  • Locking, RCU and atomics

  • DMA principles, descriptors and the DMA APIs

  • Debugging: printk, debugfs, oops decoding, ftrace, perf and BPF

  • Upstream: preparing, posting and revising a patch

Hands-on labs

The labs follow the deck’s examples. Participants configure and build a kernel for a target, compile and load modules, describe hardware in the Device Tree and follow a driver through the device model.

The exercises cover:

  • Configuring and cross-compiling a kernel

  • Installing and booting the kernel with U-Boot

  • Writing, building, loading and unloading a module

  • Passing parameters to a module and reading them from sysfs

  • Describing a device in the Device Tree

  • Configuring pin muxing with pinctrl

  • Following probe() through the device model

  • Writing an I2C client driver

  • Registering a character device

  • Inspecting memory, VFS and MMIO

  • Debugging with printk, debugfs and ftrace

  • Preparing and posting an upstream patch

Lab requirements

  • A Linux host with a cross-compiler and kernel headers

  • QEMU or a supported board for the boot and driver exercises

  • Network access for the kernel sources

Course preview

The downloadable brief includes the course overview, the five-day programme, the hands-on labs and selected slides from the course deck.

Course materials

The slides are public in the kernel-slides repository. The deck is written with Slidev, and the diagrams are editable draw.io sources. The repository is licensed under GPL-2.0.

The material is inspired by Bootlin’s “Linux kernel and driver development training”, licensed under Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0), and by Amarula’s “Introduction to Linux Kernel”. See the repository LICENSE and the “Inspiration & license” slide for the attribution.

Prerequisites

  • C programming: pointers, structures and manual memory management

  • Linux command line and Git

  • Embedded Linux basics: bootloader, kernel and root filesystem

  • A Linux host with a cross-compiler for the lab builds

Your trainer

Michael Trimarchi

Michael Trimarchi is co-founder and CEO of Amarula Solutions and a Linux software engineer working on embedded and real-time systems. Michael holds a Master’s degree in Software Engineering from the University of Pisa and is co-author of the first version of the EDF patches submitted to mainline Linux.

Michael teaches this training from the perspective of a team that maintains mainline kernel support: how to read the source tree, choose the right subsystem framework and get a driver accepted upstream.

Read Michael’s profile.

Booking and logistics

  • Linux kernel and driver development: 5 days, price on request; minimum 3 participants.

  • Delivery: on site only.

  • Trainer: Michael Trimarchi.

  • Format: instructor-led and hands-on, with kernel source walkthroughs and practical exercises.

  • Materials: the public kernel-slides repository, licensed under GPL-2.0.

Sessions are arranged on request. To reserve the training, request a quotation or contact us.