rustboot

A tiny 32 bit kernel written in Rust

  • 所有者: haileys/rustboot
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

rustboot

A tiny 32 bit kernel written in Rust.

I was inspired to download Rust and try to do this after seeing zero.rs - a stub that lets Rust programs run almost freestanding.

It paints the screen bright red and then hangs. That's it:

Interesting forks

Setup

You need a few things to run rustboot:

  1. qemu
  2. a cross-compiler for i386
  3. nasm
  4. Rust's master branch or 0.7 release.

OSX

To set things up on OSX, do this:

Install nasm and qemu from homebrew:

$ brew install nasm
$ brew install qemu

Make sure the brew version of nasm is being used:

$ nasm -v
NASM version 2.11.02 compiled on Apr 14 2014

Install binutils from source.

I personally keep things I manually compile limited to my home directory, so
I use the --prefix=/Users/steve option. Put this wherever you want, of
course.

$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.gz
$ tar xf binutils-2.24.tar.gz
$ cd binutils-2.24
$ ./configure --target=i386-elf --disable-werror --prefix=/Users/steve
$ make && make install

To get edge Rust going, grab it from git:

$ git clone https://github.com/mozilla/rust
$ cd rust
$ ./configure --prefix=/Users/steve
$ make && make install

Same thing about the prefix applies.

Then, just make sure that ~/bin is in your PATH, if you're using a prefix.

Running it

To compile, simply

$ make

To run,

$ make run

主要指标

概览
名称与所有者haileys/rustboot
主编程语言Ruby
编程语言Ruby (语言数: 4)
平台
许可证MIT License
所有者活动
创建于2013-05-26 14:57:53
推送于2021-08-01 13:04:25
最后一次提交2014-07-01 10:11:20
发布数0
用户参与
星数1.5k
关注者数89
派生数222
提交数61
已启用问题?
问题数14
打开的问题数7
拉请求数10
打开的拉请求数0
关闭的拉请求数8
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?