Skip to content
B-AJ-AmarPublic

About

A hobby x86 operating system written from scratch in C and x86 Assembly with a custom BIOS bootloader, focusing on low-level systems programming.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Kernel

An educational x86 operating system written from scratch in C and x86 Assembly.

The goal of this project is to understand how operating systems work by implementing every major component manually, starting from the boot and gradually building toward a complete kernel. Rather than relying on existing bootloaders or operating system frameworks, this project uses a custom bootloader and focuses on learning the low-level details of computer architecture.



Build

Requirements

  • Make
  • QEMU
  • Docker
  • GDB (i prefer pwndbg) for debuging

Build

make build

Run

make run

Or build and run in one command:

make rb

Debug

make debug

make gdb

Project Status

The project is being developed incrementally. Each subsystem is implemented from the ground up and integrated into the kernel as the project progresses.

Completed

  • Custom bootloader

  • Protected mode initialization

  • GDT

  • Interrupt handling

  • IDT

  • PIC

  • VGA driver

  • PS/2 keyboard driver

  • Console

  • TTY

  • Timer driver

  • Sleep functionality

  • Common kernel libraries

    • stdio
    • printf and related output functions
    • string
    • memcpy, memset, memcmp, and related functions
  • Physical memory management (PMM)

  • Virtual memory management (VMM)

  • Kernel heap

Scheduling

  • Implement the kernel scheduler
  • Implement task/thread management
  • Implement context switching
  • Support multiple kernel threads
  • Integrate scheduling with the timer

Shell & Terminal

  • Implement the shell
  • Implement command parsing and execution
  • Support multiple terminals
  • Support multiple independent shell sessions

Filesystem

  • Design the filesystem interface
  • Implement a filesystem
  • Implement file and directory operations
  • Implement a file manager

TODO

Userspace

  • Define the kernel/userspace boundary
  • Implement userspace processes
  • Implement system calls
  • Implement userspace memory management
  • Run programs in userspace
  • Implement basic userspace utilities

Future Kernel Components

  • Process management
  • IPC
  • Synchronization primitives
  • More hardware drivers
  • Networking
  • Security and permissions

About

A hobby x86 operating system written from scratch in C and x86 Assembly with a custom BIOS bootloader, focusing on low-level systems programming.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages