Skip to content
A multi-platform kernel written in Rust
Branch: master
Clone or download
Pull request Compare This branch is 230 commits ahead, 51 commits behind charliesome:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
arch
common
.gitignore
.gitmodules
LICENSE.txt
Makefile
README.md

README.md

rustboot

A small kernel with basic functionality written in Rust. Currently only parts of memory management and the keyboard driver are any interesting.

Pictures

It paints the screen bright red and then displays some information. You can write. That's it:

Setup

You need a few things to run rustboot:

  1. Rust's master branch
  2. qemu
  3. On x86
  • clang
  • nasm
  1. On ARM
  • binutils for arm-none-eabi
  • gcc cross-compiler
  1. Optionally for debugging
  • gdb
  • tmux

Clone this repository.

$ git clone https://github.com/pczarn/rustboot.git
$ cd rustboot

To get edge Rust going, grab it from git:

$ git clone https://github.com/mozilla/rust
$ cd rust
$ ./configure --target=i686-unknown-linux-gnu
$ make && make install

You can considerably minimize build time:

$ ./configure --target=i686-unknown-linux-gnu --llvm-root=/usr
$ make rustc-stage1

Then use the rust/*/stage1/bin/rustc binary to compile rustboot:

$ echo "RUST_ROOT:=$(pwd)/x86_64-unknown-linux-gnu/stage1/bin" > rustboot/config.mk

Arch Linux

Simply install all dependencies:

# pacman -S qemu nasm rust clang gdb tmux
# yaourt -S gcc-arm-none-eabi

OSX

To set things up on OSX, do this:

Install nasm and qemu from homebrew:

$ brew install nasm
$ brew install qemu

Install latest binutils from source.

$ wget 'ftp://sourceware.org/pub/binutils/snapshots/binutils.tar.bz2'
$ ./configure --target=i386-elf
$ make && make install

Running it

To compile, simply execute make command.

To run, use:

$ make run # emulate default platform (x86)
$ make arch=arm run   # run on ARM
$ make arch=arm debug # debug on ARM
You can’t perform that action at this time.