Skip to content

Luma-3/Kernel-From-Scratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

89 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kernel-From-Scratch πŸ’»

An operating system kernel built from the ground up to understand the inner workings of x86 architecture, systems, and hardware communication.

πŸ“Œ Project Structure

This project is divided into 10 sections by 42 school. The current goal is to complete sections 1 to 4 with @SenseiTarzan.

  • Status: Part 1 is now Completed! πŸŽ‰

πŸ› οΈ Features (Part 1)

  • Multiboot Compliance
  • VBE Driver with:
    • Pixel color drawing
    • Bitmap drawing
    • Glyph drawing
  • Keyboard Polling System (PS/2)
  • Basic Terminal with:
    • Auto-scrolling
    • 3-window context switching
    • Special event handling (Shift, Alt, Ctrl)

πŸš€ Roadmap & Planned Features

πŸ“… Part 2

  • Recreate the GDT from Multiboot
  • Implement a minimalist shell
    • Basic commands (echo, test, status)
    • Utility commands (halt, reboot)

πŸ“… Part 3 (To be refined)

  • Complete memory code structure with paging handling
  • Read and Write memory permissions
  • User space and Kernel space memory separation
  • Physical and Virtual memory management
  • Physical memory helpers (kmalloc, kfree, ksize, kbrk)
  • Virtual memory helpers (vmalloc, vfree, vsize, vbrk)
  • Kernel Panic handling

πŸ“… Part 4

  • Create, fill, and register an Interrupt Descriptor Table (IDT)
  • Signal-callback system on the Kernel API
  • Signal scheduling interface
  • Clean registers interface before a panic / halt
  • Stack saving interface before a panic
  • Upgrade Keyboard Polling to the IDT system

πŸƒ How to Run

Prerequisites

Requires qemu and make. All other necessary cross-compilation tools are built directly via our toolchain script.

Installation & Execution

This project includes a shell script to build the toolchain. Run it once before building the kernel:

# Build the cross-compilation toolchain (This might take a while, you have time to go make a coffee β˜•)
./tools/build_toolchain.sh

# Compile and launch the kernel in QEMU
make run

About

🐧 Diving into the depths of operating systems by building a monolithic x86 kernel from the ground up.

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Contributors