How carlosdaniel26/lizard-os works
Project Type and Purpose
• Lizard-OS is a monolithic, educational operating system kernel targeting the i686 (32-bit x86) architecture.
• It provides a learning platform for low-level systems concepts: bootloading (Multiboot2/GRUB), CPU/arch initialization, memory management (PMM/VMM), interrupt handling, basic drivers (framebuffer, keyboard, PIT, RTC, ramdisk), multitasking, a simple shell, and a tiny VFS (tar-based).
High-Level File‐Structure Analysis
• Top‐level artifacts:
• Makefile, scripts/install_dependencies.sh – build & bootstrap tooling
• iso/boot/grub – GRUB Multiboot2 config for ISO image
• multiboot2.h, linker/linker.ld – multiboot header & memory layout
• / & src/ split into:
• kernel/arch – GDT, IDT, stack protector
• kernel/cpu – CPUID, PIC, ISRs
• kernel/mem – kmalloc, PMM, VMM
• kernel/drivers – VGA framebuffer, keyboard, PIT, RTC, ramdisk, tar, VFS
• kernel/multitasking – task structs, context switch (ASM)
• kernel/shit-shell & terminal – simple shell & VGA TTY
• libs – basic linked list, queue, stdio, string
Key README Insights
• Emphasis on educational value, hands-on exploration of OS internals
Diagramming Strategy
1. Bootloader Layer
• BIOS/UEFI (firmware) → GRUB (multiboot2) → boot.asm
2. Kernel Entry & Initialization
• multiboot parsing, early C runtime, init.c/kernel.c
3. Architecture & CPU Subsystems
• GDT/IDT setup (arch/i686), PIC, ISR handlers, CPU feature detection
4. Memory Management
• Physical Memory Manager (PMM)
• Virtual Memory Manager (VMM) / paging
• Kernel heap allocator (kmalloc)
5. Device Drivers & I/O
• Framebuffer/VGA driver
• Keyboard driver
• PIT timer driver
• RTC driver
• Ramdisk + TAR VFS
6. Multitasking & Scheduling
• Task structs, PID management
• Context switch assembly stubs
7. User Interface Layer
• Terminal/TTY abstraction
• “shit-shell” command interpreter
8. Utility Libraries
• linked_list, queue, stdio, string (C helpers)
9. Build & Deployment
• Linker script, Makefile, scripts, ISO & GRUB config
• BIOS → GRUB → Kernel Entry
• Kernel Entry → arch init → CPU subsystems → memory manager → driver init → scheduler → shell
• Driver modules ↔ hardware I/O ports & interrupts
• Shell ↔ terminal ↔ framebuffer & keyboard driver
• VFS layer ↔ ramdisk driver
• Multitasking scheduler ↔ CPU interrupt subsystem (timer IRQ)
c. Architectural Patterns & Principles
• Monolithic, but clearly layered: hardware abstraction (drivers), core services (mem, CPU), user interface (shell)
• Modular C code with each subsystem in its own directory
• Separation between architecture-specific (i686) and generic kernel code
d. Technologies & Languages
• Assembly (boot.asm, context switch stubs)
• C (kernel & libs)
• GRUB Multiboot2 protocol
• GNU Make, sh scripts
• ISO9660 + GRUB config