Analysis updated 2026-06-24
Follow the lessons to build a working ARM64 kernel from scratch in Rust
Study how to set up MMU, exceptions, and UART drivers on Raspberry Pi
Fork the modular code as a starting point for porting to RISC-V or other boards
Run the kernel binaries in QEMU to learn embedded debugging without hardware
| rust-embedded/rust-raspberrypi-os-tutorials | lgug2z/komorebi | analysis-tools-dev/static-analysis | |
|---|---|---|---|
| Stars | 14,654 | 14,553 | 14,542 |
| Language | Rust | Rust | Rust |
| Last pushed | — | — | 2026-05-18 |
| Maintenance | — | — | Maintained |
| Setup difficulty | hard | moderate | easy |
| Complexity | 5/5 | 4/5 | 1/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Real hardware runs need a CP2102 USB-to-serial cable plus GPIO wiring, macOS support is experimental and requires extra Ruby gems.
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.
Step-by-step tutorial series for writing a bare-metal OS kernel in Rust that boots on Raspberry Pi 3 and 4, or in QEMU emulation.
Mainly Rust. The stack also includes Rust, ARMv8-A, QEMU.
Dual licensed under MIT or Apache 2.0, so you can use the code freely in personal or commercial work as long as you keep the original notices.
Setup difficulty is rated hard, with roughly 1day+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.