Skip to main content
skill CX Codex

jetson-init-image — Claude Code skill: what it does, how to install

Extracts Jetson Linux and sample rootfs tarballs, executes apply_binaries.sh, and records BSP metadata in the target profile. Useful when preparing an OS image before flashing.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NVIDIA/skills --skill jetson-init-image -a claude-code
Open on GitHub

What jetson-init-image does

The skill initializes the Jetson BSP directory for an active target profile. It locates local kernel and sample root filesystem tarballs, unpacks them into the designated image path, and runs apply_binaries.sh. The script selects the proper GPU driver stack based on the module hardware, passing the --openrm flag for Thor hardware and omitting flags for Orin modules.

Once extracted, the skill validates the installed driver stack against the active target contract and records the derived release version in the bsp_image block of the profile. If a Linux_for_Tegra directory already exists on disk, the skill halts to avoid overwriting files without explicit user consent.

Tarballs must be staged on disk beforehand because this skill does not download packages. Running apply_binaries.sh requires root privileges through sudo, and omitting an active target profile causes an immediate halt.

What it helps with

  • extract Jetson Linux and sample rootfs archives
  • run apply_binaries.sh with target-derived GPU stack flags
  • record BSP image paths and versions in the active profile
  • prevent accidental overwrites of existing rootfs directories

Example prompts for the agent

  • Extract the Jetson BSP image and apply binaries for the active target
  • Initialize the Linux_for_Tegra directory from tarballs in Image

How to install jetson-init-image

1Skills CLI (Vercel)

npx skills add NVIDIA/skills --skill jetson-init-image -a claude-code

2Manually: put the files in place

~/.claude/skills/jetson-init-image/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/jetson-init-image/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about jetson-init-image

How to install jetson-init-image in Claude Code?

Run npx skills add NVIDIA/skills --skill jetson-init-image -a claude-code.

What does jetson-init-image do?

It unpacks Jetson Linux tarballs, runs apply_binaries.sh to install driver binaries, and records the BSP configuration in the device profile.

Does jetson-init-image download the required archives?

No, it expects BSP and sample rootfs tarballs to be staged locally on disk before invocation.

Source text

SKILL.md · Apache-2.0
---
name: jetson-init-image
description: >-
  Extract Jetson Linux + sample-rootfs tarballs and run
  apply_binaries.sh for the active target, then record bsp_image in
  the profile. Use after jetson-init-target; not for source-tree
  setup.
version: 0.0.1
license: "Apache-2.0"
metadata:
  data-classification: public
  author: "Jetson Team"
  tags:
    - bsp
    - image
    - bootstrap
  domain: meta
---

# Initialize BSP Image

Output is only `bsp_image:` in the active profile: derived `version`
plus `root_path` only when overriding `<workspace>/Image`.

## When to invoke

- The user asks to extract, prepare, or initialize the BSP image.
- A downstream skill reports missing
  `<bsp_image.root_path>/Linux_for_Tegra/`.
- The active profile has no `bsp_image:` block yet.

## Procedure

### Resolve target and image path

Resolve the active profile per
[`../../context/target-platform-contract.md`](../../context/target-platform-contract.md).
Refuse if there is no active profile or `reference_devkit:` is missing.

`<workspace>` is the parent of the active profile's `target-platform/`
directory. `<bsp_image.root_path>` defaults to `<workspace>/Image`.

| Profile state | Action |
|---|---|
| `bsp_image.root_path` exists | Use it without prompting. |
| `bsp_image:` exists without `root_path` | Use `<workspace>/Image`. |
| No `bsp_image:` block | Ask once: Enter for default, or absolute override path. |

For an override, validate that the closest existing parent is writable.
Omit `root_path` when the default is used.

### Determine GPU stack

