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 2K lines of code, egos-2K implements microSD driver, tty driver, interrupt handling, address translation, process scheduling and messaging, system call, file system, shell, seven user commands and mkfs/mkrom tools.

This is an image

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-riscv --exclude-ext=md  
      52 text files.
      52 unique files.
       7 files ignored.

github.com/AlDanial/cloc v 1.82  T=0.02 s (1842.8 files/s, 123267.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               31            435            437           1560
C/C++ Header                    12             76            102            322
Assembly                         2              4             14             61
make                             1             11              0             55
-------------------------------------------------------------------------------
SUM:                            46            526            553           1998
-------------------------------------------------------------------------------

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%