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

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

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

 
 
 

Languages

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