This repository is a tutorial series that walks you through writing your own operating system kernel in the Rust programming language, running on a Raspberry Pi. It is aimed at hobby OS developers who are new to ARM's 64 bit ARMv8-A chip architecture, which is what powers modern Raspberry Pi boards. The README describes it as a step by step guided tour that builds a monolithic kernel from scratch, covering tasks like writing text to a serial console, setting up virtual memory, and handling hardware exceptions, while using Rust's safety and speed features along the way. The author is Andre Richter. The tutorials are organised so each lesson contains its own standalone, bootable kernel binary, and each new tutorial builds on the previous one. Every tutorial folder has a short tl;dr section that lists what changed compared to the last lesson, plus a code diff so you can see the additions easily. Some lessons also include longer written explanations. The first five lessons only make sense to run inside QEMU, which is an emulator. From lesson five onward the code can be loaded onto a real Raspberry Pi 3 or Raspberry Pi 4, with output coming out over a UART serial connection. The code is structured so that porting to other chips or boards should be possible, and the author mentions wanting someone to try a RISC-V port. For setup, the README points you to install Docker, set up the Rust toolchain via rustup, and install two helper crates called cargo-binutils and rustfilt. Linux is the primary supported host, with macOS treated as experimental and needing some extra Ruby gems. Visual Studio Code with the Rust Analyzer extension is recommended for editing. A make doc command is included in each tutorial so you can browse the well-commented source code locally. The README explains the project leans on Docker to avoid the usual pain of installing the right versions of tools like QEMU, OpenOCD, and GDB. A container with everything preinstalled is pulled in when needed. For real hardware use the README recommends a USB to serial cable, ideally based on the CP2102 chip, wired to specific GPIO pins on the Pi. Starting with tutorial 6 a chainloader makes it easy to push new kernels over UART without swapping the SD card each time. The series originally started as a fork of Zoltan Baldaszti's bare metal RPi3 tutorials in C, and it has community translations into Chinese and Spanish.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.