Back to Eliza

Minimum Linux + NPU Target

packages/chip/docs/project/minimum-linux-npu-target.md

2.0.110.2 KB
Original Source

Minimum Linux + NPU Target

This is the minimum executable target for the current integration wave: boot a basic Linux kernel on the simulated e1-chip/generated AP target and run a deterministic INT8 ML smoke workload through the e1 NPU path.

This is not Android readiness, phone-class performance, tapeout readiness, or sustained power/thermal proof. QEMU/Renode reference boots may unblock software plumbing, but they do not satisfy this target unless the generated e1-chip/AP simulator is the target under test.

Status Terms

StatusMeaning
presentRepo source, scaffold, or checker exists and is linked below.
missingRequired source or target-side command does not exist yet.
evidence-requiredSource may exist, but the target cannot be claimed until generated artifacts, external build logs, boot transcript, or workload transcript are captured and accepted.

Acceptance Definition

The repo-local aggregate gate is make minimum-linux-npu-target-check. The narrower basic Linux kernel gate is make minimum-linux-target-check; it writes build/reports/minimum-linux-kernel-target.json and verifies the boot payload, DTS, console, driver/MMIO smoke, required artifacts, and required local blocker states before the ML workload is claimed.

The target is complete only when one generated-AP Linux transcript proves:

  1. The simulator is the e1-chip/generated AP target, not qemu-virt-only.
  2. The boot payload is a RISC-V ELF selected by scripts/locate_chipyard_linux_payload.py with OpenSBI and Linux payload markers.
  3. Linux reaches a shell, init script, or equivalent command runner.
  4. The DTS visible to Linux contains CPU, memory, CLINT/ACLINT, PLIC, UART console, DMA, display, and e1 NPU nodes matching sw/platform/e1_platform_contract.json.
  5. The console transcript contains OpenSBI, Linux version, Kernel command line:, and a shell/init marker.
  6. The kernel exposes /dev/e1-npu or a documented first-bring-up /dev/mem fallback for the e1 NPU MMIO range.
  7. A userspace NPU ML smoke runs GEMM_S8, prints input hash, output hash or matrix values, and stable PASS/FAIL markers.
  8. A checker fails closed if the transcript is missing, if the simulator is a reference platform, or if the ML command used CPU-only fallback.

Reference Map

AreaRepo referenceCurrent gate or commandWhat it proves
Chipyard Linux smokescripts/run_chipyard_eliza_linux_smoke.shmake chipyard-generated-ap-bootAttempts generated AP OpenSBI/Linux smoke.
Chipyard smoke checkerscripts/check_chipyard_verilator_linux_smoke.pymake chipyard-verilator-linux-smoke-checkValidates generated AP smoke artifacts and boot markers.
Linux payload locatorscripts/locate_chipyard_linux_payload.pymake chipyard-linux-payload-checkFinds a runnable FireMarshal/Chipyard Linux ELF payload.
CPU/AP evidencescripts/capture_cpu_ap_evidence.pymake cpu-ap-evidence-checkValidates OpenSBI, Linux, trap/timer/IRQ, ISA/cache/MMU, and AP benchmark transcripts.
Platform contractsw/platform/e1_platform_contract.jsonmake platform-contract-checkSource of truth for e1 MMIO addresses and generated software headers.
Generated Linux contractscripts/check_chipyard_generated_linux_contract.pymake chipyard-generated-linux-contract-checkChecks generated DTS/memory-map/regmap exposure for Linux launch.
Linux BSP sourcedocs/sw/linux/README.mdmake linux-bsp-checkChecks repo-local Linux BSP scaffold source.
Linux importsw/linux/scripts/import-linux-bsp.shmake linux-import-checkValidates import into an external Linux tree when LINUX_TREE is set.
Linux evidence capturesw/linux/scripts/capture-linux-bsp-evidence.shmake linux-boot-artifacts-checkCaptures external kernel build, DTB, OpenSBI handoff, serial boot, and runtime MMIO smoke evidence.
Software BSP aggregatescripts/check_software_bsp.pymake software-bsp-checkKeeps Linux, Buildroot, AOSP, OpenSBI, and U-Boot scaffold/evidence status fail-closed.
Linux DTSsw/linux/dts/eliza-e1.dtsmake linux-bsp-checkNames CPU, timer, PLIC, UART, NPU, DMA, and display nodes for the scaffold.
Linux config fragmentsw/linux/configs/eliza_e1.fragmentmake linux-bsp-checkNames kernel symbols needed by the external Linux target.
MMIO smoke sourcesw/linux/tests/e1-mmio-smoke.cmake software-bsp-evidence-checkProbes /dev/e1-npu and e1 MMIO base markers at runtime.
Minimum Linux kernel gatescripts/check_minimum_linux_target.pymake minimum-linux-target-checkVerifies Linux required artifacts, required local blocker states, and aggregate generated-AP Linux status.
Minimum Linux+NPU gatescripts/check_minimum_linux_npu_target.pymake minimum-linux-npu-target-checkTies Linux boot blockers, NPU ML smoke evidence, reports, and integrated-claim policy into one aggregate report.

Detailed Checklist

ItemStatusEvidence or blockerExisting target/script
Select a Linux-capable RV64 AP path for the minimum target.presentchipyard_rocket is named in the CPU/AP work order.make cpu-ap-scaffold-check
Keep the tiny CPU model out of Linux claims.presentThe platform contract records the checked-in tiny CPU boundary.make platform-contract-check
Provide the Eliza Rocket generator source.presentThe Eliza Rocket Scala config exists.make chipyard-generator-check
Pin and bootstrap the external Chipyard checkout.evidence-requiredRelease evidence needs recorded upstream SHA, setup command, and generated manifest.make chipyard-import-preflight
Generate Verilog, FIRRTL, DTS, and manifest for the selected AP.evidence-requiredRequired generated artifacts must be present and hashed.make chipyard-generated-check
Confirm generated DTS/memory-map/regmaps expose Linux launch nodes.evidence-requiredNeeds generated Chipyard artifacts, not only checked-in scaffolds.make chipyard-generated-linux-contract-check
Locate a Chipyard-compatible OpenSBI/Linux ELF payload.evidence-requiredPreferred FireMarshal payload must be present or built on the Linux host.make chipyard-linux-payload-check
Run generated AP OpenSBI/Linux smoke on the e1 target.evidence-requiredRequires OpenSBI and Linux version markers in the generated-AP log.make chipyard-generated-ap-boot
Reject qemu-virt-only proof for this target.presentThe generated-AP smoke checker accepts only generated artifacts and markers.make chipyard-verilator-linux-smoke-check
Provide OpenSBI or equivalent firmware path.evidence-requiredOpenSBI handoff transcript remains external evidence.make linux-boot-artifacts-check
Provide a Linux kernel build path for the generated platform.presentLinux BSP import and capture scripts exist.make linux-import-check
Capture external Linux kernel build transcript.evidence-requiredThe .BLOCKED marker must be replaced by a real external Linux build log.sw/linux/scripts/capture-linux-bsp-evidence.sh
Compile and validate the Eliza DTB in an external Linux tree.evidence-requiredThe real DTB log must include the e1 NPU compatible.sw/linux/scripts/capture-linux-bsp-evidence.sh
Provide deterministic boot command line.presentThe checked-in DTS has serial console bootargs.make linux-bsp-check
Device tree names CPU, timer, interrupt controller, UART, NPU, DMA, and display.presentThe checked-in DTS includes scaffold nodes for those blocks.make linux-bsp-check
Device tree uses Linux-driver-compatible e1 NPU compatible string.presentChecked-in DTS and Linux driver compatible strings are aligned.make linux-bsp-check
Kernel config enables Eliza NPU and DMA drivers.presentLinux fragment includes Eliza driver symbols.make linux-bsp-check
Linux NPU char device exists.presentThe Linux NPU driver registers misc device e1-npu.make linux-bsp-check
Runtime MMIO smoke probes /dev/e1-npu.presentThe MMIO smoke source opens /dev/e1-npu.make software-bsp-check
Runtime MMIO smoke proves actual target execution.evidence-requiredLinux runtime transcript remains blocked until captured externally.make linux-boot-artifacts-check
Generated platform headers match the contract.presentGenerated software headers are checked against the platform contract.make platform-contract-check
Linux userspace ML smoke command exists.presentsw/linux/tests/e1-npu-smoke.c provides deterministic target-side GEMM smoke source.make software-bsp-check
Integrated Linux ML smoke rejects CPU-only fallback.evidence-requiredIntegrated claim remains false until generated-AP Linux transcript has NPU workload PASS markers.make minimum-linux-npu-target-check
Kernel, DTB, OpenSBI, serial boot, and smoke evidence manifest exists.presentdocs/evidence/linux/eliza-linux-boot-artifacts.json defines required transcript markers.make linux-boot-artifacts-check
CPU/AP boot readiness checker exists.presentThe readiness checker aggregates generated AP and Linux artifact blockers.make cpu-ap-boot-readiness-check
End-to-end minimum Linux+NPU target gate exists.presentThe aggregate checker writes one JSON report for Linux and NPU evidence.make minimum-linux-npu-target-check

Closure Sequence

  1. Import the BSP into an external Linux tree with sw/linux/scripts/import-linux-bsp.sh /path/to/linux.
  2. Capture kernel build and DTB validation with sw/linux/scripts/capture-linux-bsp-evidence.sh /path/to/linux kernel-build and dtb-check.
  3. On a Linux host with Chipyard/FireMarshal, generate Eliza Rocket artifacts, locate or build the Linux payload, and run make chipyard-generated-ap-boot chipyard-verilator-linux-smoke-check.
  4. Capture complete generated-AP serial boot and runtime MMIO/NPU smoke logs.
  5. Run make minimum-linux-target-check and then make minimum-linux-npu-target-check. Until the generated AP Linux transcript contains both boot and NPU ML PASS markers, the aggregate target must remain BLOCKED instead of inventing proof.