Jetson Build Source 标志

Jetson Build Source

组织
NVIDIA-AI-IOT
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.

概览

发布者NVIDIA-AI-IOT
代码仓库jetson-bsp-skills
技能名称jetson-build-source
星标数
73
复刻数
13
附带文件
9
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 9 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 NVIDIA-AI-IOT 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Jetson Build Source AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/NVIDIA-AI-IOT/jetson-bsp-skills/tree/main/skills/jetson-build-source
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NVIDIA-AI-IOT/jetson-bsp-skills.git /tmp/jetson-bsp-skills
mkdir -p .claude/skills
cp -r /tmp/jetson-bsp-skills/skills/jetson-build-source .claude/skills/jetson-build-source
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Jetson Build Source,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Jetson Build Source。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Jetson Build Source 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

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 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:

bash
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:

bash
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:

bash
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:

bash
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 auto-detection.

Execute build

Common setup + per-mode build snippets

Common setup (validate orchestrator Makefiles, cd $KS) and the exact make invocations for each mode (dt, oot, kernel, full) plus the optional install consolidation pass live in references/build-modes.md. Drive the relevant mode's snippet against the bindings from the "Resolve active target + paths + upstream env" step.

Register composite custom overlay (dt + full only)

Skip unless the selected mode is dt or full. The composite overlay slot is documented in ../../references/bsp-customization-kernel-dtb.md; this sub-step owns the build / Makefile / flash-conf side of it.

Resolve the composite path for the active target ($COMPOSITE_BASE, $COMPOSITE_DTS, $COMPOSITE_MK) using the active profile's chip family, carrier ID/SKU, and module ID — full snippet in references/composite-registration.md.

Gate (symmetric). $COMPOSITE_DTS drives both directions: present → apply the two idempotent patches below; absent → run the cleanup pass to strip any stale dtbo-y += / OVERLAY_DTB_FILE+= line from a prior run. Either path keeps OVERLAY_DTB_FILE+= from referencing an unbuilt .dtbo — the build-time enforcement of the no-direct-in-tree-DT-edits rule.

  1. Per-dir Makefile — append dtbo-y += <name>.dtbo after the last literal-named dtbo-y += entry. Inserting after the $(old-dtbo) merge-back line skips the $(addprefix makefile-path/,…) prefix pass and the build silently drops the composite. Commit to the bsp_sources/ mono-repo. Full snippet + rationale: references/composite-registration.md.
  2. Carrier flash conf — append OVERLAY_DTB_FILE+=",<name>.dtbo" with first-touch pristine import on the overlay tracker. On a fresh workspace the tracker is empty git-init; import the conf from bsp_image and commit as pristine: before the customization commit (workflow contract). Full snippet: references/composite-registration.md.

The composite's parent sub-repo flipping HEAD during a customize-* append is what the "Detect dirty source repos" step's dirty detection consumes — no extra bookkeeping needed here.

Self-check before invoking nvidia-dtbs:

bash
grep -qxF "dtbo-y += ${COMPOSITE_BASE}.dtbo" "$COMPOSITE_MK" \
  || refuse "Composite Makefile registration missing after patch."
grep -qxF "$line" "$FLASH_CONF" \
  || refuse "Composite flash-conf registration missing after patch."

Write the build manifest

Walk the DIRTY set and emit a manifest entry per implied artifact, following the trace-to-dirty policy — only artifacts traceable to a dirty source repo. Promoting baseline-divergence noise would attribute it to a customization's audit trail (forbidden).

The full source → kbuild → destination mapping, YAML schema, and filter rules live in references/manifest-schema.md.

Atomic write: stage to ${MANIFEST}.tmp, then mv -f.

Update watermark + summary

On success, rewrite $STATE with the new per-repo HEADs, toolchain, bsp_image.version, and last-run mode (schema in references/manifest-schema.md).

Report:

  • Toolchain (from source.toolchain).
  • Build mode: <dt|oot|kernel|full> (auto-picked or forced by skill argument).
  • Dirty repos and their new HEADs.
  • Artifacts built: counts per kind (.dtb, in-tree .ko, OOT .ko, Image).
  • Manifest path + entry count.
  • Consolidated install stage path (if the "Install consolidation" step ran).
  • Next step: /jetson-promote-image.

If a Customize skill triggered this run, prompt the user to re-issue their original request.

Limitations

