A bare-metal x86 operating system written in C with a VGA text-mode GUI that boots and displays a welcome screen.
i686-elf-gccandi686-elf-ld(32-bit ELF cross-compiler)nasm2.14 or highergrub-mkrescuewithxorrisoandmtools(for ISO creation)qemu-system-i386(to run it)
Quick install on Ubuntu/Debian:
sudo apt install nasm grub-pc-bin grub-common xorriso mtools qemu-system-x86For the cross-compiler, follow the OSDev wiki guide at https://wiki.osdev.org/GCC_Cross-Compiler or grab a pre-built tarball from https://github.com/lordmilko/i686-elf-tools.
# 1. clone or download this project, then cd into it
# 2. build the kernel binary
make
# 3. create a bootable ISO
make iso
# 4. run in QEMU with a graphical window
make run-gui| Target | Description |
|---|---|
make |
Compile and link choomOS.bin |
make iso |
Package the binary into a bootable choomOS.iso |
make run-gui |
Boot the ISO in QEMU with a graphical display |
make run |
Boot the ISO in QEMU using curses (terminal display) |
make clean |
Remove all build artefacts |
boot/boot.asm Multiboot 1 entry point, stack setup, calls kernel_main
kernel/kernel.c kernel_main; initialises VGA, launches GUI, then idles
kernel/vga.h VGA driver interface and colour definitions
kernel/vga.c VGA driver; direct writes to 0xB8000, port I/O for cursor
kernel/gui.h GUI subsystem interface
kernel/gui.c Desktop, menu bar, taskbar, window chrome, welcome screen
linker.ld Places the kernel at 1 MB as required by Multiboot
Makefile
iso/boot/grub/grub.cfg GRUB 2 boot menu entry
README.md
BIOS
GRUB (Multiboot 1 loader)
boot.asm sets up 32-bit protected mode stack, calls kernel_main
kernel_main
vga_init hides cursor, clears the framebuffer
gui_init draws desktop, window chrome, and welcome screen
hlt loop CPU idles, waiting for interrupts that never come
The kernel runs in 32-bit protected mode. No BIOS calls are made after the bootloader hands off control; VGA output goes directly to the memory-mapped framebuffer at 0xB8000 and cursor control goes through the CRTC port pair at 0x3D4/0x3D5.
The build uses a freestanding GCC target (i686-elf-gcc) so no standard library is linked. Only the GCC-provided freestanding headers (stdint.h, stddef.h) are used.
QEMU is the recommended way to run choomOS. It also boots fine on real hardware or in VirtualBox if you write the ISO to a USB drive with dd.