**Step by step, learn to develop an operating system on RISC-V**
<!-- TOC -->
- [1. Introduction](#1-introduction)
- [2. Operating environment](#2-operating-environment)
- [3. Building and usage](#3-building-and-usage)
- [4. References](#4-references)
<!-- /TOC -->
# 1. Introduction
This course is used to teach and demonstrate how to write a simple operating system kernel for the RISC-V platform from scratch. Released under the BSD 2-Clause license (For details, please read the [LICENSE file](./LICENSE) under the root directory of this repository).
If you have any questions or bug report, please use the issue tracking system on github.
Note: We also have a mirror repository on gitee (<https://gitee.com/unicornx/riscv-operating-system-mooc>), and we use the issue tracking system on gitee more actively than on github, all issue# filled in git commitment are from the issue tracking system of gitee.
# 2. Operating environment
Ubuntu 20.04 is recommended. Ubuntu 20.04 is currently the latest recommended long-term stable release of Ubuntu. It is also the easiest to install and run the environment in this environment.
Some students reported that they hope to still use Ubuntu 18.04. Because the official source of Ubunt 18.04 does not support the RISC-V development kit, so the environment is a little more complicated. I wrote a simple document, and you can refer [here ](./howto-run-with-ubuntu1804.md) to have a try with Ubuntu 18.04.
All demo codes have been verified under the following environment. Please carefully check whether your Ubuntu version and kernel version are consistent with the following information.
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ uname -r
5.11.0-27-generic
```
At present, in the Ubuntu 20.04 environment, we can directly use the official GNU toolchain and QEMU emulator, and execute the following command to install online to start the test:
```
$ sudo apt update
$ sudo apt install build-essential gcc make perl dkms git gcc-riscv64-unknown-elf gdb-multiarch qemu-system-misc
```
# 3. Building and usage
- `make`:Compile and build
- `make run`:Start qemu and run
- `make debug`:Start debugging
- `make code`:Disassemble to view binary code
- `make clean`:cleanup
For specific use, please refer to the Makefile under the specific sub-project.
# 4. References
The design of this course refers to the following network resources, thank you :)
- The Adventures of OS:<https://osblog.stephenmarz.com/index.html>
- mini-riscv-os: <https://github.com/cccriscv/mini-riscv-os>
- Xv6, a simple Unix-like teaching operating system:<https://pdos.csail.mit.edu/6.828/2020/xv6.html>
没有合适的资源?快使用搜索试试~ 我知道了~
《从头写一个RISC-V操作系统》课程配套的资源.zip
共282个文件
c:86个
s:60个
makefile:43个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 162 浏览量
2023-03-29
22:57:54
上传
评论 1
收藏 29.04MB ZIP 举报
温馨提示
《从头写一个RISC-V操作系统》课程配套的资源.zip
资源推荐
资源详情
资源评论
收起资源包目录
《从头写一个RISC-V操作系统》课程配套的资源.zip (282个子文件)
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
page.c 4KB
uart.c 4KB
uart.c 4KB
uart.c 4KB
uart.c 4KB
uart.c 4KB
uart.c 4KB
uart.c 3KB
uart.c 3KB
uart.c 3KB
uart.c 3KB
uart.c 3KB
plic.c 2KB
plic.c 2KB
plic.c 2KB
plic.c 2KB
plic.c 2KB
plic.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
printf.c 2KB
timer.c 2KB
timer.c 2KB
trap.c 2KB
trap.c 2KB
trap.c 2KB
trap.c 2KB
sched.c 1KB
sched.c 1KB
sched.c 1KB
sched.c 1KB
sched.c 1KB
trap.c 1KB
sched.c 1KB
sched.c 1KB
sched.c 1KB
trap.c 1KB
user.c 1KB
trap.c 1KB
user.c 860B
timer.c 806B
timer.c 763B
timer.c 763B
sched.c 752B
user.c 747B
kernel.c 620B
kernel.c 620B
kernel.c 620B
kernel.c 620B
kernel.c 620B
kernel.c 574B
kernel.c 530B
user.c 510B
kernel.c 486B
syscall.c 486B
user.c 480B
user.c 461B
user.c 461B
user.c 461B
kernel.c 446B
kernel.c 322B
test.c 236B
test.c 221B
test.c 219B
kernel.c 165B
lock.c 161B
lock.c 161B
lock.c 161B
test.c 96B
kernel.c 58B
gdbinit 161B
gdbinit 159B
gdbinit 146B
gdbinit 118B
gdbinit 104B
gdbinit 61B
.gitignore 17B
platform.h 3KB
platform.h 3KB
platform.h 3KB
platform.h 3KB
platform.h 3KB
platform.h 2KB
riscv.h 2KB
共 282 条
- 1
- 2
- 3
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功