The mini os with RISC-V.
The program can run in Linux and MacOS.
Make sure the device is already installed riscv library and qemu. To get riscv library, please follow the guideline of riscv-gnu-toolchain.
Add the appropriate directory to $PATH is required, You will need to update your shell's rc file (e.g. ~/.bashrc) :
# Using Linux:
$ vim ~/.bashrc
$ export PATH=$PATH:/opt/riscv/bin
# Using MacOS:
$ PATH=$PATH:/usr/local/opt/riscv-gnu-toolchain/bin
To install qemu, please using the instruction below:
# Using Ubuntu:
$ sudo apt-get install
# Using Fedora:
$ sudo dnf install qemu
# Using MacOS (with homebrew):
$ brew install qemu
Inspired by the cources hold by Jserv, the professor from CSIE of NCKU. I decide to write the simple OS that can implement some OS operations.
The functions which GofOS have :
-
gets() : Get the input from Qemu's UART
-
puts() : Set the output to Qemu's UART
-
printf() : Using printf() functions to print string
-
malloc() : Using malloc() to do dynamic memory allocation
-
multitasking :
- context-switch : Switch different task to operate
- timer : Using timer to calculate the time
- trap-handler : Using trap-handler to do preemptive
-
Locking
-
PLIC
GofOS provide GDB for debug:
make debug
https://ithelp.ithome.com.tw/users/20110850/ironman/3859
https://github.com/cccriscv/mini-riscv-os
https://github.com/mit-pdos/xv6-riscv