Skip to content

RV1103 smart-basket Linux circuit acceptance

Required workflow: superpowers:subagent-driven-development. Root owns commits, pushes and merges. Continue after the real Linux boot gate; do not substitute host-only device stimulation.

Goal: Linux reads an attached ADXL345 and exchanges UART commands with an explicitly behavioral ESP32-C3 ESP-AT peer through the same bus/component state as the basket circuit.

Task 1: Strict matching driver artifacts

Completed and independently reviewed on 2026-10-12: 52 preparation tests pass and two independent actual module/helper builds match. Preparation is verified; guest insertion remains NOT_RUN. See examples/luckfox-pico-mini-a-linux/DRIVER_MODULES.md for pins, bounds and compiler limitations.

Implement deterministic preparation of the matching Linux6.18.56 external RK3x module. Reuse the pinned upstream source SHA256 cee9b45dfee3fb4a7168585603c88df5e3422493425ac1bd35046d509d910423, Alpine dev package SHA256 a2fd3f3a675e5e1c68b4dbea544fa7fe3e1ebbc0403bf1f8de6130ed6cdb1b80, generated headers and Module.symvers. Build native host helpers from the included sources; never execute extracted ARM host utilities. Keep original .config and symbol versions unchanged. Record the compiler version and GCC plugin override, and require matching vermagic and strict guest insmod without forced version/symbol bypasses. Add the matching stock i2c-dev module to initramfs. Verify hashes, extraction path bounds and reproducible archive metadata.

Task 2: Rockchip I2C3 controller

Completed and independently reviewed on 2026-10-12 in commit a94b78e11: 23 new controller tests pass in default and native/event configurations, alongside 20/28 existing device tests and 8 inspection tests. Read-only register rejection is covered. Shared ADXL345 attachment, stimulus, traces and inspection are verified; Linux basket guest execution remains NOT_RUN.

Create a bounded RK3x v1 controller implementing the registers and interrupt handshake used by the pinned real driver. Write transaction and error tests before implementation: START/address/ACK, RX/TX FIFO counts, repeated-start register read, STOP, pending/enable interrupt bits, NACK and reset. Attach existing I2cDevice implementations through the normal bus attachment seam. Route I2C3 SPI21 to GIC INTID53. Controller transfers must invoke existing select/start/write/read/stop methods on the same ADXL345 instance; do not keep duplicate axis/register state. Respect the existing unpowered-I2C wrapper so power loss produces NACK. Unsupported DMA or clock/pinmux timing must be disclosed.

Task 3: UART4 and ESP-AT peer

Completed and independently reviewed on 2026-10-12 in commit 5e2d292c1: default104 and native/event112 focused tests pass, plus16 existing generic UART attachment tests. The three reproduced attachment panic paths now return errors before changing peer or console state. Shared power domains, transaction epochs and the disclosed functional receive timeout are verified. Linux basket guest and plant acceptance remain NOT_RUN.

Reuse the verified DW UART model at ff4e0000/SPI29 (INTID61), with UART stream-host capability attachment. Implement a new bounded ESP-AT component: AT, AT+GMR and agreed explicit mock connection/status commands, CRLF framing, bounded input buffers and deterministic RX. No SIM800L substitution and no claim of executing ESP firmware or modeling RF. Tests require bytes to pass from DW TX to component input and component RX back through UART FIFO/IRQ. Power-disabled peers consume no commands and emit no responses. Advertise unknown command behavior explicitly.

Task 4: Shared basket guest and power acceptance

Extend the direct-boot DT with real I2C3 compatible rockchip,rv1106-i2c, rockchip,rk3399-i2c, IRQ and disclosed fixed clocks; add UART4/serial4. Include a small ARM userspace helper using actual i2c-dev I2C_RDWR and termios UART syscalls. The acceptance guest loads the strict modules, reads ADXL345 DEVID0xe5, and verifies stimulus x/y/z values through Linux transfers, then exchanges AT/GMR over ttyS4. Host assertions confirm controller and component transaction traces from the shared bus, not only matching console strings. Stimulus and battery rails use existing circuit attachment/power contracts. A power-cut scenario must suppress component transactions and document whether it halts the Linux machine or requires reloading direct boot. Do not invent ROM reboot behavior.

Execute this integration in three sequential slices, with a fresh implementer, SPEC review and QUALITY review for each:

  • 4A — strict guest preparation: Create the separate exact basket DT/initramfs profile and reproducible freestanding ARM helper using matching modules and pinned syscall ABI. Preserve the base ten-node fixture and its guards. Prove actual two-directory artifact equality; guest execution stays pending.
  • 4B — canonical circuit and plant bridge: Export the existing canonical basket through normal attachment metadata with actual host, accelerometer and wifi identities. Reuse its power parameters and one persistent existing plant. Bound external-process requests, responses, deadlines and owned cleanup before relying on plant IPC for a bounded acceptance gate.
  • 4C — live Linux acceptance: Validate the distinct prepared profile, attach canonical parts and plant, and run actual Linux I2C/UART phases with independent bounded traces. Verify external-rail disconnect, actual plant fault and zero host retirement while held. Recovery uses a fresh strict machine with explicit monotonic plant-time accounting. Record current source/binary/artifact/circuit identities and full failure output.

Task4A completed and independently reviewed on 2026-10-12 in commit aaf63eef5: 68 preparation tests pass, including the causal kernel serial-port ancestry correction and bounded owned-child liveness regressions. Two retained independent helper/DT/initramfs builds match. The closed basket profile has initrd end 0x0322b140; preparation remains separate from pending Task4B bridge and Task4C guest execution. Original base/kernel/module/helper guards and historical evidence are preserved.

Task4B completed and independently reviewed on 2026-10-12 in core commit 195b1dd95 and app commit 9e2814208: default27/native27 focused Rust tests and 14 canonical export tests pass, alongside strict TypeScript, native Clippy and browser compilation. The exporter retains the canonical component identities and validates all six supply-domain pairs through the existing netlist. Persistent plant IPC now bounds frames and deadlines and rejects replies already queued after a complete frame or before a new request; causal regressions preserve valid sequential and EOF behavior. Original failure evidence and test binaries are retained. Task4C actual shared Linux guest, plant fault and fresh-fixture recovery remain pending.

The native fixture uses the disclosed functional24MHz CPU/timer configuration. The plant's raw5V is separate from a synthetic execution-supply proxy; raw3.3V drives the component domain. Supply startup must consume its legitimate release/reset before initializing the validated Linux entry, with no silent guest repair. Linux recovery is a fresh direct-boot fixture, without claiming RV1103 ROM reboot or real-time performance.

Task4C completed and independently reviewed on 2026-10-13 in commit 468d64079: the actual native Linux run passed two fresh PID1 fixtures and all eight shared I2C/UART phases, external-rail disconnect/restoration, persistent plant short/latch, zero-retirement fault hold and fresh-fixture recovery. Receipt SHA256 b341e8431bed1f3799d9cfd33ac9aa3048e948670f53cb1a3cdf65e6d4c7513d binds the reviewed source, CLI, backend, canonical export and prepared artifacts. The run took 644.13082329 seconds with 2,138,314,240 cycles/fuel, 1,538,795,070 retirements and 890 actual 100ms plant steps. Fresh SPEC independently passed 346 predicates and 158 focused tests; fresh QUALITY passed 382 predicates with no findings. Historical failed attempts and their causal fixes remain preserved. This establishes local native functional acceptance; Task5 integration and protected merges remain required, and physical and real-time performance acceptance remain separate.

Task 5: Circuit/tooling release

Run the existing PCB ERC/DRC/routing and reduced power tests only if circuit inputs change. Add native Linux basket acceptance to the opt-in CI job, with complete console and hash receipts on failure. Update model/backend availability and example documentation to distinguish direct boot, shared circuit behavior, behavioral Wi-Fi and reduced power from SD/BSP, radio, and hardware acceptance. Review default/browser independence, protect required checks, and merge current tested heads. Use the packed board-config package locally: the user explicitly skipped publication and chose local dogfooding, so no npm publication or manual deployment is required. Physical board/power/footprint/thermal/RF gates stay pending while the user has no hardware.