Skip to content

wbthomason/ironkernel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WARNING: This repo is super old and comes from relatively early days of Rust. It is not meant as an example for how to build a kernel with modern Rust; nor will it work with modern Rust.

ironkernel

A fork of rustboot focusing on ARM functionality and aiming to extend it into a more fully functional kernel. Setup instructions below cribbed also from rustboot.

Setup

You need a few things to run ironkernel:

  1. rust-core
  2. Rust's master branch or 0.9 release
  3. qemu
  4. llvm
  5. binutils for arm-none-eabi
  6. Optionally for debugging
  • gdb
  • tmux

Clone this repository and update rust-core.

$ git clone https://github.com/wbthomason/ironkernel.git
$ cd ironkernel
$ git submodule update --init
### you can also pull latest rust-core:
$ git submodule foreach git pull origin master

Arch Linux

Simply install all dependencies:

# pacman -S base-devel qemu rust llvm tmux
# yaourt -S arm-none-eabi-gcc

Note that you will want Rust 0.9 and LLVM 3.4

OSX

To set things up on OSX, do this:

Install nasm and qemu from homebrew:

$ brew install nasm
$ brew install qemu

Everyone

Install binutils from source.

wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.gz
tar xzvf binutils-2.23.2.tar.gz
cd binutils-2.23.2
export ARMTOOLS=~/arm-none-eabi
./configure --target=arm-none-eabi --prefix=$ARMTOOLS
make all install

To get edge Rust going, grab it from git:

$ git clone https://github.com/mozilla/rust
$ cd rust
$ ./configure
$ make && make install

Running it

You may have to make some small changes before it builds. Namely, you may need to adjust the rust prefix in the makefile (I did). Hopefully nothing else. To compile, simply execute make command.

To run, use:

$ make run	# emulate default platform (ARM)
$ make debug # debug on arm

About

A multi-platform kernel written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 89.9%
  • Assembly 7.3%
  • Makefile 2.7%
  • GDB 0.1%