Skip to content
franckwajsburtPublic

About

Small Operating System for Educational Purpose

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

242 Commits

Folders and files

Repository files navigation

KO6 Logo ko6

 Small Operating System for Educational Purpose
  _     ___    __
 | |__ /'v'\  / /      \date        2025-02-11
 | / /(     )/ _ \     \copyright   2021-2025 Sorbonne University
 |_\_\ x___x \___/                  https://opensource.org/licenses/MIT

License

  • ko6 is licensed under the MIT License.
  • Some third-party components, such as external/libfdt/, are licensed under the BSD-2-Clause License.
  • See the LICENSE and LICENSE.BSD files for full details.
  • If you use ko6, let me know! I'll be happy to hear about it and help if I can.

Project Authors

See the full list of contributors in CONTRIBUTORS.md.

Presentation

ko6 (pronounce it "kit-o-sys" o is the letter not the number) is a small operating system for educational purpose.

Configuration

If you put ko6 in your home directory, you must source the SourceMe.sh file to set the environment. You can add source $HOME/ko6/SourceMe.sh in the $HOME/.bashrc. Once, the environment is set, in order to check if it works, run : cd $HOME/ko6; make hello, you must see two xterm windows appear. On the big one (xterm0), you must see, the logo and a system dump (internal registers and scheduler). On the small one, you must see « Hello World! ».

The source files are all 100 characters long because of the many comments on the lines. Therefore, 100-character wide windows must be used for editing. The C code uses the Kernighan and Ritchie style.

KO6 Project Structure

src/hard

Plateform definitions

src/soft

Code of Operating System and Applications

  • common/
    Shared files between applications and the kernel.

  • hal/
    Hardware Abstraction Layer (HAL) API declarations and implementations for each hardware.

    • cpu/

      • mips/: Implementation for MIPS.
      • riscv/: Implementation for RISC-V.
    • devices/
      API for different types of devices.
      Some device types are missing, particularly block devices.
      Each device type may have multiple implementations located in subdirectories.

      • chardev/: Character devices.
      • dma/: Direct Memory Access.
      • icu/ (could be renamed to irq): Interrupt Controller Unit.
      • timer/: Timer management.
    • soc/
      A SoC consists of a CPU and various devices.
      The API here is limited to initialization, which takes the device tree as an argument.
      The initialization function is implemented differently for each SoC, calling CPU and device initialization functions.

      • almo1-mips/: SoC implementation for ALMO1-MIPS.
      • qemu-virt-riscv/: SoC implementation for QEMU-Virt-RISC-V.
  • kernel/
    Kernel service code, independent of hardware resources.
    The number of files is intentionally minimized, with one C file per subsystem.

  • fs/
    Code related to real file systems.
    Includes both the implementation of Virtual File System (VFS) functions inside the kernel and tools for constructing the disk.

    • kfs/: Implementation of the KFS real file system.
  • external/
    Third-party code.

    • libfdt/: Flat Device Tree (FDT) library.
  • ulib/
    User-space libraries.

  • uapp/
    User applications.

    • barrier/
    • hello/
    • test/

About

Small Operating System for Educational Purpose

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages