You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.2 KiB

6 years ago
# RustOS
8 years ago
6 years ago
[![Build Status](https://travis-ci.org/wangrunji0408/RustOS.svg?branch=master)](https://travis-ci.org/wangrunji0408/RustOS)
6 years ago
6 years ago
Rust version of THU [uCore OS](https://github.com/chyyuu/ucore_os_lab/).
Going to be the next generation teaching operating system.
Supported architectures: x86_64, RISCV32IMA(S/M), AArch64
Tested boards: QEMU, Raspberry Pi 3B+
6 years ago
[Dev docs](https://rucore.gitbook.io/rust-os-docs/) (in Chinese)
## Summary
6 years ago
This is a project of THU courses:
* Operating System (2018 Spring)
* Comprehensive Experiment of Computer System (2018 Summer)
* Operating System Train (2018 Autumn)
6 years ago
Project wiki (internal access only): [OS](http://os.cs.tsinghua.edu.cn/oscourse/OS2018spring/projects/g11), [CECS](http://os.cs.tsinghua.edu.cn/oscourse/csproject2018/group05), [OST](http://os.cs.tsinghua.edu.cn/oscourse/OsTrain2018)
8 years ago
6 years ago
Reports (in Chinese): [docs](./docs)
6 years ago
The initial goal is to write a mini OS in Rust with multi-core support. More specifically, it would start from the post of the [Writing an OS in Rust](http://os.phil-opp.com) series, then reimplement [xv6-x86_64](https://github.com/jserv/xv6-x86_64) in Rust style.
6 years ago
In fact, it's more complicated than we expected to write an OS starting from scratch. So by the end of OS course, we only finished rewriting [ucore_os_lab](https://github.com/chyyuu/ucore_os_lab), without multi-core support. Then as a part of [CECS project](https://github.com/riscv-and-rust-and-decaf), we ported it from x86_64 to RISCV32I, and made it work on our FPGA CPU.
8 years ago
## Building
6 years ago
### Environment
6 years ago
* [Rust](https://www.rust-lang.org) toolchain at nightly
* Cargo tools: [cargo-xbuild](https://github.com/rust-osdev/cargo-xbuild), [bootimage](https://github.com/rust-osdev/bootimage)
* QEMU >= 2.12.0
* [RISCV64 GNU toolchain](https://www.sifive.com/products/tools/) (for riscv32)
6 years ago
* [AArch64 GNU toolchain](https://web.stanford.edu/class/cs140e/assignments/0-blinky/) (for aarch64)
8 years ago
6 years ago
### How to run
```bash
rustup component add rust-src
cargo install cargo-xbuild bootimage
```
6 years ago
```bash
git clone https://github.com/wangrunji0408/RustOS.git --recursive
6 years ago
cd RustOS/kernel
6 years ago
rustup override set nightly
make run arch=riscv32|x86_64|aarch64
6 years ago
```
8 years ago
## License
8 years ago
The source code is dual-licensed under MIT or the Apache License (Version 2.0).