Building an OS from Scratch
A deep dive into how EmbeddedOS was designed and built — the architecture decisions, tradeoffs, and lessons learned from building a production embedded OS.
Why Build a New OS?
Most embedded systems run bare-metal code or a simple RTOS like FreeRTOS. These work well for simple devices but break down as complexity grows: no memory isolation, no security model, no standard driver interface, no update mechanism. EmbeddedOS was designed to solve these problems without sacrificing the determinism and small footprint that embedded developers need.
Kernel Architecture
EoS uses a microkernel architecture: the kernel only handles task scheduling, memory management, and IPC. Everything else — drivers, filesystems, networking — runs as isolated services in unprivileged mode. This means a buggy driver cannot corrupt the kernel or other services.
Secure Boot Chain
Every EoS device boots through a 4-stage verified chain: ROM bootloader → eBoot → EoS kernel → user applications. Each stage verifies the cryptographic signature of the next before executing it. A compromised application cannot affect the kernel; a compromised kernel cannot affect eBoot.
Inter-Process Communication
EIPC is the backbone of EoS. Every service call — reading a sensor, writing to flash, sending a network packet — goes through EIPC. This gives us a single point for authentication, capability checking, and audit logging. The shared-memory transport avoids copying payloads between address spaces.
The Build System
eBuild is the EoS build system. It reads a KiCad schematic or a board description file and automatically generates the correct HAL configuration, linker script, and startup code for your target hardware. No more manually editing linker scripts or copying startup files between projects.
