With only 2.2K lines of code, our teaching OS implements SD card driver, tty driver, interrupt handling, address translation, process scheduling and communication, system calls, file system, shell and 7 shell commands.
The earth and grass operating system (EGOS) is our teaching OS at Cornell. It has three layers:
- The earth layer provides hardware-specific abstractions.
- tty and disk device interfaces
- cpu interrupt and memory management interfaces
- The grass layer provides hardware-independent abstractions.
- processes and system calls
- inter-process communication
- The application layer provides file system, shell and shell commands.
This RISC-V version of EGOS is minimal in order to give students the complete picture of an operating system.
# Count lines of code excluding README.md and USAGES.md (LOC = 2210)
> cloc egos-riscv --exclude-ext=md
52 text files.
52 unique files.
7 files ignored.
github.com/AlDanial/cloc v 1.74 T=0.07 s (643.2 files/s, 46418.7 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C 30 457 424 1721
C/C++ Header 13 92 108 368
Assembly 2 4 14 67
make 1 11 0 54
-------------------------------------------------------------------------------
SUM: 46 564 546 2210
-------------------------------------------------------------------------------
- an Artix-7 35T Arty FPGA development board
- a microUSB cable (e.g., microUSB-to-USB or microUSB-to-USB-C)
- [optional] an SDHC microSD card, a microSD Pmod and a USB microSD reader
- SiFive freedom riscv-gcc compiler
- Vivado lab solutions or any edition with the hardware manager
- a software to connect with ttyUSB
- [optional] a tool to program a disk image file to the microSD card
- e.g., balena Etcher for all platforms
For compiling and running egos-riscv, please read USAGES.md. The documentation further introduces the teaching plans, architecture and development history of egos-riscv.
For any questions, please contact Yunhao Zhang or Robbert van Renesse.