This repository contains the source code for the Writing an OS in Rust series at os.phil-opp.com.
You need a nightly Rust compiler and the
bootimage tools. You can install the tools by executing the following command:
cargo install cargo-xbuild bootimage
Afterwards you can invoke
bootimage build to produce a bootable disk image. Please file an issue if you run into any problems.
To run the image in QEMU, you can execute
bootimage run. Note that you need to have QEMU installed.
The goal of this project is to provide step-by-step tutorials in individual blog posts. We currently have the following set of posts:
First Edition Posts
The current version of the blog is already the second edition. The first edition is outdated and no longer maintained, but might still be useful. The posts of the first edition are:
- A Minimal x86 Kernel (source code)
- Entering Long Mode (source code)
- Set Up Rust (source code)
- Printing to Screen (source code)
- Allocating Frames (source code)
- Page Tables (source code)
- Remap the Kernel (source code)
- Kernel Heap (source code)
- Cross Compile Binutils
- Cross Compile libcore
- Set Up GDB
- Handling Exceptions using Naked Functions
The source code is dual-licensed under MIT or the Apache License (Version 2.0). This excludes the