Kernel Development Course

Here are some slides and examples I used for a kernel course I developed (some time ago now).

The course was aimed at C developers who wanted an introduction to both general UNIX-style user-space and Linux kernel development with a focus on embedded systems issues. The course is aimed at two 8-hour days, and is pretty packed in even then.

The first day is user-space development and kernel building, focusing on things like make, autotools, advanced gcc, getting cross-compilers working, configuring the kernel and building. The second day we get into kernel internals; building up a kernel module to produce some simple proc nodes, take data, crash and debug, etc, look at internals like concurrency and the driver model, and focus on USB quite a bit.

Here is a tarball of the entire thing, including the examples.

Hopefully these can help out anyone tackling the design of such a course.

  • Day 1
    • Linux philosophy, people and processes
    • UNIX build environment
      • Makefiles, Autotools
    • Executable and Linker Format
    • Advanced GCC
    • Linker, Dynamic Linker, Shared Libraries
    • Cross compilation toolchain
      • Building toolchains on Debian
    • Kernel development process
    • Source control, patches, GIT, Quilt
    • Configuring and building a kernel
    • Cross compiling kernel
    • initrd, initramfs, init tools
  • Day 2
    • Kernel source layout
    • Kbuild, Kconfig
    • Syscalls (x86-32)
    • Kernel view of userspace
    • Virtual Memory
    • Getting data in/out kernel
    • Crashing, Oops, backtraces
    • Various tools
      • systemtap, kprobes
      • perfmon, oprofile
      • valgrind
    • Basic constructs
      • Concurrency, locks
      • Interrupts, sleeping
      • Atomic access
      • Memory allocation
    • VFS layer
    • /proc
    • Char and block devices
    • Driver model
      • sysfs, kobjects
      • buses, devices
    • USB Overview
      • Protocol overview
      • Registering drivers
      • uevents
    • Useful development paradigms
    • Unit testing