Tegra System Diagnostics and Bring-up Lab
Status: Capstone subproject blueprint. The repository provides runnable platform-identification, software-baseline, and boot-chain evidence labs; the driver, diagnostic stack, performance study, and target RCA evidence remain planned.
Why this subproject exists
Build one interview-ready system-software project on a Jetson Orin Nano that connects platform bring-up, a Linux platform driver, C++ diagnostics, performance and power measurement, and root-cause analysis. The result must be reproducible engineering evidence, not a collection of commands or a claim to NVIDIA-private diagnostic software.
This is the capstone that integrates the existing project blueprints:
- CPU/SoC health diagnostics supplies the bounded C++17 diagnostic runner and structured result contract.
- Safe MMIO diagnostic driver supplies the device-tree, platform-driver, resource, lifecycle, and negative-path work.
- DVFS and thermal validation supplies the controlled workload and performance/power comparison method.
The kernel debugging guides provide the investigation techniques. The runnable labs remain under labs/orin-kernel-debugging; this page does not create empty implementation scaffolding.
Target and evidence boundary
The intended target is a Jetson Orin Nano running a recorded JetPack/L4T release. Record the actual board, BSP, kernel, configuration, device tree, and boot artifacts at run time; do not hard-code a conversationally assumed version as project fact.
- Orin is authoritative for Tegra boot, BPMP/CCPLEX observations, physical devices, IRQs, DMA/SMMU, PCIe, clocks, thermal behavior, and performance.
- QEMU or host fixtures may verify generic kernel mechanisms, parsers, failure handling, and destructive cases, but their results must be labeled non-Orin.
- Use documented Linux and NVIDIA interfaces. Do not depend on private tools, undocumented registers, or arbitrary physical-memory access.
- Establish serial capture and a tested recovery path before modifying the kernel, initrd, device tree, or boot configuration.
Deliverable map
| Workstream | Concrete output | Completion evidence |
|---|---|---|
| Bring-up and boot | Boot-chain note from BootROM/MB1/MB2 through UEFI, kernel, initrd, rootfs, and loaded DTB/DTBO | Serial log, platform report, boot artifacts, recovery rehearsal, and three explained observations |
| Platform driver | One bounded platform_driver using declared GPIO or MMIO resources and an IRQ or timed event | Device-tree node/overlay, probe/remove logs, user-space test, KUnit or unit tests, unload/reload, and negative paths |
| Diagnostic stack | C++17 CLI with Python orchestration for CPU, IRQ, thermal, frequency, memory, device-tree, PCIe/IOMMU, log, and driver checks | Versioned JSON schema; PASS, WARN, FAIL, and SKIP; deadlines; fixtures; and one Orin run |
| Performance and power | One fixed workload measured with supported tools such as perf, ftrace/trace-cmd, tegrastats, and documented sysfs data | Repeated raw trials, controlled variables, P50/P95/P99 where meaningful, before/after comparison, and explicit limitations |
| Fault injection and RCA | At least three bounded, recoverable failures | Symptom, reproduction, hypotheses, evidence, elimination, root cause, minimal fix or disposition, identical retest, and cleanup |
| Communication | Public project narrative and offline demonstration | Architecture diagram, build/run guide, evidence index, limitations, five-minute demo, and concise English project summary |
Unsupported hardware or unavailable permissions produce SKIP with a reason; they never silently pass. A measurement-only performance run is incomplete until it supports a defensible problem–change–result conclusion.
Eight-week delivery path
Advance on evidence gates rather than calendar dates. Each numbered unit is small enough for roughly one focused hour; repeat a unit when the evidence is not yet reproducible.
Week 1: establish the target baseline
- Run the Platform Evidence Lab and preserve its validated output.
- Run the Software Baseline Lab before changing the target.
- Run the Boot-chain Evidence Lab to capture the serial log and map observed stages to the boot artifacts.
- Rehearse recovery and write down three observations or anomalies without prematurely assigning root causes.
Gate: another engineer can identify the exact target and restore its starting state from the retained evidence.
Week 2: prove the build and deployment chain
- Record the matching kernel source, toolchain, configuration, and build provenance.
- Build a minimal external module and validate its architecture and version before loading it.
- Load, unload, rebuild, and redeploy it without leaving target state behind.
- Preserve a successful path and one deliberate compatibility rejection.
Gate: module build, deployment, rejection, and cleanup are repeatable from documented inputs.
Week 3: bind a real platform driver
- Choose one safe, declared resource and document why it is suitable.
- Add the device-tree node or overlay and verify the live tree actually used at boot.
- Implement
probe,remove, managed resource acquisition, and a narrow user-space interface. - Verify bind, use, unbind, reload, and invalid-resource behavior.
Gate: the driver never exposes arbitrary addresses and all acquired resources are released on every tested path.
Week 4: exercise IRQ, concurrency, and error unwind
- Add a bounded IRQ or timed-event path with explicit rate limits.
- Define the shared state and select locking from execution-context facts.
- Stress open/use/remove or the equivalent lifecycle boundary.
- Inject allocation, probe, and user-input failures and verify unwind and cleanup.
Gate: stress and negative-path tests leave no stuck worker, IRQ source, device binding, or temporary state.
Week 5: deliver structured diagnostics
- Freeze the result schema, stable reason codes, exit policy, and evidence limits.
- Implement the runner and fake plugins before reading target interfaces.
- Add read-only plugins using fixture-backed parsers.
- Run on Orin and record unsupported checks honestly.
Gate: console and JSON results agree, execution is bounded, and every enabled check reaches exactly one terminal state.
Week 6: make a performance decision
- Select one workload, response metric, resource metric, and hypothesis.
- Record power mode, clocks, cooling, background load, warm-up, and trial count.
- Collect repeated baseline and changed-condition trials with raw logs.
- Analyze variance and decide improve, regress, or inconclusive before writing the narrative.
Gate: the conclusion is reproducible from raw data and does not overstate causality or cross-platform relevance.
Week 7: complete three RCA loops
Choose bounded cases such as invalid device-tree data, driver initialization failure, event over-rate, user-space timeout, CPU saturation, thermal throttling, or service restart. Do not inject a boot-critical failure until serial capture and recovery have already passed.
For each case, complete:
symptom -> exact trigger -> hypotheses -> collected evidence
-> eliminated causes -> root cause -> minimal fix or disposition
-> identical retest -> negative verification -> cleanupGate: three reports link raw evidence and distinguish observed fact, inference, and remaining uncertainty.
Week 8: package the engineering evidence
- Create an evidence index linking source, inputs, results, and RCA reports.
- Review the architecture, safety boundaries, trade-offs, and limitations.
- Rehearse a five-minute offline demo using a live target or clearly labeled retained evidence.
- Produce a concise English resume bullet and three-minute technical explanation only from completed evidence.
Gate: a fresh reader can reproduce the documented path, and every public claim points to target-specific evidence or carries an explicit planned label.
Required fault coverage
The final three RCA reports should cover different boundaries:
- Configuration or probe: invalid device-tree property or missing resource causes a deterministic bind failure and complete unwind.
- Runtime control: event over-rate, contention, or user-space timeout is bounded, reported, and recoverable.
- Whole-system behavior: controlled CPU load or thermal throttling is correlated with scheduler, frequency, temperature, and workload evidence.
Memory-allocation failure is acceptable only when a supported fault-injection mechanism and a safe test boundary are documented. An uncontrolled interrupt storm, arbitrary register write, or unrecoverable boot change is out of scope.
Repository shape when implementation begins
Create directories only as working content lands. The intended ownership is:
tegra-diag/
├── kernel/ # bounded platform driver and its tests
├── cli/ # C++17 diagnostic runner and plugins
├── scripts/ # Python orchestration and evidence capture
├── tests/ # fixtures, contracts, negative paths, and integration tests
├── traces/ # small curated examples; large raw runs remain release assets
└── docs/ # boot analysis, design decisions, RCA reports, and demoDo not create this tree as placeholders. Each directory appears with its first tested artifact, and runnable kernel-debugging lessons continue to follow the repository's existing lab delivery contract.
Subproject completion criteria
The subproject is complete only when:
- the platform baseline, serial boot evidence, and tested recovery procedure identify the exact Orin environment;
- driver source, device tree, tests, target logs, failure paths, and cleanup meet the safe MMIO project acceptance criteria;
- diagnostic source, schema, bounded execution tests, fixture results, and an Orin report meet the CPU/SoC diagnostic acceptance criteria;
- repeated performance data supports one explicit before/after or problem/change/result decision;
- three diverse fault cases complete the RCA loop and identical retest;
- the evidence index, limitations, architecture diagram, build/run guide, and offline demonstration are reviewable;
git diff --checkand the documentation build pass.
Until every criterion passes, describe the work by its delivered milestones rather than claiming a completed Tegra diagnostic and bring-up stack.