Kurse › Raspberry Pi › Stufe 30
Raspberry Pi · Advanced · Stufe 30 / 40
Kernel, Device Tree and User-Space Drivers
Understand how Linux sees Pi hardware and add support for new devices with overlays and your own drivers.
Advanced freischalten · CHF 29.90 Stufen 27–40, einmalig, kein Abo
10 Lektionen in dieser Stufe
- How the Pi Boots: EEPROM, Firmware, Kernel and config.txt
Follow the boot chain and know which file controls which stage. · Lab: Capture boot messages on the serial console and annotate each stage. - Kernel Modules: Loading, Parameters and dmesg
Inspect, load and unload modules and read kernel messages. · Lab: Load a module with a parameter, watch dmesg and blacklist an unwanted one. - Device Tree Fundamentals: Nodes, Properties and Compatible Strings
Read a device tree and see how it selects drivers. · Lab: Decompile the running device tree and locate the I2C controller and its children. - Using and Configuring Stock Overlays
Enable peripherals with dtoverlay and dtparam lines. · Lab: Enable a second I2C bus and a hardware PWM pin and verify both. - Writing Your Own Device Tree Overlay
Describe a device so an existing kernel driver binds to it. · Lab: Write, compile and load an overlay for an MCP23017 and use its new GPIO lines. - The RP1 I/O Controller and What Changed on Pi 5
Explain how GPIO and buses hang off PCIe on the Pi 5 and what software that broke. · Lab: Compare GPIO chip names, pin control and PWM setup between a Pi 4 and a Pi 5. - GPIO Through the Character Device with libgpiod
Request lines, set bias and wait for edge events with kernel timestamps. · Lab: Read timestamped edges with the gpiod Python bindings and compare with gpiozero. - User-Space I2C and SPI Drivers from a Datasheet
Design a clean driver class with configuration, error handling and tests. · Lab: Write a driver for an unsupported sensor and test it against captured bus traces. - Exposing Hardware Through sysfs, IIO and hwmon
Use standard kernel interfaces instead of device-specific code. · Lab: Bind a kernel driver to a sensor and read it from the IIO or hwmon files. - Building the Kernel and an Out-of-Tree Module
Compile a kernel and a minimal module for your Pi. · Lab: Cross-compile the kernel, then build and load a small module that logs a message.
Abschlussprojekt
A tested Python driver package for a chip you had no library for, plus a custom overlay that binds an in-kernel driver to a second device and exposes it through standard system interfaces.
Teile für diese Stufe
- 1 × Raspberry Pi 5 set from Level 1
- 1 × Raspberry Pi 4 (optional, for comparison)
- 1 × I2C sensor breakout with no ready-made Python library (for example a light or current sensor)
- 1 × MCP23017 I2C GPIO expander
- 1 × SPI device breakout (for example a MAX31855 thermocouple amplifier)
- 1 × USB to TTL serial adapter (3.3 V)
- 1 × USB logic analyzer 8-channel
- 1 × Breadboard and jumper wire set
In jeder Lektion legst du die passenden Teile direkt in den Warenkorb. Raspberry Pi →
Voraussetzung: Levels 11, 12, 26 and 27: bus protocols, register access, C basics and kernel timing.