- Rust 100%
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| linker.ld | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
EriX Root Task (rootd)
rootd is the first user-space policy authority launched by kernel.
It receives the kernel -> root handoff and bootstraps critical early services.
Scope
- validate kernel bootstrap info and capability inventory
- parse required
boot-configpayload and establish deterministic launch DAG - transfer least-privilege capabilities to each service
- track bootstrap readiness and fail deterministically on required-service errors
Out of Scope
- low-level kernel object implementation
- implicit authority distribution
Service Bring-up Responsibilities
rootd launches services according to boot-config DAG entries. The current
runtime baseline still resolves to:
- foundation substrate:
memd -> vspaced -> pagerd -> procd - coordination core:
named -> logd -> crashd -> timed - hardware mediation core:
irqd -> deviced -> probed -> hotplugd - console/input stack:
seriald -> fbcond -> inputd
After procd is up, subsequent services are spawned through the typed
procd service-spawn API (IPC_PHASE0_PROCD_OP_SPAWN_SERVICE), not by direct
kernel process creation from rootd.
Driver daemons are owned by deviced; rootd requests driver lifecycle through
deviced RPCs. BOOTCFG_LAUNCH_KIND_DEVICED_DRIVER entries are treated as
policy nodes (seed/seal intent), not synchronous rootd wait points.
Interfaces
- input:
docs/handoff/kernel-to-root.md - output:
docs/handoff/root-to-services.md - shared wire/layout helpers:
lib-handoff
Invariants
- no service receives undeclared authority
- required-service startup failures halt bootstrap progression
- startup IPC and capability transfer are auditable and deterministic
- framebuffer-mode bootstrap requires both
fbcondandconsole-fontmodule inputs - missing/invalid
boot-configis fail-closed - rootd attempts capability shedding checkpoints:
- after
procdreadiness: untyped drop sweep and transfer of kernel-object management copies toprocd/deviced - after
devicedreadiness: device-control slot drop (SLOT_IRQ_CONTROL)
- after
- rootd does not emit driver-ready stamps; driver-ready observability is emitted
by
deviced(ERIX_DEVICED:READY:*).
Build Status
Implemented M0 baseline:
no_stdroot task binary with x86_64 SysV entry ABI:rdi = kernel_root_handoff_ptrrsi = kernel_root_handoff_sizerdx = root_endpoint_slot
- strict
kernel -> roothandoff intake validation (lib-handoffparser + descriptor checks) - deterministic rootd status model (
READY,HANDOFF_INVALID,CONTRACT_INVALID,INTERNAL_ERROR,SERVICE_BOOTSTRAP_FAILED) - required
boot-configdiscovery and v1 parse/validate path (ERIXBCFG) - config-driven async dependency startup event loop
- launch dispatch by
launch_kind:- rootd direct service startup
- deviced-managed driver startup (
START_DRIVER)
- feature-gated integration reporting path:
- runtime bootstrap path uses one binary and consumes
boot-configvalidation_profile(nonefor runtime image builds, phase profile IDs for smoke/integration scenario builds) - compatibility smoke aliases:
rootd-integration-*map to runtime phase features - force-fail controls remain integration-only:
rootd-integration-smokerootd-integration-force-failrootd-integration-force-service-failrootd-integration-force-spawn-fail
- runtime bootstrap path uses one binary and consumes
Implemented Phase0 orchestration baseline:
- deterministic required module discovery for
memd,vspaced,pagerd,procd, andphase0-probe - deterministic service launch-order state machine:
- intake validated
- module set discovered
- per-service (
memd -> vspaced -> pagerd -> procd) startup-envelope synthesis/validation - probe spawn request contract synthesis/validation
- role-based startup envelope generation using
lib-bootstrap+lib-capabitransfer bundle validation - integration stage progress reporting (
ROOTD_STAGE:*) via feature-gated rootd-report syscall path
Runtime-oriented bring-up path:
- service launch requests issued through kernel-control IPC (
CREATE_PROCESS,REGISTER_PAGER,MAP_FRAME,START_PROCESS) - per-service startup envelope delivery and readiness handshake over endpoint
CALL/REPLY - probe spawn request via
procdplus async probe-completion event wait on the root endpoint before reportingREADY
Current runtime-mode policy:
- runtime builds are bootstrap-only (no synthetic probe/client/stress execution)
- smoke/integration builds retain synthetic checks for CI verification
phase3-framebufferbootstrap fails closed ifconsole-fontis not presentphase3-inputbootstrap requiresdrv-i8042,drv-ps2-kbd,drv-ps2-mouse, andinputd