Skip to content

Repository files navigation

Learning Linux Kernel Development

  1. ./build builds a Linux Kernel bzImage (inside a build container, it's just easier for dependencies) and userland demo images such as: (You can use any Docker Container image as User Land, see image2initrd, as long as it has an /init).

    • hello: a minimal "hello, world" /init static binary runnable in a FROM scratch demo container
    • busybox-init: a busybox-based container with bash as init and working networking
  2. ./run-qemu hello starts this Kernel in a virtual machine (using KVM, with QEMU; enable virtualization first), with an initrd containing our hello demo.

  3. ./run-qemu busybox-init starts this Kernel in a virtual machine using the busybox container image plus our own init as initrd. You can quit it using poweroff -f. Also see networking.

  4. ./run-qemu-syslinux hello | busybox-init builds a disk image with SYSLINUS bootloader, and starts virtual machine. (Whereas run-qemu uses qemu* -kernel -initrd.)

  5. The /tmp/bzImage-busybox-init.img disk image can be written to a USB key (e.g. using dd, or, easier, GNOME Disks), and will boot on bare metal.

  6. ./run-dev-container will run an interactive dev container to explore [tux@kernel-dev ~]. Its root password is empty, so you can e.g. sudo dnf install -y .., but it's (intentionally) ephemeral - script it! ;)

  7. ./test.tcl automatically tests everything that's described above; run it after making any changes (and extend it when adding new features).

docs/ has more background and details; including a Roadmap and TODOs. Architecture (future, TBD) further describes what's what in this repo.

archlinux has my Arch Linux based distro.

by Michael Vorburger.ch

About

Learning Linux Kernel development

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages