Orin Kernel Debugging Labs
Runnable labs are added one verified problem at a time. A lab is complete only when it includes an explicit trigger, expected evidence, source localization, minimal fix, negative verification, and cleanup.
Current status: The platform evidence lab, software baseline lab, and boot-chain evidence lab plus the shared QEMU environment are available. Other guide topics do not imply a delivered runnable lab.
Recommended starting order
- Run the Platform Evidence Lab on the target Orin.
- Run the Software Baseline Lab before changing the kernel, modules, device tree, boot configuration, or packages.
- Capture a complete cold boot with the Boot-chain Evidence Lab and correlate the serial log with the recorded boot selection and live
/chosenproperties. - Prepare the QEMU Auxiliary Environment for generic kernel builds and destructive experiments.
- Select later labs only when they unblock an integrated-project acceptance criterion.
Expected lab output
A completed lab produces versioned inputs, exact bounded commands, raw evidence, stable failure and success signatures, negative verification, and a cleanup or recovery result. The output must be linkable from the integrated project it supports.
Experiment delivery contract
Every new lab must name the integrated project and acceptance blocker it supports. Its README records platform and safety metadata, versioned inputs, exact bounded commands, expected stable signatures, and the output artifact that the project will link as evidence.
A delivered lab follows this evidence loop:
- Capture platform identity and a quiet baseline.
- Run one explicit trigger or controlled workload within a stated bound.
- Preserve raw evidence before diagnosis or repair.
- Connect symptom, hypotheses, source path, root cause, and minimal fix or disposition.
- Repeat the identical trigger or workload and verify both the expected result and absence of the original failure signature.
- Run cleanup/recovery and report incomplete cleanup as failure.
The active project acceptance criteria, not completion of every guide, determine delivery. A guide entry remains planning material until this contract and any project-specific evidence requirements are met.
Required module-based lesson layout
Every executable lesson that uses a demo kernel module must use this exact structure:
labs/orin-kernel-debugging/<topic>/
├── README.md
├── module/
│ ├── Makefile
│ ├── <topic>_demo.c
│ └── <topic>_fixed.c
├── scripts/
│ ├── build.sh
│ ├── load.sh
│ ├── trigger.sh
│ ├── collect.sh
│ ├── verify-fixed.sh
│ └── cleanup.sh
└── expected/
├── failure-patterns.txt
└── fixed-result.txtThe directory is created only when every listed file has working lesson content. Empty lesson scaffolds, placeholder modules, and no-op scripts are not accepted.
The files have fixed responsibilities:
README.mddefines platform metadata, safety level, prerequisites, build and trigger steps, evidence analysis, root cause, fix, retest, and recovery.<topic>_demo.ccontains one deliberate defect and is safe on module load; the defect requires an explicit trigger.<topic>_fixed.ccontains the minimal corrected implementation used by the identical verification path.build.shbuilds both variants against the declared kernel tree.load.shchecks platform, safety, module signatures, and required kernel configuration before loading the selected safe-default variant.trigger.shperforms the single explicit trigger and enforces S2/S3 Jetson refusal rules.collect.shcaptures logs, symbols, trace data, configuration, and module state before any repair.verify-fixed.shreruns the same trigger and checks both the expected fixed result and absence of the failure patterns.cleanup.shunloads modules, disables probes, removes temporary state, and reports incomplete cleanup as failure.expected/failure-patterns.txtcontains stable diagnostic patterns, never run-specific addresses, PIDs, timestamps, or CPU numbers.expected/fixed-result.txtcontains the stable success evidence required for lesson completion.
QEMU-capable lessons do not create a lesson-local qemu/ directory. Their scripts reuse the shared environment below and document any lesson-specific arguments or rootfs preparation in the lesson README.
Observation-only lessons do not create a fake module/ directory. They provide the smallest real structure required by the skill: read-only collection and validation scripts, fixture tests, and an expected evidence contract.
Available shared environment
- Platform Evidence Lab — read-only Orin identity collection and evidence validation.
- Software Baseline Lab — reproducible config, module, FDT, boot-artifact, and package fingerprints.
- Boot-chain Evidence Lab — validated serial, boot-selection, live
/chosen, and EFI evidence for the capstone's first bring-up gate. - QEMU Auxiliary Environment — reusable kernel build, boot, and smoke-test infrastructure for generic or destructive labs.
The debugging guides and performance guides are on-demand references for the integrated projects. A guide entry does not imply that its runnable lab has been delivered.
The Kernel Memory Failure Diagnosis Subproject defines the planned leak and corruption lesson sequence. It remains a blueprint until each lesson satisfies this lab contract; no empty lesson directories are created for it.