The top tier — failure modes that block a build or silently produce wrong artifacts. See references/long-tail-gotchas.md for invariants, deploy patterns, and performance hints.

  • Toolchain resolution is jetson-init-source's job. This skill only reads source.toolchain and exports CROSS_COMPILE. Missing field → refuse and route, never resolve in-skill.
  • R36.x Branch-A $KS/Makefile collision. R36.x's public_sources.tbz2 can leave the dGPU/OpenRM proprietary Makefile at $KS/Makefile instead of the Tegra orchestrator; its modules target recurses into kernel-open/ + src/nvidia/, pulls host /lib/modules headers, and breaks arm64 cross-builds with '-mlittle-endian' unrecognized. R38+ extractions are unaffected. /jetson-init-source's step 3a is the primary defense (extract-time); the "Common setup" check here is the safety net. Don't relax the regex.
  • Kernel-DT changes: composite-overlay-only, split ownership. Direct edits to in-tree .dts / .dtsi files under bsp_sources/ are forbidden for customize-* skills — every kernel-DT change lands as a fragment in the composite overlay slot (rule + rationale). The composite .dts content is owned by each customize-* skill; the build / Makefile / flash-conf registration is owned by this skill (gated on the composite .dts existing — so OVERLAY_DTB_FILE+= can't reference an unbuilt .dtbo).
  • the "Register composite custom overlay" step Makefile insertion point matters. Insert after the last literal-named dtbo-y += entry; inserting after $(old-dtbo) skips the $(addprefix makefile-path/,…) prefix pass and the build silently drops your .dtbo. The regex ^dtbo-y *+= *[a-zA-Z0-9] filters correctly; do not relax it.
  • the "Register composite custom overlay" step first-touch needs pristine import. On a fresh workspace the overlay tracker is empty git-init — the carrier flash conf is imported from bsp_image and committed as pristine: before the customization commit. Both commits go through the workflow acceptance gate.
  • Avoid bare $0 in shell snippets inside this SKILL.md. When invoked with an argument, the harness expands skill-body $0 against the caller's $0 before handing the rendered prompt to the model. Use sed-based line splicing or awk -v ROW="$0". See references/composite-registration.md.
  • No overlay staging. Build outputs stay where the build put them; the manifest is the contract to jetson-promote-image. Deliberate divergence from the original overlay→promote indirection — keeps the full build output set out of the overlay tracker's git history.
  • KERNEL_HEADERS vs KERNEL_OUTPUT in DT mode. Different semantics (srctree vs objtree); do not collapse. the "DT-only" step's snippet is correct as written.
  • OOT mode prereq: previously-built kernel headers. A manual oot invocation against a never-built tree refuses with "run kernel (or full) first" rather than producing a confusing build error.

Examples

Auto-detect mode from the dirty source tree (typical invocation):

/jetson-build-source

Force a single mode (skips auto-detect):

/jetson-build-source dt       # rebuild NVIDIA DTBs only
/jetson-build-source oot      # rebuild OOT modules only
/jetson-build-source kernel   # rebuild kernel Image + in-tree modules
/jetson-build-source full     # rebuild everything + install consolidation

Typical chain after a customize-* skill commits to a kernel-side repo (the customize-* skill calls this automatically):

/jetson-customize-pcie ...   # commits to hardware/nvidia/.../nv-public
   ↓
/jetson-build-source         # auto-picks `dt` from the dirty set
   ↓
/jetson-promote-image        # reads .build-manifest.yaml, stages into bsp_image
   ↓
/jetson-flash-image          # flashes

Troubleshooting

ErrorCauseSolution
source.toolchain points at <...>gcc which does not existToolchain field stale (path moved, install missing)Re-run /jetson-init-source to re-resolve. This skill never resolves toolchain itself.
No rule to make target '$KOUT/scripts/Makefile.compiler'KERNEL_HEADERS set to $KOUT instead of $KS/kernel/$KERNEL_SRC_DIRUse the DT-mode snippet in references/build-modes.md verbatim — srctree vs objtree must not collapse.
'-mlittle-endian' unrecognized during make modulesR36.x Branch-A $KS/Makefile collision — dGPU/OpenRM Makefile in place of Tegra orchestratorThe Common-setup safety net normally repairs it; if not, git checkout HEAD -- Makefile then re-run /jetson-init-source step 3a.
run kernel (or full) first on manual oot invocationKernel source tree never preparedRun /jetson-build-source kernel (or full) once, then oot.
nothing to build and dirty edits existEdits uncommitted in a sub-repo but .build-state.yaml watermark already matches HEADCommit the edits, or re-run with an explicit mode argument (/jetson-build-source dt etc.).
Composite .dtbo silently missing from the output setPer-dir Makefile insertion landed after $(old-dtbo) merge-back lineSee references/composite-registration.md — insert after the last literal-named dtbo-y += entry.
Promote step copies stale baseline artifactsTrace-to-dirty filter skipped after a manual cp into $KSOnly edit via a customize-* skill or git; the dirty detector keys on git HEAD, not file mtime.
host package missing: <pkg>flex/bison/libssl-dev refuse; others warn.sudo apt install <pkg> per references/upstream-recipe.md.

See also

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Jetson Build Source AI 技能有什么作用?

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.

为什么在 TypingMind 中使用 Jetson Build Source?

因为您只需安装一次,就能搭配任何模型使用。Jetson Build Source 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Jetson Build Source?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/NVIDIA-AI-IOT/jetson-bsp-skills/tree/main/skills/jetson-build-source。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Jetson Build Source?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Jetson Build Source 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Jetson Build Source 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Jetson Build Source AI 技能免费吗?

是的。NVIDIA-AI-IOT 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