• Stars
    star
    462
  • Rank 94,832 (Top 2 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tutorial for rCore OS step by step (3rd edition)

rCore-Tutorial V3

注意:本项目已经不再维护,有兴趣的同学请看rCore-Tutorial-v3

本教学仓库是继 rCore_tutorial V2 后重构的 V3 版本。

本文档的目标主要针对「做实验的同学」,我们会对每章结束后提供完成的代码,你的练习题只需要基于我们给出的版本上增量实现即可,不需要重新按照教程写一遍。

而对想完整实现一个 rCore 的同学来说,我们的文档可能不太友好。因为在编写教程过程中,我们需要对清晰和全面做很多的权衡和考虑、需要省略掉大量 Rust 语法层面和 OS 无关的代码以带来更好的可读性和精简性,所以想参考本文档并完整实现的同学可能不会有从头复制到尾的流畅(这样的做法也不是学习的初衷),可能需要自己有一些完整的认识和思考。

另外,如果你觉得字体大小和样式不舒服,可以通过 GitBook 上方的按钮调节。

仓库目录

  • docs/:教学实验指导分实验内容和开发规范
  • notes/:开题报告和若干讨论
  • os/:操作系统代码
  • user/:用户态代码
  • SUMMARY.md:GitBook 目录页
  • book.json:GitBook 配置文件
  • rust-toolchain:限定 Rust 工具链版本
  • deploy.sh:自动部署脚本

实验指导

基于 GitBook,目前已经部署到了 GitHub Pages 上面。

文档本地使用方法

npm install -g gitbook-cli
gitbook install
gitbook serve

代码

操作系统代码

本项目基于 cargo 和 make 等工具,在根目录通过 make run 命令即可运行代码,更具体的细节请参见 Makefileos/Makefile 以及 user/Makefile

参考和感谢

本文档和代码部分参考了:

在此对仓库的开发和维护者表示感谢,同时也感谢很多在本项目开发中一起讨论和勘误的老师和同学们。

More Repositories

1

rCore

Rust version of THU uCore OS. Linux compatible.
Rust
3,460
star
2

zCore

Zircon microkernel reimplemented in Rust.
Rust
1,717
star
3

rCore-Tutorial-v3

Let's write an OS which can run on RISC-V in Rust from scratch!
Rust
1,633
star
4

rCore-Tutorial-Book-v3

A book about how to write OS kernels in Rust easily.
Python
1,220
star
5

virtio-drivers

VirtIO guest drivers in Rust.
Rust
208
star
6

rCore_tutorial

Tutorial for rCore OS step by step (2nd edition)
Rust
140
star
7

RVM

Rcore Virtual Machine
Rust
106
star
8

buddy_system_allocator

A buddy system allocator in pure Rust.
Rust
87
star
9

rCore_tutorial_doc

Tutorial doc for rCore OS step by step (2nd edition)
Rust
64
star
10

zCore-Tutorial

[WIP] Tutorial for zCore kernel.
Rust
57
star
11

RVM1.5

A Type-1.5 hypervisor written in Rust.
Rust
54
star
12

rcore-fs

The file system module for rCore OS.
Rust
48
star
13

rboot

The x86_64 UEFI bootloader for rCore
Rust
43
star
14

blog

rcore-os Developer Blog
Stylus
41
star
15

arceos-tutorial-book

39
star
16

rust-for-linux

Rust for Linux 设备驱动开发
33
star
17

aCore

Asynchronous OS kernel written in Rust.
33
star
18

nvme_driver

Rust
30
star
19

trapframe-rs

Handle TrapFrame across kernel and user space on multiple ISAs.
Rust
30
star
20

learn-rust

22
star
21

zcore_tutorial_developers

zcore_tutorial文档撰写工作以及单元测试工作组
HTML
19
star
22

rcore-user

User programs for rCore OS
C
18
star
23

riscv-sbi-rt

A mininal runtime / startup for Supervisor Binary Interface (SBI) on RISC-V.
Rust
18
star
24

rcore-thread

Bare-metal multithreading on multi-core processor.
Rust
17
star
25

rCore-Tutorial-v3-arm64

Let's write an OS which can run on ARM in Rust from scratch! (🚧WIP)
Rust
15
star
26

bcm2837

Low level access to BCM2837 SoC on Raspberry Pi 3 Model B/B+
Rust
12
star
27

x86-smpboot

Booting multi-processors on x86 bare-metal.
Assembly
11
star
28

rCore-Tutorial-v3-x86_64

Let's write an OS which can run on x86_64 in Rust from scratch! (🚧WIP)
Rust
9
star
29

cpio

Freestanding CPIO file reader in Rust.
Rust
9
star
30

bitmap-allocator

Free space bitmap allocator
Rust
8
star
31

embedded-term

The virtual console embedded in rCore kernel.
Rust
8
star
32

apic-rs

Rust APIC crate for x86 kernel.
Rust
7
star
33

pci-rs

A platform-agnostic PCI bus management and configuration access library.
Rust
5
star
34

naive-timer

A minimal naive timer for embedded platforms (no_std) in Rust.
Rust
5
star
35

community

rCore-OS community
5
star
36

rlibc-opt

An optimized version of rlibc.
Rust
5
star
37

rcore-vmm

Virtual machine monitor app for rCore OS
C
5
star
38

riscv-sbi

Low level access to RISC-V Supervisor Binary Interface (SBI) implementations
Rust
4
star
39

isomorphic_drivers

A set of isomorphic drivers that can run both in kernel and user space without modifications.
Rust
3
star
40

software-hardware-analysis

3
star
41

rcore-lkm

Loadable Kernel Module for rCore OS
Rust
3
star
42

.github

3
star
43

rCore-Tutorial-deploy

Tutorial Doc for rCore OS step by step (3rd edition)
Rust
3
star
44

rcore_tutorial_tests

Rust
3
star
45

rcore-tutorial-book-code

Rust
3
star
46

e1000e-driver

Intel 82574L GbE Controller e1000e driver in Rust.
2
star
47

zircon-notes

Some analysis of zircon
2
star
48

testos

2
star
49

busybox-prebuilts

2
star
50

mem_malloc_subsystem

C
2
star
51

zcore-tests

Test scripts for zCore OS
Python
1
star
52

discussions

1
star
53

rcore-os.github.io

rCore-OS website
1
star