Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
/ Litchi Public archive

⚙️ Bugen's toy OS kernel for x86 systems implemented in modern C++. [WIP]

Notifications You must be signed in to change notification settings

BugenZhao/Litchi

Repository files navigation

Notes

Please check litchi-rs, the continuation of this project in ~100% Rust!

Litchi Build

Bugen's toy kernel for x86 systems implemented in modern C++.

litchi

Get Started

Install Toolchains

Litchi is compiled to i386-elf target, which may require a cross-compiler. For macOS user, some Homebrew formulae and bottles are provided (see BugenZhao/homebrew-litchi).

Make sure you have Homebrew installed, then simply run:

$ brew tap bugenzhao/litchi
$ brew install i386-litchi-elf-binutils \
               i386-litchi-elf-gcc      \
               i386-litchi-elf-gdb      \
               litchi-qemu

Build & Run

Litchi is built by CMake, which is fairly easy to build and run:

$ git clone https://github.com/BugenZhao/Litchi.git && cd Litchi
$ mkdir build && cd build && cmake .. && make qemu

Progress

  • Adopt bootloader from JOS / xv6
  • Bootloader support for floppy drive
  • Port old Litchi codes
  • CMake build support
  • Kernel level standard output
  • Color output in console
  • Serial port color output
  • Serial port input
  • Kernel panic and warning
  • Programmed keyboard input support
  • Kernel level standard input
  • Input with format
    • stringToLong
    • scanFmt
  • Basic debugging information
  • Basic kernel commands
    • help
    • echo
    • vm-*
      • map
      • dump
    • ...
  • Physical memory detection
  • Physical memory management
  • Virtual memory
  • Kernel address space
  • Kernel heap management
  • User level task
  • Interrupt / Rrap
  • System call

  • Test for standard library
  • Interrupt based keyboard input
  • Shell
  • Multitasking
  • Multi-core support
  • Port to x86-64
  • ...

Reference

  1. JOS / xv6
  2. Stack Overflow
  3. Hurlex
  4. Orange'S: 一个操作系统的实现
  5. OSDev.org

About

⚙️ Bugen's toy OS kernel for x86 systems implemented in modern C++. [WIP]

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published