Skip to content

SirOrangePeel/OrangeOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OrangeOS

A hobby operating system built from scratch.

About

MyOS is a bare-metal operating system written in C++/Assembly. This project is a work in progress — currently in the earliest stages of development.

Current Features

  • Bootloader — the OS successfully boots on [real hardware / QEMU / Bochs]
  • Prints Hello World! to the screen
  • Basic interrupt handling — a test software interrupt is fired from KernelMain()

Getting Started

Prerequisites

  • GCC, NASM
  • Virtual Box
  • Make

Building

git clone https://github.com/SirOrangePeel/OrangeOS.git
cd OrangeOS
make

Running

make run
# or manually:
qemu-system-i386 -kernel myos.bin

Project Structure

OrangeOS/
├── includes/
│   ├── gdt.h           # Global Descriptor Table declarations
│   ├── interrupts.h    # Interrupt handling declarations
|   ├── keyboard.h      # Keyboard function definitions
│   ├── port.h          # Port I/O declarations
│   └── types.h         # Common type definitions
├── src/
│   ├── bootloader/
│   │   └── loader.s    # Assembly bootloader entry point
│   ├── cpu/
│   │   ├── gdt.cpp         # Global Descriptor Table implementation
│   │   ├── interrupts.cpp  # Interrupt handling implementation
│   │   ├── interruptstubs.s # Low-level interrupt stubs in assembly
│   │   └── port.cpp        # Port I/O implementation
|   ├── drivers/
|   |   └── keyboardDriver.cpp # Keyboard Driver implementation
│   └── kernel/
│       └── kernel.cpp  # Kernel entry point
├── .gitignore
├── LICENSE
├── linker.ld           # Linker script
├── Makefile
├── README.md
└── toggle_kvm_for_vbox.sh  # Helper script to toggle KVM for VirtualBox

Roadmap

Phase 1 — CPU & Low-Level Foundations

  • Hello World Kernel
  • Memory Segments & Global Descriptor Table (GDT)
  • Hardware Communication & Ports
  • Interrupts & IRQ handling (IDT, PIC remapping)

Phase 2 — Basic Hardware Drivers

  • Keyboard driver
  • Mouse driver
  • Driver abstractions
  • PCI (Peripheral Component Interconnect)
  • Base Address Registers (BARs)

Phase 3 — Graphics & GUI

  • Graphics Mode (VGA)
  • GUI Framework basics
  • Desktop & Windows

Phase 4 — Memory Management

  • Dynamic Memory Management / Heap
  • Physical memory manager & paging
  • Kernel panic handler & stack traces

Phase 5 — Multitasking & Userspace

  • Multitasking
  • System calls & POSIX compliance
  • ELF binary loader
  • Privilege separation (Ring 3)
  • Minimal shell / terminal

Phase 6 — Storage & Filesystem

  • Hard Drives (ATA/IDE)
  • Virtual filesystem (VFS) abstraction layer
  • FAT32 or ext2 filesystem

Phase 7 — Networking

  • Networking basics (AMD PCNet driver)
  • Ethernet & ARP
  • IPv4, UDP, TCP
  • DHCP & DNS support

Phase 8 — Polish & Beyond

  • Sound driver (SoundBlaster / AC97)
  • USB support
  • Minimal userspace C library

Resources & Inspiration

License

MIT