With only 2K lines of code, egos-2000 implements boot loader, microSD driver, tty driver, memory paging, address translation, interrupt handling, process scheduling and messaging, system call, file system, shell, 7 user commands and the mkfs/mkrom
tools.
The earth and grass operating system (EGOS) is our teaching OS at Cornell. It has three layers:
- The earth layer implements hardware-specific abstractions.
- tty and disk device interfaces
- cpu interrupt and memory management interfaces
- The grass layer implements 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 help students understand the complete picture.
# Count lines of code excluding README.md and USAGES.md
> cloc egos-2000 --exclude-ext=md
53 text files.
53 unique files.
7 files ignored.
github.com/AlDanial/cloc v 1.82 T=0.03 s (1835.3 files/s, 121949.2 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C 32 447 452 1560
C/C++ Header 11 77 104 317
Assembly 3 8 29 68
make 1 12 0 55
-------------------------------------------------------------------------------
SUM: 47 544 585 2000
-------------------------------------------------------------------------------
- an Artix-7 35T Arty FPGA development board
- a microUSB cable (e.g., microUSB-to-USB or microUSB-to-USB-C)
- [optional] a microSD Pmod, a microSD reader and a microSD card (e.g., Sandisk, Samsung or PNY)
- SiFive freedom riscv-gcc compiler
- Vivado lab solutions or any edition with the hardware manager
- a software to connect with ttyUSB (e.g., screen for Linux/Mac or PuTTY for Windows)
- [optional] a software to program a disk image file to the microSD card (e.g., balena Etcher)
For compiling and running egos-2000, please read USAGES.md. The documentation further introduces the teaching plans, architecture and development history of egos-2000.
For any questions, please contact Yunhao Zhang or Robbert van Renesse.