nvidia/skillsApache-2.010 files

Jetson Build Source

>-

Specification
Skill ID
nvidia/skills/jetson-build-source
Publisher
nvidia
Repository
skills
Installs
0
Files
10
License
Apache-2.0
Synced
Sep 23, 2026
How to use it

Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.

nvidia/skills/jetson-build-sourceInstalls these files
  • BENCHMARK.md
  • SKILL.md
  • evals/evals.json
  • references/build-modes.md
  • references/composite-registration.md
  • references/long-tail-gotchas.md
  • references/manifest-schema.md
  • references/upstream-recipe.md
  • skill-card.md
  • skill.oms.sig

What this skill tells the agent

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` 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` 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`.

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:

ModeWhat's builtAuto-picks when
dtNVIDIA DTBs onlyonly hardware/nvidia/* or kernel-devicetree dirty
ootOOT modules (six repos)only OOT repos dirty
kernelKernel Image + full in-tree .ko set + kernel-side dtbsonly kernel/$KERNEL_SRC_DIR dirty
fullEverything above + optional install consolidationmixed 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`. Refuse and route in these cases:

ConditionRoute 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_LIST is missing under $KS/. Route to /jetson-init-source.

Resolve toolchain (read-only)

Read source.toolchain from the active profile (authored by jetson-init-source). Validate:

export ARCH=arm64
export CROSS_COMPILE=<source.toolchain>   # trailing dash mandatory
[ -f "${CROSS_COMPILE}gcc" ] || refuse \
  "source.toolchain points at ${CROSS_COMPILE}gcc which does not exist. Re-run /jetson-init-source."

A trailing dash on CROSS_COMPILE is mandatory — kbuild treats it as a prefix (${CROSS_COMPILE}gcc); a missing dash breaks with command not found. The [ -f ] check catches it before any make runs.

This skill never prompts for the toolchain or attempts to resolve a missing one — that's jetson-init-source's exclusive responsibility. A missing field is a Setup gap; route there.

Verify build-host prerequisites once:

for p in flex bison libssl-dev; do
  dpkg -s "$p" >/dev/null 2>&1 || refuse "host package missing: $p"
done
for p in git build-essential bc zstd; do
  dpkg -s "$p" >/dev/null 2>&1 || warn "host package missing: $p"
done

Detect dirty source repos

The watermark file $STATE records the last successfully built commit per kernel-side repo. The repo list is derived at runtime from OOT_SOURCE_LIST + kernel/$KERNEL_SRC_DIR. For each repo: HEAD ≠ watermark → dirty; uncommitted edits (git diff --quiet non-zero) → also dirty.

Branch-A note: when bsp_sources/ is one mono-repo with a single .git, every canonical sub-path shares the same HEAD — the watermark schema still keys per-sub-path and the dirty set still works (any change anywhere flips every sub-path's HEAD).

If STATE is absent (first build), treat all repos as clean unless the auto-chain context says "Customize just committed". If DIRTY is empty and no mode argument was passed: report "nothing to build" and return.

Pick build mode

Map the dirty set to a mode (auto), or honor the mode argument:

Dirty repos (auto)Mode
Only hardware/nvidia/* or kernel-devicetreedt
Only OOT subset of $OOT_SOURCE_LISToot
Only kernel/$KERNEL_SRC_DIRkernel
Any mix spanning the abovefull

Modes are union-able: full runs kernel → oot → dt in that order (kernel produces headers OOT needs; nvidia-dtbs uses the same generated headers). A manually passed mode argument skips

Use this skill in a project

Open any RiverX project, search the Skills panel for nvidia/skills/jetson-build-source, and install it in one click.

Use this skill