Generated banner for Jetson Validate Image
Generated logo for Jetson Validate Image

Jetson Validate Image

NVIDIAOfficialCreated by Jetson TeamDistributed by NVIDIA

  • Skill
  • Review and audit
  • Software development
  • Apache-2.0
  • Medium risk
  • Has scripts

From the author

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.
— the description by Jetson Team

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The jetson-validate-image skill provides a validation layer for customized Board Support Packages (BSP). It confirms that a BSP has been correctly applied by performing static analysis of artifacts on disk and executing smoke or regression tests on a flashed device. It supports both static-only validation and on-target testing via SSH or UART, ensuring that kernel, module, and initramfs components are coherent and correctly deployed.

What it does

  • Verifies static artifacts like DTB, module checksums, and partition layouts.
  • Checks for coherence between initramfs, kernel Image, and rootfs modules.
  • Connects to a flashed device via SSH or UART to confirm userspace boot.
  • Detects drift between running kernel modules and those present in the rootfs.
  • Compares the running kernel version against the version found in the boot Image.
  • Collects logs and test results from the target device.

When to use it

  • After flashing a BSP to a target device using jetson-flash-image.
  • When you need to perform smoke or regression testing on a flashed device.
  • As a quality gate in a CI pipeline before declaring a customization batch shippable.
  • To troubleshoot module loading or kernel version mismatch issues.

Advantages

  • Supports both static and on-target validation workflows.
  • Provides automated detection of common BSP deployment errors like initramfs drift.
  • Offers flexible connectivity options including UART for devices without network access.
  • Maintains security by using environment variables for passwords instead of inlining them in configuration files.

Usage examples

“/jetson-validate-image”
Performs static checks against the staged BSP on disk without requiring a target device.
“/jetson-validate-image”
Executes on-target validation tests using the SSH configuration defined in the active profile.
“/jetson-validate-image”
Runs validation tests over a UART connection at /dev/ttyACM0 using credentials from the profile.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/jetson-validate-image/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip jetson-validate-image.zip -d .agents/skills

Documentation by Jetson Team

Validate BSP Image

Status: the DUT-access contract is stable; the rest of the validation procedure is a skeleton.

Purpose

Confirm that a freshly customized BSP landed correctly — both as a static artifact on disk and as a running system on the target — without re-promoting or re-flashing. Forms the validation tail of Deploy in the Setup → Customize → Build → Deploy pipeline (see ../../context/bsp-customization-workflow.md for the pipeline view) and is independently re-runnable.

Prerequisites

  • Active target-platform profile with bsp_image: resolved (run /jetson-init-image first).

  • For static-only scope: nothing further; the skill reads <bsp_image.root_path> directly.

  • For on-target scope:

    • /jetson-flash-image already pushed the staged BSP to the DUT.

    • dut_access: block authored in the active profile (or filled interactively at runtime — see ## DUT access).

    • Host tooling per transport: ssh + sshpass for SSH; Python 3.6+ with pyserial for UART.

    • Required env vars resolvable on the host when auth=password or sudo.method=password (password_env / sudo.password_env name the env var; never inline the secret in YAML).

When to invoke

  • After jetson-flash-image has put the BSP onto a target.

  • The user explicitly asks to validate, test, or run smoke / regression checks on a flashed device.

  • As a CI gate before declaring a customization batch shippable.

Instructions

The procedure below is a skeleton.

  1. Read the active target per the prerequisite contract.

  2. Choose validation scope — static (against bsp_image on disk, no DUT needed) and/or on-target (DUT must be booted from the just-flashed image).

  3. Static checks (if in scope):

    • Required artifacts present at expected paths in <bsp_image.root_path>/Linux_for_Tegra/.

    • DTB / module checksum or signature verification.

    • Partition-layout sanity vs. the per-board .conf's XML.

    • Cross-check overlay-staged outputs against bsp_image (they should be identical post-promotion).

    • Initramfs ↔ kernel + rootfs module coherence. Extract <bsp_image>/Linux_for_Tegra/bootloader/l4t_initrd.img and <bsp_image>/Linux_for_Tegra/rootfs/boot/initrd; verify three invariants against the promoted bsp_image state: (a) <bsp_image>/Linux_for_Tegra/kernel/Image matches <bsp_image>/Linux_for_Tegra/rootfs/boot/Image byte-for- byte — drift here means the "Mirror kernel Image into rootfs" step was skipped and any subsequent initramfs refresh built against the previous kernel. (b) for each module path the two initrd images ship, the bytes / md5 match the file under <bsp_image>/Linux_for_Tegra/rootfs/lib/modules/<ver>/ — any drift means modules will be shadowed at early boot. (c) the vermagic stamped on every initramfs *.ko matches the UTS_RELEASE reachable from <bsp_image>/Linux_for_Tegra/kernel/Image (e.g. parse the Linux version … string with strings) — a vermagic skew means the kernel Image was refreshed without rerunning l4t_update_initrd.sh, and modules will fail to load with "disagrees about version of symbol …". All three failure modes are closed by /jetson-promote-image's gate on either kernel/Image or rootfs/lib/modules/ plus the kernel-Image mirror; surface drift here and route the user back to a clean promote. See ../jetson-promote-image/SKILL.md.

  4. On-target checks (if in scope):

    • Connect to the DUT per the ## DUT access section below — resolve transport (ssh / uart), credentials, and sudo method from the active profile's dut_access: block (with interactive fallback when fields are missing / marked prompt), then run the connection probe and refuse if it fails.

    • Confirm boot reached userspace.

    • Run the selected test suite (smoke, regression, focused per-customization, ad-hoc).

    • Loaded-module srcversion drift. For modules a customization is known to have rebuilt, compare cat /sys/module/<name>/srcversion on the DUT against the modinfo /lib/modules/$(uname -r)/.../<name>.ko | awk '/srcversion/ {print $2}' reading. A mismatch means the kernel is running an older copy than the rootfs ships — almost always a stale initramfs (the bootloader-side initrd shipped a pre-customize module, it loaded first, and the rootfs copy cannot replace a live module). Recommend re-running /jetson-promote-image and re-flashing. Note: some modules don't emit srcversion; fall back to an md5 check against the binary the kernel loaded by extracting the region under /sys/module/<name>/sections/ or by comparing behaviorally (printk / sysfs nodes / DT properties the new version is known to expose).

    • Running kernel vs. rootfs kernel Image. Compare cat /proc/version (or uname -v) on the DUT against the Linux version … string extracted from /boot/Image (strings /boot/Image | grep -m1 'Linux version'). A mismatch — usually the build timestamp / LOCALVERSION — means the bootloader is running an older kernel Image than the rootfs holds, almost certainly because a fresh Image was promoted but the initramfs / extlinux.conf / QSPI boot partition wasn't refreshed. Modules in the rootfs will then have a different vermagic and any subsequent modprobe of a built-against-the-new-kernel .ko will fail. Recommend /jetson-promote-image and re-flash.

    • Userspace dmesg readability. Ubuntu 22.04 sets kernel.dmesg_restrict=1; non-root dmesg reads return "Operation not permitted" and silently zero hits. Every dmesg-based check must run with sudo (or temporarily lower the restriction via sudo sysctl kernel.dmesg_restrict=0). Surfacing this in the validate layer keeps printk-based customization checks honest.

    • Collect results, logs, artifacts.

  5. Summary: per-check pass/fail, overall verdict, where logs and artifacts landed.

DUT access

The on-target leg needs a way to reach the just-flashed DUT. Two transports are supported as full peers: ssh (primary) and uart (fallback for DUTs with no network).

The contract is locked in but lives in references/dut-access.md to keep this SKILL.md under the agent-routing budget. That reference covers:

  • The dut_access: profile schema (ssh, uart, sudo, workdir).

  • Resolution order (profile → env var → interactive prompt) with the full refusal-trigger table.

  • The mandatory connection probe (uname -r + cat /etc/nv_tegra_release) and its output-validation rules.

  • File transfer per transport (scp vs. base64-over-tty, with the >100 KB warning).

  • Sudo invocation matrix per sudo.method × transport.

  • UART implementation contract that scripts/uart_session.py honors (state machines for login / exec / push / pull, exit codes, robustness notes).

  • Security notes (password handling, host-key pinning).

Available Scripts

ScriptPurposeArguments
scripts/uart_session.pyUART transport black box for the on-target leg: login, command exec (with optional sudo), and base64-over-tty file transfer. Replaces ssh when the DUT has no network or ssh is broken.--tty <dev> [--baud <n>] --user <name> --password-env <ENVVAR> [--sudo-password-env <ENVVAR>] [--shell-prompt <regex>] [--lock-strategy refuse|wait] <probe|exec|push|pull> [...]

Invocation (the skill calls scripts as a subprocess — run_script() in agent-runtime terminology):

# run_script: probe the DUT over UART
DUT_UART_PASSWORD_ENV=DUT_UART_PWD \
DUT_UART_PWD="$(read -rs -p 'UART login pw: '; echo "$REPLY")" \
  scripts/uart_session.py \
    --tty /dev/ttyACM0 --baud 115200 \
    --user ubuntu --password-env DUT_UART_PASSWORD_ENV \
    probe

# run_script: exec a sudo command and capture exit code
scripts/uart_session.py --tty /dev/ttyACM0 --user ubuntu \
  --password-env DUT_UART_PASSWORD_ENV \
  --sudo-password-env DUT_SUDO_PWD \
  exec --use-sudo 'dmesg | tail -200'

The script's exit code is the contract — see the exit-code table in UART implementation contract.

Examples

Static-only validation (no DUT needed):

/jetson-validate-image
> static checks only against the staged BSP

On-target validation over SSH after a freshly flashed DUT:

/jetson-flash-image
   ↓
/jetson-validate-image
> on-target checks via dut_access.ssh

On-target validation over UART (no network on the DUT):

/jetson-validate-image
> use the uart transport at /dev/ttyACM0; the dut_access.uart block
  in the profile already has the tty and login_password_env wired up

Limitations

  • Placeholder skill — only the DUT-access contract and the uart_session.py helper are locked in. The static-check list, test-suite selection, result-sink layout, and pass/fail policy are tracked under ## Open items and may change.

  • UART file transfer is byte-banged base64 at ~10 KB/s on 115200 baud — emits a warning for sources > 100 KB but proceeds. For high-volume transfers, switch to the SSH transport.

  • uart_session.py opens and closes the tty per subcommand invocation (~1–2 s login per call). Validation passes running

    10 commands amortize poorly on UART; prefer SSH.

  • SSH uses StrictHostKeyChecking=accept-new with a per-profile known_hosts file. A fingerprint change refuses — typically means the DUT was reflashed (host keys regenerated) or the IP was reassigned. Remove the per-profile entry manually rather than auto-accepting.

  • Passwords are never inlined in the profile YAML — only password_env (env-var name) is persisted. auth=prompt / sudo.method=prompt exposes the password in the conversation log, which is the user's responsibility to manage.

  • transport=uart with lock_strategy=steal is not implemented (would require sending control characters that could corrupt the holder's state).

Troubleshooting

ErrorCauseSolution
no DUT transport configured (refuse)On-target scope requested but dut_access.transport unresolved across profile / env / interactive promptAuthor dut_access: in the active profile, or rerun with static-only scope.
$PASSWORD_ENV is unset (refuse)auth=password (or sudo.method=password) names an env var that isn't exported on the hostexport <ENVVAR>=... before invoking the skill; do NOT inline the password in YAML.
tty held by another process (refuse, exit 3)lock_strategy=refuse and fuser reports another holder (minicom, picocom, getty)Close the holding process (sudo fuser -k <tty> only if you know what's there), or rerun with lock_strategy=wait.
pyserial import failed (exit 4)UART transport selected but pyserial not installed in the skill's Pythonapt install python3-serial or pip install pyserial.
SSH fingerprint refusedDUT's host keys changed since the per-profile known_hosts was pinned (typically a reflash)Remove the matching line from <workspace>/target-platform/<profile-stem>.known_hosts and rerun — the new key will be accepted on first connect.
login failed (exit 128)UART probe couldn't match a login or shell prompt within timeoutConfirm the DUT is powered + booted to userspace; check --shell-prompt override if the DUT carries an unusual PS1; verify the --user matches a real account.
DUT not booted from the just-flashed BSP (warn / refuse)/etc/nv_tegra_release on the DUT doesn't match bsp_image.versionRe-run /jetson-flash-image and confirm the DUT actually power-cycled into the new BSP, not the previous one.
sudo prompt detected but no sudo password configured (exit 130)--use-sudo passed to uart_session.py exec but --sudo-password-env not set, and DUT user lacks NOPASSWDSet sudo.method=password + sudo.password_env in the profile, or grant NOPASSWD on the DUT via /etc/sudoers.d/.
command timed out (exit 129)Long-running DUT command exceeded the script's timeoutRun the command directly via ssh transport, or split into shorter steps.

References

  • references/dut-access.md — full DUT-access contract: profile schema, resolution order, probe, file transfer, sudo, UART implementation, security.

  • ../../context/target-platform-contract.md — target-platform contract.

  • ../../context/bsp-customization-workflow.md — Workspace edit protocol (this skill is the Deploy tail).

  • ../jetson-build-source/SKILL.md — Build builder; produces the artifacts this skill validates.

Files

references/dut-access.md

DUT access contract

Detailed reference for ../SKILL.md — the full dut_access: profile schema, resolution order, connection probe, file-transfer rules, sudo invocation matrix, UART implementation contract, and security notes. The top-level skill keeps only the high-level summary; the deep details live here so the SKILL.md stays under the agent-routing token budget.

Profile schema (extends platform_template.yaml)

The active target profile gains an optional dut_access: block. The block is only required for on-target validation; static checks ignore it. When the block is absent and the user requests on-target validation, the skill prompts interactively for every required field and offers (once per profile) to persist the answers — never silently invents values.

# WHERE — how to reach the DUT after flash. Optional; required only
# for on-target validation.
dut_access:
  transport: "<REQUIRED: ssh | uart>"           # default ssh

  # SSH transport — primary path. Used by jetson-validate-image's
  # on-target leg AND for scp file transfers (test scripts +
  # artifacts).
  ssh:
    host:        "<REQUIRED: IP or DNS resolvable from the host running the skill>"
    user:        "<OPTIONAL: login user — default ubuntu>"
    port:        "<OPTIONAL: TCP port — default 22>"
    auth:        "<REQUIRED: key | password | prompt>"
    key_file:    "<OPTIONAL: absolute path to private key — required when auth=key>"
    password_env: "<OPTIONAL: name of host env var holding the password — required when auth=password; never inline the password itself>"

  # UART transport — full peer to ssh. Supports login, command
  # execution, sudo, and base64-over-tty file transfer. Used when
  # the DUT has no network configured, ssh is broken, or the user
  # wants serial-console access (e.g. for boot-time inspection
  # AND post-boot queries from the same channel). File transfer
  # over UART is byte-banged at ~10 KB/s on 115200 baud — fine
  # for small artifacts (test scripts, log slices), slow for
  # anything >100 KB; the implementation warns and recommends
  # the ssh transport in that case. See the "UART implementation
  # contract" section below for the state-machine semantics.
  uart:
    tty:                "<REQUIRED if transport=uart: e.g. /dev/ttyACM0>"
    baud:               "<OPTIONAL: default 115200>"
    login_user:         "<OPTIONAL: default ubuntu>"
    login_password_env: "<REQUIRED if transport=uart and DUT login is password-protected: env var name; never inline the password itself>"
    shell_prompt:       "<OPTIONAL: regex matched against the DUT shell prompt. Default: implementation sets a uuid-tagged PS1 sentinel at login so the prompt is uniquely matchable. Override only when the DUT's PS1 cannot be modified.>"
    lock_strategy:      "<OPTIONAL: refuse | wait | steal — what to do when another process (minicom, picocom, getty) holds the tty. Default: refuse (safe). `wait` polls until released; `steal` is not implemented (would require sending control characters that may corrupt the holder's state).>"

  # Privilege escalation on the DUT. Many validation queries
  # (dmesg with dmesg_restrict=1, modprobe, systemctl restart)
  # require root. Resolve once; reuse across all on-target
  # commands.
  sudo:
    method:      "<REQUIRED: nopasswd | password | prompt | none>"
    password_env: "<OPTIONAL: env var holding sudo password — required when method=password>"

  # Writable scratch directory on the DUT for pushed test scripts
  # and collected artifacts. Created if missing on first connect.
  workdir:   "<OPTIONAL: absolute path on DUT — default $HOME/jetson-validate>"

auth: prompt and sudo.method: prompt mean "ask the user at run time and do not store" — the right choice for interactive shared hosts where password persistence is unacceptable. password_env decouples the value from the YAML so the profile can be committed to a repo; the skill reads the env var at run time and refuses if it's unset.

Resolution order

For each field, in order:

  1. Active profile dut_access: block — read at skill start.

  2. Host environment variable (password_env / login_password_env).

  3. Interactive prompt — used when the profile says prompt or the field is missing. The prompt offers a one-shot persist into dut_access: (subject to per-field policy: never persist raw passwords, only env-var names).

Refusal triggers:

ConditionRefusal
On-target scope requested AND dut_access.transport unresolvable after all three stepsRefuse with "no DUT transport configured." Route the user to author dut_access: or pick a different validation scope.
transport=ssh AND host empty after all three stepsRefuse.
auth=password AND password_env unset on hostRefuse: "$PASSWORD_ENV is unset." Do not fall back to prompt unless auth=prompt.
auth=key AND key_file does not exist on hostRefuse with the resolved path.
sudo.method=password AND sudo.password_env unsetRefuse with the same shape.
transport=uart AND uart.tty empty or device file does not existRefuse.
transport=uart AND uart.login_password_env set but the env var is unset on hostRefuse. (Same shape as the SSH password_env case.)
transport=uart AND pyserial not importable in the skill's PythonRefuse with install hint (apt install python3-serial / pip install pyserial).
transport=uart AND lock_strategy=refuse AND another process holds uart.tty (via fuser)Refuse with the holding PID(s) so the user can stop the conflicting process (e.g. close minicom).

Connection probe (mandatory before any validation query)

Once transport + credentials resolve, run a low-cost probe and refuse on failure. The probe shape is transport-specific but the output validation rules are identical.

SSH probe:

sshpass -e ssh \
  -o StrictHostKeyChecking=accept-new \
  -o UserKnownHostsFile="$WORKSPACE/target-platform/<profile-stem>.known_hosts" \
  -o LogLevel=ERROR \
  -o ConnectTimeout=10 \
  "$SSH_USER@$SSH_HOST" \
  'uname -r; cat /etc/nv_tegra_release 2>/dev/null || true'

Pass the resolved password via SSHPASS=… env (never as -p <pw>, which would leak in process listings). The known_hosts file is per-profile so different DUTs at different IPs don't fingerprint-collide.

UART probe (via the helper script — see "UART implementation contract" below):

"$DUT_UART_PASSWORD_ENV"=... \
scripts/uart_session.py \
  --tty "$UART_TTY" \
  --baud "$UART_BAUD" \
  --user "$UART_LOGIN_USER" \
  --password-env "$DUT_UART_PASSWORD_ENV" \
  probe

The probe subcommand performs login, runs uname -r and cat /etc/nv_tegra_release, and exits — identical observed output to the SSH probe so the post-probe validation logic is shared. The script's exit code propagates probe success / failure (login timeout, prompt-match failure, tty unavailable, etc.).

Output validation (same for both transports):

  • uname -r should match bsp_image.version's kernel release (e.g. an R38.x BSP ships a 6.8.12-tegra kernel). Warn (not refuse) on mismatch — the user may have intentionally booted an older image for comparison.

  • /etc/nv_tegra_release should advertise the active BSP version and GPU stack (e.g. INSTALL_TYPE=openrm for Thor / T264). Mismatch surfaces "DUT not booted from the just-flashed BSP."

File transfer

Per transport:

TransportPushPullThroughputSize policy
sshscp over the same resolved credentialsscpwire-rate (typically tens of MB/s on local LAN)no warning
uartbase64-encoded body, sent over the tty inside a heredoc; DUT runs base64 -d > $dstbase64 on DUT, decode on host~10 KB/s effective on 115200 baud (the baud rate × 8/10 framing overhead - protocol round-trips)WARN when source > 100 KB; recommend switching to ssh transport

Workdir target: push test scripts into dut_access.workdir; pull collected logs into <workspace>/target-platform/<profile-stem>/results/<timestamp>/.

UART size-warning template (emitted to stderr before xfer starts):

WARNING: pushing 524288 bytes over base64-over-tty at 115200 baud.
  Estimated time: ~52 sec (at ~10 KB/s effective throughput).
  For files >100 KB, consider scp via the ssh transport instead.

The skill does not abort on size — it proceeds after the warning.

Sudo invocation on the DUT

Per sudo.method × transport:

MethodSSH invocationUART invocation
nopasswdsudo <cmd> — assumes login user has NOPASSWD in /etc/sudoers.d/.sudo <cmd> — same assumption.
passwordecho "$DUT_SUDO_PWD" | sudo -S <cmd> 2>/dev/null — pwd resolved from sudo.password_env.Send sudo <cmd>\r; expect-detect [sudo] password for <user>:\s*; send $DUT_SUDO_PWD\r; resume capture until prompt sentinel. The expect detector must run only until the FIRST sudo prompt of the command — subsequent occurrences are not re-fed.
promptInteractive ask at first need; cache for the rest of the session.Same caching rule; the prompt-detection logic is the only thing that differs.
noneRun commands as login user only; refuse if the validation step requires root.Same.

Wrap reliably-needed-root commands in a helper so the method choice is centralized.

UART implementation contract

Reference implementation: scripts/uart_session.py. The skill invokes it as a black box; alternative implementations (Tcl expect, Go, etc.) are acceptable as long as they honor the contract below.

Dependencies: Python 3.6+, pyserial. No pexpect — the state machine is rolled directly on top of serial.Serial to keep the dependency surface minimal. Validated against the default python3 on Ubuntu 18.04 (3.6) through 24.04 (3.12); install pyserial via apt install python3-serial (works on all of those) or pip install pyserial.

Subcommands: probe, exec, push, pull. Each performs its own login at session start and closes the tty at exit (no session reuse across invocations — keeps the contract stateless between calls; the cost is one login per command, ~1–2 sec).

CLI shape:

uart_session.py --tty <dev> [--baud <n>] --user <name>
                --password-env <ENVVAR>
                [--sudo-password-env <ENVVAR>]
                [--shell-prompt <regex>]
                [--lock-strategy refuse|wait]
                <subcommand> [args...]

  probe                    — login, run uname -r + nv_tegra_release.
  exec [--use-sudo] <cmd>  — run cmd; propagate remote exit code.
  push <src> <dst>         — base64-over-tty upload.
  pull <src> <dst>         — base64-over-tty download.

Resolved values come from the active profile's dut_access: block. Passwords are read from the named env vars at run time; the script refuses if any required env var is unset.

State machine (login):

  1. Open the tty (raw, 8N1, baud per --baud).

  2. Lock check: shell fuser <tty>; if held and lock_strategy=refuse, exit 3 with the holding PIDs.

  3. Drain the read buffer (consume kernel-printk noise that accumulated while the tty was idle).

  4. Send \r to elicit a login prompt or shell prompt.

  5. Wait (timeout) for the first match of:

    • login: → already-logged-out shell. Send user, wait for Password:, send password, wait for default shell prompt ([\$#]\s*).

    • [\$#]\s*$ → already-logged-in shell. Skip auth.

  6. Replace PS1 with a uuid-tagged sentinel so the prompt is uniquely matchable for the rest of the session: export PS1='__PROMPT_<uuid>__> '. Drain the echo + first sentinel-marked prompt.

State machine (exec):

  1. Generate a per-call exit-code marker (__EXIT_<uuid>__<rc>\n).

  2. Send the wrapped command: <cmd>; printf "__EXIT_<uuid>__%d\\n" "$?"\r.

  3. Stream the tty into a buffer until the exit-code marker appears, with interleaved sudo-prompt detection (only if --use-sudo was passed):

    • If \[sudo\] password for [^:]+:\s* matches before the exit-code marker, send the sudo password once and continue.

  4. Once the marker matches, split the buffer:

    • Output = bytes before the marker, minus the leading command-echo line, minus ANSI escapes (\x1b\[[0-9;?]*[a-zA-Z]).

    • Exit code = capture group from the marker regex.

  5. Consume the trailing prompt sentinel so the buffer is clean for the next call (defensive, even though sessions close per invocation).

  6. Print stdout to the script's stdout; exit the script with the captured remote exit code.

State machine (push / pull):

  • Push: read local file → base64-encode → wrap in heredoc:

    base64 -d > <dst> <<EOF_<uuid>
    <base64 in 76-char lines>
    EOF_<uuid>

    Send via exec. Timeout scaled by file size (max(60, size / 5000) seconds, ~5 KB/s safety margin).

  • Pull: exec("base64 < <src>") → decode → write local file. Same timeout scaling.

  • Both: if size > 100 * 1024, write the WARNING template to stderr before transfer.

Exit codes:

CodeMeaning
0success (or remote exit 0 for exec)
1..127for exec: remote command's exit code
128login failed (no login or shell prompt within timeout)
129command timed out
130sudo prompt detected but no sudo password configured
2env var required by --password-env / --sudo-password-env is unset
3tty held by another process and lock_strategy=refuse
4pyserial import failed

Robustness notes:

  • The uuid-tagged PS1 sentinel removes prompt-matching ambiguity from custom PS1 values, ANSI color codes, and OSC-escape decorations.

  • Kernel printk noise emitted mid-session can interleave with command output. The state machine drains the buffer pre-login and relies on the per-call exit-code marker to delimit command boundaries, so printk lines are captured into the command's stdout (visible to the caller, but don't break parsing).

  • The per-call session policy (login → exec → close) means a validation pass running N commands pays N × login cost. For N > 10, prefer the SSH transport; UART is intended for diagnostic and bring-up scenarios, not high-volume runs.

Security notes

  • Never inline a password in the profile YAML. The schema carries password_env (the name of the env var), not the value. Skills must refuse to read a literal password field if one is ever added by hand.

  • Conversation-log exposure is the user's responsibility when they pick auth=prompt or sudo.method=prompt in an AI-assisted session — passwords typed in response to prompts appear in the transcript. Document this in the prompt itself before reading the password back.

  • SSH StrictHostKeyChecking=accept-new (not no) accepts on first connect and pins thereafter. A subsequent fingerprint change is then a refusal — usually a sign that the DUT was reflashed and SSH host keys regenerated, or that the IP was reassigned. Prompt the user to remove the per-profile known_hosts entry rather than auto-accepting.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs
  • Instructions that use the network
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Jetson Team
Publisher
NVIDIA (Official)
Distributed by
NVIDIA
Source
NVIDIA/skills · skills/jetson-validate-image · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Jetson Team or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download jetson-validate-image.zip