Skip to content
DEEP DIVE

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.

01

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.

Memory isolation between tasks using MPU/MMU
Capability-based security model (no ambient authority)
Standard HAL — same driver code on 83 boards
Secure OTA with cryptographic verification
02

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.

Preemptive priority scheduler (256 priority levels)
MPU-enforced memory isolation between services
EIPC for zero-copy inter-service communication
Kernel footprint: 48 KB flash, 8 KB RAM minimum
03

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.

ROM → eBoot: RSA-4096 or ECDSA-P384 signature
eBoot → EoS: SHA-256 hash + Ed25519 signature
EoS → Apps: per-app capability manifest + signature
Anti-rollback counter stored in OTP fuses
04

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.

4 transports: shared memory, UART, SPI, TCP/IP
HMAC-SHA256 authentication on every frame
Capability checking before routing any message
Audit log of all service calls for forensics
05

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.

KiCad schematic → HAL config in one command
Automatic linker script generation from board spec
Reproducible builds with content-addressed artifact cache
Cross-compilation for 83 targets from any host OS