How hatonthecat/solar-kernel works
Main components
• Hardware Layer:
– Microcontroller or similar low-power processing unit (e.g. an Ambiq Apollo MCU is suggested in the README).
– Solar power/energy harvesting subsystem (solar panel, power management circuitry, battery or capacitor storage).
– Peripherals such as a display (likely a low–power 2D screen), input devices (keyboard/touchpad), and any storage (e.g. microSD).
• Kernel Layer:
– The “SOLAR-Kernel” core (formerly “SOAP Kernel”), which is a minimal kernel designed for running a single application.
– Message passing and inter-process communication (IPC) mechanisms (paralleling ideas from microkernels like Minix 3).
– Device drivers and minimal loadable kernel modules (which can be “frozen” or only loaded when an application is active) that handle I/O and power management.
– A serial application scheduler which ensures only one user application is in execution at any moment to conserve resources.
• Application Layer:
– The loaded user application (or “application repository”) that runs when activated.
– Optional support for context switching (even if it means halting one application completely before launching the next).
Relationships and interactions
• Directional data flows: hardware inputs (sensors, user I/O) pass their data through drivers into the kernel.
• The kernel uses message passing to communicate with its device drivers and to coordinate application loading/execution.
• Applications interact with the kernel via system calls or a defined IPC mechanism.
• Power management/control loops (for instance, the kernel’s role in managing RTCs, low-power sleep modes, and load management relative to the available solar energy).
Design principles
• Minimalism by design: an “Occam’s razor” approach that strips the kernel (and its drivers) to only essential components.
• Low-memory, low-power footprint: only load what is necessary into RAM (for example, use “frozen”/decode in-place modules similar to ideas from Execute In Place (XiP) research).
• Serial operation: rather than executing many processes concurrently, the system focuses resources on running a single application at a time, with minimal context-switch overhead.
• Message-passing microkernel architecture: similar to the approach used in Minix 3, ensuring separation between kernel core and drivers/applications.
• Separate the architecture into as many components as makes sense, even if it means listing many kernel modules (e.g. separate modules for handling display, input, storage, message passing, and context switching).