Skip to content

Lightweight Unix-like kernel writen in C and ASM. It follows the KFS series of the 42 school.

License

Notifications You must be signed in to change notification settings

vvaucoul/KronOS

Repository files navigation

Kronos

KronOS is a lightweight Unix-like kernel writen in C and ASM.
This is the result of the KFS projects available at School 42.

The kernel is currently not finished.
Use it only for testing purposes.
It lacks many features but I try to improve it as I go along.

Kronos Workflow CodeFactor

Requirements

Otional tools

Setup

  • Clone Kernel Repository
git clone https://github.com/vvaucoul/KronOS && cd KronOS
  • Install dependencies
make install-dependencies
  • Compiling Kernel
make 
  • Start the Kernel with one of the following commands:
make run / make run-iso / make run-sdl / make run-curses / make run-debug

KFS - SERIES

  • KFS-1 : Grub / Boot and Screen
  • KFS-2 : GDT & Stack
  • KFS-3 : Memory
  • KFS-4 : Interrupts
  • KFS-5 : Processes -----------> waiting for validation
  • KFS-6 : Filesystem -----------> in progress
  • KFS-7 : Syscalls, Sockets & env
  • KFS-8 : Kernel Modules
  • KFS-9 : ELF Parser
  • KFS-X : Complete Unix System
Documentation

Features

  • Basic Kernel System
  • Boot via Grub 2 and Multiboot 1
  • Kernel Library with basics functions and types (cf. HEPHAISTOS)
  • PS/2 Keyboard Support
  • VGA text Driver
  • GDT implementation
  • Interrupts and IRQs support
  • A Complete Memory system
    • Paging
    • Physical and Virtual Memory
  • Multi-Tasking System
    • Round Robin
    • Threads
    • Concurrent access
      • Mutexes
      • Semaphores
  • Bios interactions
  • Some syscall done

GRUB 2 with Multiboot 1

Grub 2 Usage: OSDEV
Multiboot 1 Usage: GNU

Boot Sequence

graph TD;
    BIOS-->GRUB
    GRUB-->BOOT_LOADER
    
    BOOT_LOADER-->MAGIC_NUMBER
    BOOT_LOADER-->MULTIBOOT_HEADER
    
    MAGIC_NUMBER-->KERNEL
    MULTIBOOT_HEADER-->KERNEL
Loading


The KERNEL itself

When the kernel is launched, it will initialize each element and test them to validate the kernel launch correctly.
Otherwise, a pretty red death screen will appear or a simple kernel panic.

This one can be managed by the kerrno library created to detect kernel errors for each element.
RSOD and Kerrno / Kernel Panic both use C and ASM.

BSOD Like (Red Screen Of Death)


flowchart LR
   KERNEL --> Initialization --> Start --> ShellMode
   Initialization --> Error --> Panic & RSOD

Loading

Panic

Panic Examples:

🚧 ... Next redaction pending ...🚧

About

Lightweight Unix-like kernel writen in C and ASM. It follows the KFS series of the 42 school.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published