1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-25 17:33:28 +04:00

update README. lock Rust nightly version

This commit is contained in:
WangRunji 2019-01-03 19:20:02 +08:00
parent 62221387c1
commit b8e32f8854
3 changed files with 25 additions and 125 deletions

View File

@ -2,7 +2,7 @@ sudo: false
language: rust
rust: nightly
rust: nightly-2019-01-01
os:
- linux

View File

@ -1,4 +1,4 @@
# RustOS
# rCore OS
[![Build Status](https://travis-ci.org/wangrunji0408/RustOS.svg?branch=master)](https://travis-ci.org/wangrunji0408/RustOS)
@ -6,40 +6,23 @@ 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
Supported architectures: x86_64, RISCV32/64, AArch64
Tested boards: QEMU, labeled-RISCV, Raspberry Pi 3B+
Tested boards: QEMU, labeled-RISCV, K210, Raspberry Pi 3B+
[Dev docs](https://rucore.gitbook.io/rust-os-docs/) (in Chinese)
![demo](./docs/2_OSLab/os2atc/demo.png)
## Summary
This is a project of THU courses:
* Operating System (2018 Spring)
* Comprehensive Experiment of Computer System (2018 Summer)
* Operating System Train (2018 Autumn)
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)
Reports (in Chinese): [docs](./docs)
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.
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.
## Building
### Environment
* [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)
* [Rust](https://www.rust-lang.org) toolchain at nightly-2019-01-01
* Cargo tools: [cargo-xbuild](https://github.com/rust-osdev/cargo-xbuild)
* [QEMU](https://www.qemu.org) >= 2.12.0
* [bootimage](https://github.com/rust-osdev/bootimage) (for x86_64)
* [RISCV64 GNU toolchain](https://www.sifive.com/boards) (for riscv32/64)
* [AArch64 GNU toolchain](https://web.stanford.edu/class/cs140e/assignments/0-blinky/) (for aarch64)
### How to run
@ -52,10 +35,24 @@ cargo install cargo-xbuild bootimage
```bash
git clone https://github.com/wangrunji0408/RustOS.git --recursive
cd RustOS/kernel
rustup override set nightly
make run arch=riscv32|x86_64|aarch64
rustup override set nightly-2019-01-01
make run arch={riscv32,riscv64,x86_64,aarch64}
```
## History
This is a project of THU courses:
* Operating System (2018 Spring)
* Comprehensive Experiment of Computer System (2018 Summer)
* Operating System Train (2018 Autumn)
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)
Reports (in Chinese): [docs](./docs)
It's based on [BlogOS](https://github.com/phil-opp/blog_os) , a demo project in the excellent tutorial [Writing an OS in Rust (First Edition)](https://os.phil-opp.com/first-edition/).
## License
The source code is dual-licensed under MIT or the Apache License (Version 2.0).

View File

@ -1,97 +0,0 @@
## ucore_os_lab port status
#### lab1:
- [x] Basic initLocalAPICIOAPICGDTPIC
- [x] DeviceKeyboardSerialPITIDE
- [x] Interrupt & Trapframe
- [x] ※ Muilt-core startup
#### lab2: Physical memory management
- [x] Frame allocatorNaive
- [ ] Frame allocatorFirst FitBest FitWorst FitBuddySlab
- [x] Higher half kernel space
- [x] Kernel remap
#### lab3: Virtual memory management
- [x] Page table
- [x] Heap allocatorLinkedList (Rust crate)
- [x] ※ Stack allocatorNaive
- [x] MM & VMA
- [x] Copy on write
- [x] Swap
#### lab4: Kernel thread
- [x] idleproc
- [x] initproc
- [x] fork
- [x] Scheduler thread
#### lab5: User thread
- [x] Run xv6 64bit user programsSee the list below
- [x] Run ucore 32bit user programsSee the list below
#### lab6: Schedule
- [x] Schedule framework
- [x] RRScheduler
- [x] StrideScheduler
#### lab7: Synchronization
- [x] Mutex
- [x] Semaphore
- [x] Monitor
- [x] Dinning Philosophers Problem
#### lab8: File system
- [x] Simple file system
- [x] Load user programs from .img
- [x] FS framework for process
- [x] Device IO
## uCore 32bit user programs pass status
- [ ] badarg
- [ ] badsegment
- [x] divzero
- [x] exit
- [x] faultread
- [x] faultreadkernel
- [x] forktest
- [x] forktree
- [x] hello
- [x] ls
- [x] matrix
- [ ] pgdir
- [x] priority
- [x] sh
- [x] sleep
- [x] sleepkill
- [x] softint
- [x] spin
- [x] testbss
- [x] waitkill
- [x] yield
## xv6 64bit user programs pass status
- [ ] cat
- [ ] chmod
- [ ] echo
- [ ] forktest
- [ ] grep
- [ ] init
- [ ] kill
- [ ] ln
- [ ] ls
- [ ] mkdir
- [ ] rm
- [ ] sh
- [ ] stressfs
- [ ] usertests
- [ ] wc
- [ ] zombie