How ragingo/ragingos works
Main Components
• Boot Loader Component:
• Directory: src/RagingosLoaderPkg
• Role: Manages initial boot tasks and transfers control to the OS kernel.
• Kernel Component:
• Directory: src/kernel
• Role: Contains core OS functions such as task management, memory management, interrupt handling, device drivers (e.g., for USB, ACPI, PCI), file systems (FAT), graphical and console UI, and system calls.
• Applications Component:
• Directory: src/apps
• Role: Includes a variety of example/userland applications (such as cp, cube, mandel, paint, etc.) which use the services provided by the kernel.
• Libraries and Utilities:
• Directory: lib and tools
• Role: Auxiliary libraries (e.g., stb_image in apps/lib) and inspection/build tools (like elf_checker in tools, makefont.py) that support development or runtime features.
• Build and Scripts Component:
• Directory: scripts, setup
• Role: Contains shell scripts to build various parts (kernel, EDK2, libcxx, edk2_loader) and environment setup configuration for multiple platforms (Windows, WSL2, etc.).
• Resources:
• Directory: res
• Role: Holds fonts, images, and text files that might be used by the kernel or applications.
Out the Relationships and Interactions
• The Boot Loader initializes execution; it loads and transfers control to the Kernel.
• The Kernel comprises multiple submodules:
• Drivers: USB, ACPI, PCI, keyboard, mouse, etc.
• System Services: Memory manager, task scheduler, paging, logging, system call handler.
• UI Layer: Includes both text-based console and graphical components.
• User-space applications (within src/apps) interact with the Kernel via system calls. They serve various functionalities (file handling, arithmetic processing, graphics, and so on).
• Build scripts automate and coordinate the compilation and linking of the loader, kernel, and applications.
• Tools and libraries assist with utility tasks (e.g., ELF checking, image handling) that support both development and runtime operations.
Architectural Patterns and Design Principles
• Modularity: The clear separation into loader, kernel, and apps indicates modular layering.
• Layered Architecture: Boot loader at the very bottom, kernel core in the middle, and user applications on top.
• Driver Abstraction: The drivers for various peripherals (USB, ACPI, etc.) are organized into dedicated directories, reflecting a separation of concerns.
• Build & Deployment Automation: The scripts and setup directories reflect an emphasis on automated testing, build, and deployment.
• Use of Standard Tools: The integration of pre-commit, clang-format, and Makefiles indicates adherence to coding and quality standards.