With only 2.4K 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 Markdown documents, total LOC=2381
> cloc egos-riscv --exclude-ext=md
53 text files.
53 unique files.
8 files ignored.
github.com/AlDanial/cloc v 1.82 T=0.03 s (1785.7 files/s, 133126.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C 29 486 401 1855
C/C++ Header 15 100 107 406
Assembly 2 4 14 67
make 1 11 0 53
-------------------------------------------------------------------------------
SUM: 47 601 522 2381
-------------------------------------------------------------------------------
- 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.