aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / docs / SEED0B_MACHINE1_QUALIFICATION.md
| 1 | # SEED-0B on Machine 1 (P2-9): operator procedure |
| 2 | |
| 3 | Status: **prepared, not run.** SEED-0B is qualified in QEMU only |
| 4 | ([evidence/seed0b_qemu_2026-09-25.md](../evidence/seed0b_qemu_2026-09-25.md)). |
| 5 | This page is the attended procedure for the physical step. An agent must not |
| 6 | run it or claim Machine 1 qualification; the operator runs it and publishes |
| 7 | the evidence. |
| 8 | |
| 9 | The claim to prove on hardware is the same as in QEMU, with identical |
| 10 | artifact bytes and ArtifactIds (ADR 0014 §8): |
| 11 | |
| 12 | > An externally supplied, signed Binary Artifact v0 was authenticated, |
| 13 | > deterministically admitted with authority no broader than requested, |
| 14 | > executed from the exact verified bytes under W^X EL0 isolation, used an |
| 15 | > authorized READ capability, was denied unauthorized WRITE and forged |
| 16 | > authority, was fully reclaimed, and produced a canonical admission |
| 17 | > receipt. Hostile artifacts failed closed. |
| 18 | |
| 19 | Everything here is **TEST ONLY**: the artifact signer and the receipt signer |
| 20 | are RFC 8032 test vectors. It is not a production identity ceremony, it |
| 21 | enrolls no key, and it changes no trust state. |
| 22 | |
| 23 | ## Blocking prerequisites (all required; stop if any is missing) |
| 24 | |
| 25 | 1. **TRUST-1 owner-signed boot chain** ([#40](https://github.com/aien-dev/aienux/issues/40)). |
| 26 | Native Machine 1 boots are paused by operator decision (2026-09-24): |
| 27 | turning Secure Boot off changes TPM PCR 7 and breaks the secrets sealed |
| 28 | to it. **Secure Boot was kept on at the time of this decision. Update 2026-10-01: Secure Boot is OFF for development by owner decision; the TPM stores were relocked under PCR 7 with it off (`~/handoffs/secure-boot-off/after-restart.sh`). A release image must still be signed by the TRUST-1 chain.** The qualification image must therefore |
| 29 | be signed by the owner-controlled chain TRUST-1 defines. Do not disable |
| 30 | Secure Boot, enroll the test keys, or relax any other mechanism to run |
| 31 | this step. |
| 32 | 2. **Native-boot rollback qualification** (M0) and the one-time boot |
| 33 | discipline in [NATIVE_BOOT_ONE_TIME.md](NATIVE_BOOT_ONE_TIME.md): a |
| 34 | BootNext-only entry, BootOrder unchanged, automatic return to Linux. |
| 35 | 3. **Recovery media and fallbacks** per |
| 36 | [RECOVERY_MEDIA_MACHINE1.md](RECOVERY_MEDIA_MACHINE1.md): the |
| 37 | `AIENOSRECOV` stick plugged in, the `ubuntu` entry, the firmware fallback |
| 38 | loader and the installed kernels present. |
| 39 | 4. **Console capture.** Per-candidate lines and receipts go to the console |
| 40 | only (they exceed the bounded `AienosBootReportV1` record). Capture the |
| 41 | Spark UART with the rig's Pi GPIO UART path |
| 42 | ([HARDWARE_TEST_RIG.md](HARDWARE_TEST_RIG.md)); HDMI capture alone is |
| 43 | not sufficient evidence for this step. |
| 44 | 5. **The QEMU qualification is green on the exact commit being staged**: |
| 45 | `AIENOS_STRICT=1 ./scripts/verify_all.sh` with `SEED_0B_QEMU: PASS`. |
| 46 | |
| 47 | ## 1. Prepare the inputs (Spark, Linux, no boot changes) |
| 48 | |
| 49 | ```bash |
| 50 | git switch --detach <qualified commit> |
| 51 | ./scripts/seed0b_machine1_prepare.sh ~/seed0b-machine1 |
| 52 | ``` |
| 53 | |
| 54 | This builds, from a clean commit only: |
| 55 | |
| 56 | - `BOOTAA64.EFI`: `aienos-handoff --features seed0b-qualification,hardware-staging` |
| 57 | (receipts carry the `SEED-0B-MACHINE1` tier); |
| 58 | - `ARTIFACTS/`: the same signed `.AIEN` bytes the QEMU run used (P26SEED, |
| 59 | the P2-5 probes and the H01–H29 matrix); |
| 60 | - `ids.txt`, `expected.txt`, and `MANIFEST.sha256` (with the commit). |
| 61 | |
| 62 | It never touches the ESP, BootOrder/BootNext, Secure Boot, the TPM or any |
| 63 | firmware variable. Check that the P26SEED ArtifactId it prints equals the |
| 64 | one in the QEMU evidence. |
| 65 | |
| 66 | ## 2. Sign the image with the TRUST-1 chain |
| 67 | |
| 68 | Sign `~/seed0b-machine1/BOOTAA64.EFI` with the owner-controlled AIENOS |
| 69 | signing key exactly as TRUST-1 specifies, and record the signed image's |
| 70 | SHA-256. The `.AIEN` files are not re-signed: their test signatures are what |
| 71 | the qualification checks. |
| 72 | |
| 73 | ## 3. Stage one boot (attended) |
| 74 | |
| 75 | Use the established one-time procedure, which creates a BootNext-only entry |
| 76 | and leaves BootOrder unchanged, with two differences: |
| 77 | |
| 78 | - the staged loader is the signed SEED-0B image from step 2; |
| 79 | - copy `~/seed0b-machine1/ARTIFACTS/*.AIEN` to `\EFI\AIENOS\ARTIFACTS\` on |
| 80 | the same ESP. Nothing else on the ESP changes. |
| 81 | |
| 82 | Record `efibootmgr` output, `mokutil --sb-state` and the TPM PCR 0–7 values |
| 83 | before the boot. |
| 84 | |
| 85 | ## 4. Boot, capture, return |
| 86 | |
| 87 | Start the UART capture, then reboot once. The image runs every candidate, |
| 88 | prints one `artifact:` line and one `receipt:` line per candidate plus the |
| 89 | `artifact_*` header and footer, and resets. BootNext is consumed, so the |
| 90 | machine returns to Linux. If it does not, use the recovery media. |
| 91 | |
| 92 | After return, confirm BootOrder, Secure Boot state and PCR 0–7 match the |
| 93 | pre-boot record, and that the Linux system is intact. |
| 94 | |
| 95 | ## 5. Verify the captured log (Spark, Linux) |
| 96 | |
| 97 | ```bash |
| 98 | AIENOS_SEED0B_SERIAL=<captured console log> \ |
| 99 | AIENOS_SEED0B_INPUTS=~/seed0b-machine1 \ |
| 100 | AIENOS_SEED0B_EVIDENCE=evidence/seed0b_machine1_<date>.md \ |
| 101 | ./scripts/qemu_artifact_test.sh |
| 102 | ``` |
| 103 | |
| 104 | This mode boots nothing. It proves the staged inputs are byte-identical to a |
| 105 | fresh deterministic pack and to their `MANIFEST.sha256` (no unlisted file), |
| 106 | that the manifest commit, the log's `aienos_commit` and this clean checkout's |
| 107 | HEAD are one commit, and that the log shows Machine 1's CPU identity (20 cores, |
| 108 | Cortex-A725/X925 boot core). It then applies every qualification-boot check to |
| 109 | the captured log (P26SEED allow/deny results, the matrix, frame accounting), |
| 110 | and checks, signs with the TEST ONLY receipt key, and verifies every receipt. |
| 111 | |
| 112 | The `SEED-0B-MACHINE1` tier label alone does not prove hardware: it is a build |
| 113 | feature (`hardware-staging`), so the same image booted in QEMU prints it too. |
| 114 | The CPU-identity check is what rejects a QEMU log. A captured log remains |
| 115 | operator-attested; TRUST-1 measured boot is what will bind it |
| 116 | cryptographically. When TRUST-1 signs `BOOTAA64.EFI`, record the signed |
| 117 | image's SHA-256 alongside the manifest rather than replacing the prepared file, |
| 118 | or the manifest check fails. The step passes only on `SEED_0B_MACHINE1: PASS`. |
| 119 | |
| 120 | ## 6. Publish |
| 121 | |
| 122 | Commit the generated evidence file with the captured log's SHA-256, the |
| 123 | signed image's SHA-256, the pre/post boot state records, and the operator's |
| 124 | name and date. SEED-0B PASS requires both `SEED_0B_QEMU: PASS` and |
| 125 | `SEED_0B_MACHINE1: PASS` on the same artifact bytes. |