How nmc-techclub/sage-os works
Project type and purpose
• This is a bare-metal, self-evolving operating system (SAGE OS) for Raspberry Pi and other architectures.
• It combines kernel engineering, embedded systems, and AI/ML to detect hardware, compile platform-specific kernels/drivers, build images, boot, monitor, and evolve itself.
File structure
• Top-level directories:
• boot/ – Architecture-specific assembly bootloader
• kernel/ – Core kernel modules (memory, processes) in C
• drivers/ – Low-level hardware drivers (UART, etc.)
• sage-sdk/ – SDK for module development (includes C headers, Python examples, static libs, tools)
• scripts/ – Build and QEMU test scripts
• tests/ – Unit, integration, AI-behavior, security, update rollbacks
• docs/, README – Vision, architecture, build/run instructions, theoretical foundations
• Configuration and build:
• Makefile, linker.ld, CMakeLists in sage-sdk
• Python scripts for license checking and AI prototyping
Key insights from README
• Workflow:
1. AI detects architecture/hardware
2. Generates kernel+drivers
3. Builds bootable image (.img/.iso/container)
4. Boots on real hardware or QEMU
5. Continuous monitoring (uptime, latency, etc.)
6. If stable → promote; if unstable → rollback
• Tech stack: ARM assembly, C, Python, GCC cross-compilers, QEMU, TinyML (TFLM/uTensor)