Wang Chen 100cc9f1d9 This commitment contains following changes:
- updated openday report
- fixed I41BDM
- I3ZLLK, code part & errata part fixing
- fixed I3XWKC, ppt & errata part
- fixed I418VG
2021-07-22 17:10:04 +08:00
2021-04-01 20:02:31 +08:00
2021-04-01 20:02:31 +08:00
2021-04-15 14:47:40 +08:00
2021-04-01 20:02:31 +08:00
2021-04-01 20:02:31 +08:00

Step by step, learn to develop an operating system on RISC-V

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 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.

Operating environment

All demo codes have been verified under the following equipment environment:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal
$ uname -r
5.8.0-45-generic

There may be dependent libraries that need to be installed manually. If you are prompted that other libraries and dependencies are missing during the operation, please install them by yourself according to the prompts.

$ sudo apt update
$ sudo apt install build-essential git gitk vim libfdt-dev libsdl2-dev

The experiment requires some running tools, pre-compiled binary files have been provided, the specific installation steps are described as follows:

First, create a working directory, and then enter the directory.

$ mkdir $HOME/ws
$ cd $HOME/ws

Download the development tool package tools.tar.gz, the download address are:

or

After downloading, copy the file to $HOME/ws and unzip it.

$ tar xzf tools.tar.gz

Add the following path to $HOME/.bashrc

export PATH="$PATH:$HOME/ws/tools/gcc/bin:$HOME/ws/tools/qemu/bin"

Re-import $HOME/.bashrc or restart the system to make the configuration effective.

Construction and usage

  • makeCompile and build
  • make runStart qemu and run
  • make debugStart debugging
  • make codeDisassemble to view binary code
  • make cleancleanup

For specific use, please refer to the Makefile under the specific sub-project.

References

The design of this course refers to the following network resources, thank you :)

Description
《从头写一个RISC-V OS》课程配套的资源
Readme BSD-2-Clause 43 MiB
Languages
C 72.7%
Assembly 24.8%
Makefile 2.5%