interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / docs / adr / 0011-machine-1-hardware-test-rig.md

77 lines · 3985 bytes Raw Blame History Rendered
1# ADR 0011: Machine 1 Hardware Test Rig (Power, Capture, Input)
2
3Status: proposed, 2026-09-24. Requires operator approval of the parts list
4before maintainers wire anything. It does not change the boot architecture.
5Governing: [MILESTONES.md gate M2C](../MILESTONES.md),
6[HARDWARE_TEST_RIG.md](../HARDWARE_TEST_RIG.md),
7[NATIVE_BOOT_ONE_TIME.md](../NATIVE_BOOT_ONE_TIME.md),
8issue [#25](https://github.com/aien-dev/aienux/issues/25).
9
10## Context
11
12Every Spark boot needs a person at the machine: power and reset by hand,
13screen evidence by photograph, and firmware interaction by keyboard. Gate M2C
14requires power/reset control, HDMI capture and USB input emulation before
15hardware testing can run unattended or at any cadence. A Raspberry Pi is
16already cabled to the Spark and can host all three functions.
17
18## Decision
19
20Build the Machine 1 test rig as three **independent** functions on the
21existing Raspberry Pi controller, with the parts list and wiring in
22[HARDWARE_TEST_RIG.md](../HARDWARE_TEST_RIG.md):
23
241. **Power and reset control**: reed relays across the front-panel power and
25 reset pins, a fail-on mains relay for hard power cut, and a `PWR_OK` sense
26 line for power state.
272. **Display and console capture**: a UVC HDMI capture dongle with
28 loop-through on the Spark's display output, and the Pi GPIO UART for the
29 Spark console once SPCR-based UART discovery
30 ([#22](https://github.com/aien-dev/aienux/issues/22)) exists.
313. **Deterministic input and boot selection**: the Pi USB OTG port as an HID
32 boot-protocol keyboard gadget, driven by scripted, capture-verified
33 keystroke sequences.
34
35All three functions are serialized through
36`aien-proof hold --resource machine-1`, whose implementation and ledger live
37in the [aien-sovereign-core](https://github.com/aien-spark/aien-sovereign-core)
38repository. This repository holds the design, the operating contract and the
39versioned boot sequences.
40
41## Invariants
42
431. **Independence.** Each function fails without breaking the other two. A
44 failed capture never blocks power control; a dead keyboard gadget never
45 traps the machine.
462. **Fail-on power.** The mains relay passes power at rest, so a dead or hung
47 controller cannot hold the machine dark. The operator can always cut power
48 by hand.
493. **Momentary-only buttons.** Button relays close only for bounded intervals,
50 enforced in software and by the relay hardware.
514. **Read-only capture.** Capture observes; it never alters the machine.
525. **Serialized control.** Every rig function runs only inside an
53 `aien-proof hold --resource machine-1`; the hold output is the ledger
54 event. Deterministic sequences are versioned in this repository so a boot
55 maps to one exact commit, same rule as the staged image.
566. **No trust change.** The rig drives boots; it does not change what boots.
57 Secure Boot stays on and native AIENOS boots stay paused until the
58 owner-controlled boot chain exists. The rig adds no credentials, network
59 services or privileged host state to the trusted base.
607. **Off the critical path at rest.** With every relay at rest the Spark
61 behaves exactly as it does unwired.
62
63## Consequences
64
65- Screen evidence for boots stops depending on an operator photograph; the
66 post-exit drawing gap in the M2 evidence becomes a capture artifact named
67 in the ledger payload.
68- Recovery-media testing
69 ([#17](https://github.com/aien-dev/aienux/issues/17)) and the TRUST-1
70 100-boot campaign can run without a person at the machine.
71- The HID gadget becomes the hardware test target for the native xHCI/HID
72 keyboard driver ([#24](https://github.com/aien-dev/aienux/issues/24)).
73- `aien-proof` gains rig commands under the existing `machine-1` resource
74 lock; that work lands in aien-sovereign-core, not here.
75- The rig is removed piece by piece only if a native path replaces it (for
76 example native network control after M6); the capture and input functions
77 are expected to stay through the M8 demonstration.