How gooberheads6297/gooberosx86 works
Project Type and Purpose
• This is a hobby‐grade x86 operating system (“GooberOSx86”) consisting of:
• A bootloader stage (GRUB configuration + minimal assembly stubs)
• A monolithic kernel written in C/assembly
• Built-in drivers (keyboard, timer, VGA video)
• A simple filesystem layer
• An interactive shell
File Structure Analysis
Top-Level
├── boot.s, gdt.s, idt_load.s, isr32_stub.s, irq0/1_wrapper.s
├── kernel.c / kernel.h
├── shell/ (shell.c, shell.h)
├── drivers/ (io, keyboard, timer, video)
├── fs/ (filesystem.c, filesystem.h)
├── grub/ & iso/boot/grub (grub.cfg)
├── linker.ld, build scripts, build output
Key Patterns
• Assembly modules handle early CPU setup: GDT, IDT, ISRs, IRQs
• C modules grouped by functionality: core kernel, drivers, filesystem, shell
• GRUB is used as the bootloader front-end
• A single binary (kernel.bin) loaded by GRUB
README Insights
• Monolithic design, with a kernel binary directly containing drivers and shell
• No mention of user-space vs kernel-space separation beyond shell
• Targeting legacy BIOS/MBR boot
Components
a. External/Hardware
• PC BIOS / Firmware
• Physical hardware buses: VGA, Keyboard, PIT (timer), Disk
b. Bootloader Stage
• GRUB (grub.cfg)
• Assembly stubs (boot.s → load kernel.bin)
c. Kernel Initialization
• Assembly Modules: gdt.s, idt_load.s, isr32_stub.s, irq_wrapper.s
• C entrypoint in kernel.c
d. Kernel Core Subsystems
• Descriptor & Interrupt Management
• Memory layout (via linker.ld)
e. Drivers Layer
• IO helpers
• Keyboard driver
• VGA (video) driver
• Timer driver
f. Filesystem Subsystem (fs/filesystem.c)
g. Shell Application (shell/shell.c)
Relationships & Data Flows
• BIOS → GRUB → loads kernel.bin into memory
• Bootloader → invokes kernel’s entrypoint
• Kernel init sequence:
1. Setup GDT/IDT
2. Register ISRs / IRQ handlers
3. Initialize drivers
4. Mount/init filesystem
5. Spawn shell
• Shell ↔ Filesystem for I/O
• Kernel ↔ Drivers ↔ Hardware for device interactions
• Interrupts flow hardware→IRQ handler→kernel ISR
Architectural Patterns & Design Principles
• Monolithic kernel (all components linked into one binary)
• Layered initialization: bootloader → CPU setup → drivers → higher-level services → shell
• Clear separation of concerns by directory (assembly vs C, drivers vs core vs apps)