Skip to content
Development
Skill

/jetson-build-source

Use when you need to rebuild the BSP overlay — DT, OOT modules, or kernel — from changes under bsp_sources/. Triggers: build bsp, rebuild dtb, rebuild kernel.

From plugin
nvidia-skills
2.8k200 skills3 agents
Install
$ npx -y skills add NVIDIA/skills --skill jetson-build-source --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/jetson-build-source

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use when you need to rebuild the BSP overlay — DT, OOT modules, or kernel — from changes under bsp_sources/. Triggers: build bsp, rebuild dtb, rebuild kernel.

SKILL.md

jetson-build-source.SKILL.md
name: jetson-build-source
description: >-
  Use when you need to rebuild the BSP overlay — DT, OOT modules,
  or kernel — from changes under bsp_sources/. Triggers: build
  bsp, rebuild dtb, rebuild kernel.
version: 0.0.1
license: "Apache-2.0"
argument-hint: "dt | oot | kernel | full"
metadata:
  data-classification: public
  author: "Jetson Team"
  team: pts
  tags:
    - bsp
    - build
  domain: meta

Build BSP Source

Purpose

Rebuild the kernel-side artifacts (DTBs, OOT modules, in-tree modules, kernel `Image`) implied by changes under `<source.root_path>/bsp_sources/`, and write a manifest that `/jetson-promote-image` reads to stage those outputs into the BSP image. The skill never writes into `<bsp_image.root_path>` itself.

Prerequisites

  • Active target-platform profile with `bsp_image:` and

`source.toolchain:` resolved (run `/jetson-init-image` and `/jetson-init-source` first).

  • `<source.root_path>/bsp_sources/` populated with the kernel-side

checkout layout `/jetson-init-source` materializes.

  • `<bsp_image.root_path>/Linux_for_Tegra/source/kernel_src_build_env.sh`

present (extracted from `public_sources.tbz2`).

  • Host packages: `flex`, `bison`, `libssl-dev` (hard); `git`,

`build-essential`, `bc`, `zstd` (warn-only).

  • Cross-toolchain at `${source.toolchain}gcc` resolvable on disk.

Overview

This skill is the **Build** stage of the workflow — see [`../../context/bsp-customization-workflow.md`](../../context/bsp-customization-workflow.md) for where it sits in the Setup → Customize → Build → Deploy pipeline and what triggers it. The skill takes source-side customization commits, rebuilds the implied artifacts, and records which were rebuilt in a manifest. Outputs stay in-tree under `<source.root_path>/bsp_sources/`; [`jetson-promote-image`](../jetson-promote-image/SKILL.md) reads the manifest at Deploy to copy each rebuilt artifact into the matching path under `<bsp_image.root_path>/Linux_for_Tegra/`.

Overlay-only edits (`nvpmodel.conf`, `nvfancontrol.conf`, BPMP DTB) skip Build — `customize-*` stages them directly to the overlay tracker; BPMP DTB uses the `dtc` decompile → edit → recompile loop in [`../../references/bsp-customization-bpmp-dtb.md`](../../references/bsp-customization-bpmp-dtb.md).

**Custom-overlay slot ownership.** Kernel-DT customizations from every customize-* skill collect into a single composite `tegra<soc>-<carrier-id-sku>+<module-id>-xxxx-custom.dts` per active target — see [`../../references/bsp-customization-kernel-dtb.md`](../../references/bsp-customization-kernel-dtb.md) for the filename / location / append protocol. This skill is the **sole owner** of the composite's per-dir Makefile registration (`dtbo-y += <name>.dtbo`) and the carrier flash conf's `OVERLAY_DTB_FILE+=` line (the "Register composite custom overlay" step).

**Four build modes** matched to the dirty-repo profile:

| Mode | What's built | Auto-picks when | |---|---|---| | **dt** | NVIDIA DTBs only | only `hardware/nvidia/*` or `kernel-devicetree` dirty | | **oot** | OOT modules (six repos) | only OOT repos dirty | | **kernel** | Kernel `Image` + full in-tree `.ko` set + kernel-side dtbs | only `kernel/$KERNEL_SRC_DIR` dirty | | **full** | Everything above + optional install consolidation | mixed dirty set |

Mode selection: **auto** (default — invoke `/jetson-build-source` with no argument) walks the dirty-repo set; force a specific mode by passing it as the skill argument.

**Design principle: delegate to upstream.** Every build primitive already exists in `<bsp_image.root_path>/Linux_for_Tegra/source/` — the env file, top-level Makefile (`nvidia-dtbs` / `modules` / `modules_install`), kernel Makefile (`kernel` / `install`). The skill drives those primitives against `<source.root_path>/bsp_sources/` — never duplicates their logic in shell.

When to invoke

  • **Auto-chained** at the end of a Customize `customize-*` invocation

whenever Customize committed to a kernel-side source repo.

  • **Manual re-run** via `/jetson-build-source [<mode>]` when:
  • the auto-chained build was interrupted,
  • source commits arrived via `git pull` from other users,
  • the user wants to force a rebuild without a fresh edit,
  • the user wants a specific mode (e.g. install consolidation for

a manual scp deploy to a DUT).

Instructions

Resolve active target + paths + upstream env

Resolve the active profile per [`../../context/target-platform-contract.md`](../../context/target-platform-contract.md). Refuse and route in these cases:

| Condition | Route to | |---|---| | No active profile, or `active: NA` | `/jetson-set-target` or `/jetson-init-target` | | Profile lacks `bsp_image:` | `/jetson-init-image` | | Profile lacks `source.toolchain:` | `/jetson-init-source` | | `<source.root_path>/bsp_sources/` missing or empty | `/jetson-init-source` | | `<bsp_image.root_path>/Linux_for_Tegra/source/kernel_src_build_env.sh` missing | `/jetson-init-image` (BSP not properly extracted) |

Bind:

WORKSPACE=<parent of target-platform/>
BSP_SRC=<bsp_image.root_path>/Linux_for_Tegra/source   # NVIDIA's build primitives
KS=<source.root_path>/bsp_sources                      # our kernel-side checkout
KOUT=<source.root_path>/.build/kernel-out              # DT-mode out-of-tree build dir
STAGE=<source.root_path>/.build/install-stage          # install consolidation (full mode / opt-in)
STATE=<source.root_path>/.build-state.yaml             # per-repo watermark
MANIFEST=<source.root_path>/.build-manifest.yaml       # rebuilt-artifact list for jetson-promote-image

**Source the NVIDIA build env** to inherit canonical names — never hardcode `kernel-noble`, the OOT module list, or `KERNEL_DEF_CONFIG`:

source "$BSP_SRC/kernel_src_build_env.sh"
# Now in scope: KERNEL_SRC_DIR (e.g. kernel-noble), KERNEL_DEF_CONFIG,
# OOT_SOURCE_LIST, kernel_name (e.g. noble), KERNEL_MODULAR_BUILD

Refuse if `$KS/kernel/$KERNEL_SRC_DIR/` is missing or if any name in `$OOT_SOURCE

Read more
Ships withnvidia-skills

Official, NVIDIA-verified Agent Skills for Claude Code, Codex, and other coding agents.

Get the whole plugin