Use the shared GPU-driver invariant from
[`../../context/target-platform-contract.md`](../../context/target-platform-contract.md#derived-platform-facts).
Derive the expected stack from `reference_devkit.module.id` and the
catalogue:

| Chip family | Module IDs | Stack | `apply_binaries.sh` flag |
|---|---|---|---|
| T234 / Orin | `p3701`, `p3767` | nvgpu | none |
| T264 and later / Thor+ | `p3834` | OpenRM | `--openrm` |

Refuse unknown module IDs. The `--openrm` flag is only valid on BSP
releases that ship the OpenRM stack; if the active BSP doesn't expose
the flag, omit it regardless of what the target wants.

### Reuse or extract

If `<bsp_image.root_path>/Linux_for_Tegra/` already exists:

1. Do not extract over it unless the user explicitly requested
   re-extraction and accepted the overwrite risk.
2. Derive the on-disk version from `Linux_for_Tegra/nv_tegra_release`.
   Ask before replacing a different recorded `bsp_image.version`.
3. Verify the installed GPU stack against the platform-derived
   expectation when possible. Detection precedence (first probe that
   yields a definitive answer wins):

   1. `Linux_for_Tegra/rootfs/etc/nv_tegra_release` carries an
      `INSTALL_TYPE=` token on BSP releases that expose it (newer
      lines). Read and compare directly.
   2. Otherwise, `find Linux_for_Tegra -name nvgpu.ko`: present →
      nvgpu, absent → OpenRM.
   3. If the chip family has only ever shipped one stack (e.g. T234 /
      Orin is always nvgpu in current BSPs), fall back to the
      catalogue-derived expectation without disk probing.

If the installed stack conflicts with the active target, refuse and ask
the user to re-extract with the correct stack or fix the target profile.
Otherwise skip extraction and update the profile.

### Locate tarballs

When extraction is needed, search:

1. `<bsp_image.root_path>/`
2. `<workspace>/`
3. current working directory

Prompt for absolute paths for anything missing. Required filenames:

- `Jetson_Linux_R<ver>_aarch64.tbz2`
- `Tegra_Linux_Sample-Root-Filesystem_R<ver>_aarch64.tbz2`

Both filenames must contain the same `R<ver>` token. Refuse mismatches
and record `<ver>` as `bsp_image.version`. Do not download tarballs.

### Extract and apply binaries

Use absolute tarball paths; they may live outside
`<bsp_image.root_path>`.

```bash
ROOT="<bsp_image.root_path>"
BSP_TARBALL="<absolute path to Jetson_Linux_R<ver>_aarch64.tbz2>"
ROOTFS_TARBALL="<absolute path to Tegra_Linux_Sample-Root-Filesystem_R<ver>_aarch64.tbz2>"

mkdir -p "$ROOT"
tar xjf "$BSP_TARBALL" -C "$ROOT"
sudo tar xpjf "$ROOTFS_TARBALL" -C "$ROOT/Linux_for_Tegra/rootfs"

cd "$ROOT/Linux_for_Tegra"
if [ "$GPU_STACK" = "openrm" ]; then
  sudo ./apply_binaries.sh --openrm
else
  sudo ./apply_binaries.sh
fi
```

Set `GPU_STACK` from the "Determine GPU stack" step above. Abort on the first failing command and
surface the failed command.

### Update the active profile

Persist the resolved BSP image metadata in the active target profile so
later skills can find the BSP without re-prompting. Preserve existing
blocks, comments, and quoted SKU values; use a round-tripping YAML
writer such as `ruamel.yaml`.

```yaml
bsp_image:
  root_path: <absolute override path>  # omit for <workspace>/Image
  version: "<derived version>"
```

Rules:

- Same version and same root path: no rewrite.
- Different version: ask before updating.
- Different recorded `root_path`: refuse automatic rewrite.
- Always quote `version`.

## Finish

Report the image path, extracted vs reused state, GPU stack, derived
version, and profile update status. Then suggest `/jetson-init-source`.

## Purpose

Materialize `Linux_for_Tegra/` on disk by extracting the right Jetson
Linux + sample-rootfs tarballs and running `apply_binaries.sh` with
the GPU-stack flag derived from the active target (nvgpu for T234,
OpenRM for T264+). Then commit the derived BSP version into the
profile's `bsp_image:` block.

## Prerequisites

- Active target profile resolved per
  `../../context/target-platform-contract.md`.
- Jetson Linux BSP tarball and matching sample-rootfs tarball staged
  on disk (e.g. by `/jetson-download-bsp` or hand-placed).
- Write access to the workspace `Image/` root (or the override
  `bsp_image.root_path`).
- `sudo` available for `apply_binaries.sh`.

## Limitations

- Writes only the `bsp_image:` block; source tree, documents, and
  carrier profile are owned by sibling skills.
- Refuses to overwrite an existing `Linux_for_Tegra/` without explicit
  user direction.
- Does not download tarballs; rely on `/jetson-download-bsp` or
  hand-stage the inputs.

## Troubleshooting

- **`apply_binaries.sh` exits non-zero** — re-read its console output;
  most failures are missing `sudo`, missing rootfs tarball, or wrong
  GPU stack flag for the SoC generation.
- **`nv_tegra_release` absent after extract** — extraction stopped
  early; verify tarball integrity and rerun.
- **Recorded `version` disagrees with the tarball filename** — the
  tarball was renamed; trust the value parsed from
  `Linux_for_Tegra/nv_tegra_release` over filenames.
- **Different recorded `root_path` already in profile** — refuse and
  ask the user to confirm before overwriting.

## References

- [`../../context/target-platform-contract.md`](../../context/target-platform-contract.md)
- [`../../references/bsp-platforms-catalogue.md`](../../references/bsp-platforms-catalogue.md)
- [`../../references/platform_template.yaml`](../../references/platform_template.yaml)
- [`../jetson-init-target/SKILL.md`](../jetson-init-target/SKILL.md)
- [`../jetson-init-source/SKILL.md`](../jetson-init-source/SKILL.md)
- [`../jetson-flash-image/SKILL.md`](../jetson-flash-image/SKILL.md)

© Jetson Team · Apache-2.0 · NVIDIA/skills

Similar skills

All skills for DevOps and infrastructure →

From the same set194

jetson-customize-pinmux Parses a Jetson Orin or Thor pinmux XLSM and emits three BCT DTSIs, one entry per pin on a custom carrier. CX Codex +1 1,100installs jetson-print-bsp-info Inspects an unpacked Linux_for_Tegra BSP tree on a Linux host PC before flashing. Reports the L4T release version and rootfs state. CX Codex +1 1,100installs jetson-link-docs Writes paths to already-downloaded Jetson documents into the active target-platform profile so other skills can resolve them by name. CX Codex +1 1,100installs jetson-init-source Bootstraps the Jetson BSP source workspace: Linux_for_Tegra overlay tracker, bsp_sources tree and a Crosstool-NG cross-compile prefix. Run it after jetson-init-image. CX Codex +1 1,100installs jetson-customize-uphy Picks a UPHY lane allocation for custom Jetson Orin and Thor carriers and writes the tokens into ODMDATA. Useful when a controller fails to enumerate after flashing. CX Codex +1 1,100installs jetson-set-target Points the active Jetson target at a profile YAML you already have. Run it before tuning clocks, nvpmodel, the fan or memory. CX Codex +1 1,100installs jetson-init-target Authors a new NVIDIA Jetson target-platform profile and updates the active target pointer. Useful when configuring a devkit or custom carrier board from scratch. CX Codex +1 1,100installs jetson-derive-carrier Bootstraps custom Jetson carrier-board files and a device-tree overlay scaffold from a reference devkit. Use it after jetson-init-source. CX Codex +1 1,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor