How guille-ux/munix works
Project type and purpose
• From the file tree, this is a small operating-system project (“MunixOs”) that uses GRUB as a multiboot bootloader and contains a custom kernel written in C and assembly.
• It includes:
• a /boot/grub folder with grub.cfg
• /kernel sources, headers, linker scripts
• utilities like PASM interpreter sources under include/PASM
• VRAM helper library under include/VRAM
• compile.sh produces an ISO image (munix.iso)
File structure
• Top level:
• MunixOs/boot → GRUB config and multiboot setup
• MunixOs/kernel → kernel.c, multiboot.asm, ELF and object files, linker.ld
• MunixOs/kernel/include → hardware abstractions (memory, I/O, disk, display, keyboard, timer, multitask), plus embedded tools (PASM, VRAM)
• compile.sh, linker.ld (root), munix.iso
• Architectural hints:
• Multiboot standard (multiboot.asm → kernel entry)
• Hardware abstraction layer (HAL) in include/*.h
• Monolithic kernel with built-in utilities (PASM interpreter, shell, VRAM libs)
• No separate userland binaries—everything is linked into kernel.
Readme insights
• (Empty) so rely on code structure:
• The kernel implements drivers for screen, keyboard, disk, speaker.
• It exposes a shell (shell.h) and an interpreter for a tiny assembly (PASM).
Main components and interactions
a. Bootloader (GRUB)
• Reads grub.cfg
• Loads multiboot header from multiboot.asm
• Jumps to kernel
b. Kernel entry & initialization
• multiboot.asm → sets up protected mode → calls kernel.c:init()
c. Hardware Abstraction Layer
• memory management (memory.h)
• low-level I/O (ports.h, io.h)
• disk access (disk.h, fs.h)
• timer & interrupts (timer.h)
• keyboard input (keyboard.h)
• speaker/beeper (speaker.h)
d. Drivers & subsystems
• Filesystem (fs.h)
• Multitasking (multitask.h)
e. Shell & tools
• Built-in shell (shell.h)
• PASM interpreter (ansi-interpreter.h, pasm.h)
f. Output
• Kernel handles console I/O, user commands, and runs PASM code, renders via VRAM.
[GRUB Bootloader] → [Multiboot Stub (multiboot.asm)] → [Kernel Core]
• HAL modules
• Device Drivers
• Subsystems (FS, Multitask)
• User-level shell & PASM
[ISO Image / compile.sh] sits outside as build artifact.
• Patterns: monolithic kernel, layered HAL.
• Technologies: C, x86 Assembly, GRUB2 (Multiboot), custom linker scripts (linker.ld).
@startuml
skinparam rectangle {
• BackgroundColor<<Boot>> LightBlue
• BackgroundColor<<Kernel>> LightGreen
• BackgroundColor<<Tool>> LightYellow
}
rectangle "GRUB2 Bootloader" <<Boot>>
rectangle "Multiboot Stub\n(multiboot.asm)" <<Boot>>
rectangle "Kernel Core" <<Kernel>> {
• rectangle "HAL\n(memory, IO, timer)"
• rectangle "Drivers\n(disk, keyboard, speaker)"
• rectangle "Subsystems\n(filesystem, multitask)"
• rectangle "VRAM Library\n(include/VRAM)"
• rectangle "PASM Interpreter\n(include/PASM)"
• rectangle "Shell\n(shell.h)"
}
rectangle "munix.iso / compile.sh" <<Tool>>
GRUB2 Bootloader --> Multiboot Stub : loads
Multiboot Stub --> Kernel Core : jumps to
Kernel Core --> Drivers : init
Kernel Core --> Subsystems : setup
Subsystems --> Shell : ready
Shell --> PASM Interpreter : exec
Kernel Core --> VRAM Library : render
compile.sh --> munix.iso : builds
@enduml
Further analysis
• Review the linker script (kernel/linker.ld) to see memory layout blocks; include them as sub-blocks inside “HAL”.