Skip to content

A minimal operating system (2K LOC) on QEMU and a RISC-V board

License

Notifications You must be signed in to change notification settings

P-Gu/egos-2000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A minimal operating system on a real RISC-V board

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.

This is an image

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

Hardware requirements

Software requirements

Usages and documentation

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.

About

A minimal operating system (2K LOC) on QEMU and a RISC-V board

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.6%
  • Makefile 3.1%
  • Assembly 2.2%
  • GDB 0.1%