This is an old revision of the document!
Lab 04 - Kernel development
Objectives
Learn Linux kernel development basics;
Build your own Linux kernel module;
Understand userspace device types;
Use MMIO to communicate with the IMX UART peripheral!
Contents
Lecture
Additional resources
This is a list of curated sources of information to help you study kernel development on your own:
EmbeTronicX tutorials: Usually it's pretty hard to find up-to-date tutorials on how to write drivers. While some core APIs have been the same for years, there's always one thing that changes every few releases and deprecates previously written materials. These 40+ bite-sized lessons are great for learning about the core systems you interact with while writing modules.
Intro to x86-64 kernel dev: A lab written by yours truly for an ASE Masters class. This walks you through setting up your testing environment (including bootstrapping the rootfs) using
qemu-system. It contains some tips about kernel debugging with
gdb and teaches how to write an
iptables plugin. Note: try this out on a Ubuntu target environment (i.e.: what's in the lab). The latest releases on Arch are in the process of deprecating
iptables plugins in favor of transitioning to
nftables. Haven't had the chance to look further into this.
Linux Weekly News: A news website containing discussions about new kernel features. Chances are that at some point you'll find a stack overflow answer linking back to one of these articles. In case you're worried about the paywalled articles, know that each week you get a composite release of recent articles (past 7 days). While this is still paywalled, the previous week's articles become free.
-
Tasks