gitmyhub

RedPandaOS

C ★ 23 updated 1mo ago

A hobby OS built entirely from scratch -- own bootloader, own freestanding C kernel, own RPFS filesystem, and own graphical desktop (windows, start menu, icons, trash, text editor). Every pixel drawn by code selfwrote. i686 / NASM + Clang / QEMU.

A hobby operating system built entirely from scratch, from the boot sector to a graphical desktop, running on 32-bit x86.

CAssemblyQEMUNASMsetup: hardcomplexity 5/5

RedPandaOS is a hobby operating system built entirely by its creator without using any existing operating system code, standard libraries, or pre-built frameworks. It runs on a simulated computer via QEMU and targets the older 32-bit x86 architecture. The project started from the very first instruction the computer executes at boot and grew from there.

The system includes a custom bootloader written in assembly language that fits in a single 512-byte sector, which the computer's firmware loads automatically. That bootloader reads the kernel from disk and hands over control. The kernel then sets up memory management, handles hardware interrupts, drives a PS/2 keyboard and mouse, and talks to the display via a framebuffer that lets it draw individual pixels.

On top of that kernel sits a full graphical desktop: a taskbar with a start menu and a live clock, draggable windows with rounded corners and drop shadows, desktop icons, and a trash bin. Files written to a custom filesystem called RPFS persist on disk between reboots. The filesystem uses an ATA disk driver the author also wrote from scratch and stores data in a block-chain format similar in concept to older systems like FAT.

The most recent version (v11) adds a working text editor that supports typing, cursor movement, scrolling, saving with Ctrl+S, and undo/redo with Ctrl+Z and Ctrl+Y. Every utility function used by the kernel, including memory copy, formatted text output, and the font renderer, was also written by hand rather than borrowed from a library.

This project is primarily educational and creative: a single-person effort to understand how an operating system really works by building every piece independently. The build process requires NASM (an assembler), LLVM/Clang (to cross-compile C code for bare-metal i686), and QEMU to run the disk image. A single PowerShell script handles the full build. Future milestones on the roadmap include userspace programs running in a separate privilege mode and loading applications from disk. It is released under the MIT license.

Where it fits