jetson-build-source
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBuild BSP Source
构建BSP源码
Purpose
用途
Rebuild the kernel-side artifacts (DTBs, OOT modules, in-tree
modules, kernel ) implied by changes under
, and write a manifest that
reads to stage those outputs into the BSP
image. The skill never writes into itself.
Image<source.root_path>/bsp_sources//jetson-promote-image<bsp_image.root_path>重新构建由目录下的更改所涉及的内核端产物(DTBs、OOT模块、树内模块、内核),并生成一份清单供读取,以便将这些输出产物部署到BSP镜像中。本技能绝不会直接写入目录。
<source.root_path>/bsp_sources/Image/jetson-promote-image<bsp_image.root_path>Prerequisites
前提条件
- Active target-platform profile with and
bsp_image:resolved (runsource.toolchain:and/jetson-init-imagefirst)./jetson-init-source - populated with the kernel-side checkout layout
<source.root_path>/bsp_sources/materializes./jetson-init-source - present (extracted from
<bsp_image.root_path>/Linux_for_Tegra/source/kernel_src_build_env.sh).public_sources.tbz2 - Host packages: ,
flex,bison(hard);libssl-dev,git,build-essential,bc(warn-only).zstd - Cross-toolchain at resolvable on disk.
${source.toolchain}gcc
- 已激活的目标平台配置文件,其中和
bsp_image:已解析完成(请先运行source.toolchain:和/jetson-init-image)。/jetson-init-source - 目录已填充
<source.root_path>/bsp_sources/生成的内核端检出布局。/jetson-init-source - 文件存在(从
<bsp_image.root_path>/Linux_for_Tegra/source/kernel_src_build_env.sh中提取)。public_sources.tbz2 - 主机包:、
flex、bison(硬性要求);libssl-dev、git、build-essential、bc(仅警告)。zstd - 磁盘上可解析到位于的交叉工具链。
${source.toolchain}gcc
Overview
概述
This skill is the Build stage of the workflow — see
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
;
reads the
manifest at Deploy to copy each rebuilt artifact into the matching
path under .
../../context/bsp-customization-workflow.md<source.root_path>/bsp_sources/jetson-promote-image<bsp_image.root_path>/Linux_for_Tegra/Overlay-only edits (, , BPMP DTB)
skip Build — stages them directly to the overlay
tracker; BPMP DTB uses the decompile → edit → recompile loop in
.
nvpmodel.confnvfancontrol.confcustomize-*dtc../../references/bsp-customization-bpmp-dtb.mdCustom-overlay slot ownership. Kernel-DT customizations from
every customize-* skill collect into a single composite
per
active target — see
for the filename / location / append protocol. This skill is the
sole owner of the composite's per-dir Makefile registration
() and the carrier flash conf's
line (the "Register composite custom overlay" step).
tegra<soc>-<carrier-id-sku>+<module-id>-xxxx-custom.dts../../references/bsp-customization-kernel-dtb.mddtbo-y += <name>.dtboOVERLAY_DTB_FILE+=Four build modes matched to the dirty-repo profile:
| Mode | What's built | Auto-picks when |
|---|---|---|
| dt | NVIDIA DTBs only | only |
| oot | OOT modules (six repos) | only OOT repos dirty |
| kernel | Kernel | only |
| full | Everything above + optional install consolidation | mixed dirty set |
Mode selection: auto (default — invoke
with no argument) walks the dirty-repo set; force a specific mode
by passing it as the skill argument.
/jetson-build-sourceDesign principle: delegate to upstream. Every build primitive
already exists in
— the env file, top-level Makefile ( / /
), kernel Makefile ( / ). The
skill drives those primitives against
— never duplicates their
logic in shell.
<bsp_image.root_path>/Linux_for_Tegra/source/nvidia-dtbsmodulesmodules_installkernelinstall<source.root_path>/bsp_sources/本技能是工作流中的构建阶段——请参阅了解其在“设置→定制→构建→部署”流程中的位置以及触发条件。本技能会获取源码端的定制提交,重新构建相关产物,并记录哪些产物已重新构建到清单中。输出产物会保留在目录内;会在部署阶段读取该清单,将每个重新构建的产物复制到下的对应路径中。
../../context/bsp-customization-workflow.md<source.root_path>/bsp_sources/jetson-promote-image<bsp_image.root_path>/Linux_for_Tegra/仅覆盖层编辑(、、BPMP DTB)会跳过构建阶段——阶段会直接将它们部署到覆盖层跟踪器中;BPMP DTB使用中的反编译→编辑→重新编译循环。
nvpmodel.confnvfancontrol.confcustomize-*../../references/bsp-customization-bpmp-dtb.mddtc自定义覆盖层插槽所有权。所有技能的内核DT定制内容会收集到每个激活目标对应的单个复合文件中——请参阅了解文件名/位置/追加协议。本技能是复合文件的每个目录Makefile注册()以及载体闪存配置中行(“注册复合自定义覆盖层”步骤)的唯一所有者。
customize-*tegra<soc>-<carrier-id-sku>+<module-id>-xxxx-custom.dts../../references/bsp-customization-kernel-dtb.mddtbo-y += <name>.dtboOVERLAY_DTB_FILE+=四种构建模式,与仓库脏文件配置匹配:
| 模式 | 构建内容 | 自动选择条件 |
|---|---|---|
| dt | 仅NVIDIA DTBs | 仅 |
| oot | OOT模块(六个仓库) | 仅OOT仓库有改动 |
| kernel | 内核 | 仅 |
| full | 以上所有内容 + 可选的安装整合 | 存在跨上述类别的混合改动 |
模式选择:自动(默认——不带参数调用)会遍历脏仓库集合;通过传递参数可强制指定特定模式。
/jetson-build-source设计原则:委托给上游。每个构建原语已存在于中——环境文件、顶层Makefile(//)、内核Makefile(/)。本技能会针对调用这些原语——绝不会在shell中复制它们的逻辑。
<bsp_image.root_path>/Linux_for_Tegra/source/nvidia-dtbsmodulesmodules_installkernelinstall<source.root_path>/bsp_sources/When to invoke
调用时机
- Auto-chained at the end of a Customize invocation whenever Customize committed to a kernel-side source repo.
customize-* - Manual re-run via when:
/jetson-build-source [<mode>]- the auto-chained build was interrupted,
- source commits arrived via from other users,
git pull - 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).
- 自动链式调用:当定制技能提交到内核端源码仓库时,会在其末尾自动调用本技能。
customize-* - 手动重新运行:通过手动调用,适用于以下场景:
/jetson-build-source [<mode>]- 自动链式构建被中断,
- 其他用户通过提交了源码改动,
git pull - 用户希望无需新编辑即可强制重新构建,
- 用户需要特定模式(例如,为手动scp部署到DUT进行安装整合)。
Instructions
操作步骤
Resolve active target + paths + upstream env
解析激活目标 + 路径 + 上游环境
Resolve the active profile per
.
Refuse and route in these cases:
../../context/target-platform-contract.md| Condition | Route to |
|---|---|
No active profile, or | |
Profile lacks | |
Profile lacks | |
| |
| |
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-imageSource the NVIDIA build env to inherit canonical names — never
hardcode , the OOT module list, or :
kernel-nobleKERNEL_DEF_CONFIGbash
source "$BSP_SRC/kernel_src_build_env.sh"根据解析激活配置文件。在以下情况下拒绝并引导至对应操作:
../../context/target-platform-contract.md| 条件 | 引导至 |
|---|---|
无激活配置文件,或 | |
配置文件缺少 | |
配置文件缺少 | |
| |
| |
绑定变量:
bash
WORKSPACE=<target-platform/的父目录>
BSP_SRC=<bsp_image.root_path>/Linux_for_Tegra/source # NVIDIA的构建原语
KS=<source.root_path>/bsp_sources # 我们的内核端检出目录
KOUT=<source.root_path>/.build/kernel-out # DT模式的树外构建目录
STAGE=<source.root_path>/.build/install-stage # 安装整合(full模式/可选)
STATE=<source.root_path>/.build-state.yaml # 每个仓库的水印
MANIFEST=<source.root_path>/.build-manifest.yaml # 供jetson-promote-image使用的已重构产物列表加载NVIDIA构建环境以继承规范名称——绝不硬编码、OOT模块列表或:
kernel-nobleKERNEL_DEF_CONFIGbash
source "$BSP_SRC/kernel_src_build_env.sh"Now in scope: KERNEL_SRC_DIR (e.g. kernel-noble), KERNEL_DEF_CONFIG,
现在可用的变量:KERNEL_SRC_DIR(例如kernel-noble)、KERNEL_DEF_CONFIG、
OOT_SOURCE_LIST, kernel_name (e.g. noble), KERNEL_MODULAR_BUILD
OOT_SOURCE_LIST、kernel_name(例如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`.
如果`$KS/kernel/$KERNEL_SRC_DIR/`目录缺失,或`$OOT_SOURCE_LIST`中的任何名称在`$KS/`下缺失,则拒绝操作并引导至`/jetson-init-source`。Resolve toolchain (read-only)
解析工具链(只读)
Read from the active profile (authored by
). Validate:
source.toolchainjetson-init-sourcebash
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 is mandatory — kbuild treats it
as a prefix (); a missing dash breaks with
. The check catches it before any
runs.
CROSS_COMPILE${CROSS_COMPILE}gcccommand not found[ -f ]makeThis skill never prompts for the toolchain or attempts to
resolve a missing one — that's 's exclusive
responsibility. A missing field is a Setup gap; route there.
jetson-init-sourceVerify 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从激活配置文件中读取(由生成)。验证:
source.toolchainjetson-init-sourcebash
export ARCH=arm64
export CROSS_COMPILE=<source.toolchain> # 必须以连字符结尾
[ -f "${CROSS_COMPILE}gcc" ] || refuse \\
"source.toolchain指向的${CROSS_COMPILE}gcc不存在。请重新运行/jetson-init-source。"CROSS_COMPILE${CROSS_COMPILE}gcccommand not found[ -f ]make本技能绝不会提示用户输入工具链或尝试解析缺失的工具链——这是的专属职责。缺失字段属于设置环节的漏洞;引导至对应操作。
jetson-init-source一次性验证构建主机的前提条件:
bash
for p in flex bison libssl-dev; do
dpkg -s "$p" >/dev/null 2>&1 || refuse "主机包缺失:$p"
done
for p in git build-essential bc zstd; do
dpkg -s "$p" >/dev/null 2>&1 || warn "主机包缺失:$p"
doneDetect dirty source repos
检测脏源码仓库
The watermark file records the last successfully built
commit per kernel-side repo. The repo list is derived at runtime
from + . For each repo:
HEAD ≠ watermark → dirty; uncommitted edits (
non-zero) → also dirty.
$STATEOOT_SOURCE_LISTkernel/$KERNEL_SRC_DIRgit diff --quietBranch-A note: when is one mono-repo with a
single , 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).
bsp_sources/.gitIf is absent (first build), treat all repos as clean
unless the auto-chain context says "Customize just committed". If
is empty and no mode argument was passed: report
"nothing to build" and return.
STATEDIRTY水印文件记录了每个内核端仓库最后一次成功构建的提交。仓库列表在运行时由 + 生成。对于每个仓库:HEAD≠水印→脏仓库;存在未提交编辑(返回非零值)→同样视为脏仓库。
$STATEOOT_SOURCE_LISTkernel/$KERNEL_SRC_DIRgit diff --quietBranch-A说明:当是一个包含单个的单体仓库时,每个规范子路径共享相同的HEAD——水印模式仍会按子路径建立索引,脏集合仍可正常工作(任何位置的更改都会改变所有子路径的HEAD)。
bsp_sources/.git如果文件缺失(首次构建),则将所有仓库视为干净,除非自动链式上下文显示“定制操作刚刚提交”。如果集合为空且未传递模式参数:报告“无内容需构建”并返回。
STATEDIRTYPick build mode
选择构建模式
Map the dirty set to a mode (auto), or honor the mode argument:
| Dirty repos (auto) | Mode |
|---|---|
Only | |
Only OOT subset of | |
Only | |
| Any mix spanning the above | |
Modes are union-able: runs → → in that
order (kernel produces headers OOT needs; uses the
same generated headers). A manually passed mode argument skips
auto-detection.
fullkernelootdtnvidia-dtbs将脏集合映射到对应模式(自动),或遵循传入的模式参数:
| 脏仓库(自动) | 模式 |
|---|---|
仅 | |
仅 | |
仅 | |
| 上述类别的任意混合 | |
模式可联合使用:模式会按→→的顺序运行(内核会生成OOT所需的头文件;使用相同的生成头文件)。手动传入的模式参数会跳过自动检测。
fullkernelootdtnvidia-dtbsExecute build
执行构建
Common setup + per-mode build snippets
通用设置 + 各模式构建代码片段
Common setup (validate orchestrator Makefiles, ) and the
exact invocations for each mode (, , ,
) plus the optional install consolidation pass live in
. Drive
the relevant mode's snippet against the bindings from the
"Resolve active target + paths + upstream env" step.
cd $KSmakedtootkernelfullreferences/build-modes.md通用设置(验证编排器Makefiles,)以及每个模式(、、、)的精确调用,加上可选的安装整合步骤,均位于中。结合“解析激活目标 + 路径 + 上游环境”步骤中的绑定变量,调用对应模式的代码片段。
cd $KSdtootkernelfullmakereferences/build-modes.mdRegister composite custom overlay (dt + full only)
注册复合自定义覆盖层(仅dt和full模式)
Skip unless the selected mode is or . The composite
overlay slot is documented in
;
this sub-step owns the build / Makefile / flash-conf side of it.
dtfull../../references/bsp-customization-kernel-dtb.mdResolve the composite path for the active target (,
, ) using the active profile's
chip family, carrier ID/SKU, and module ID — full snippet in
.
$COMPOSITE_BASE$COMPOSITE_DTS$COMPOSITE_MKreferences/composite-registration.mdGate (symmetric). drives both directions:
present → apply the two idempotent patches below; absent → run the
cleanup pass
to strip any stale / line from a
prior run. Either path keeps from referencing
an unbuilt — the build-time enforcement of the
no-direct-in-tree-DT-edits rule.
$COMPOSITE_DTSdtbo-y +=OVERLAY_DTB_FILE+=OVERLAY_DTB_FILE+=.dtbo- Per-dir Makefile — append after the last literal-named
dtbo-y += <name>.dtboentry. Inserting after thedtbo-y +=merge-back line skips the$(old-dtbo)prefix pass and the build silently drops the composite. Commit to the$(addprefix makefile-path/,…)mono-repo. Full snippet + rationale:bsp_sources/.references/composite-registration.md - Carrier flash conf — append with first-touch pristine import on the overlay tracker. On a fresh workspace the tracker is empty git-init; import the conf from
OVERLAY_DTB_FILE+=",<name>.dtbo"and commit asbsp_imagebefore the customization commit (workflow contract). Full snippet:pristine:.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-dtbsbash
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."除非所选模式为或,否则跳过此步骤。复合覆盖层插槽的文档位于中;此子步骤负责其构建/Makefile/闪存配置端的操作。
dtfull../../references/bsp-customization-kernel-dtb.md使用激活配置文件的芯片系列、载体ID/SKU和模块ID解析激活目标的复合路径(、、)——完整代码片段位于中。
$COMPOSITE_BASE$COMPOSITE_DTS$COMPOSITE_MKreferences/composite-registration.md门控(对称)。控制两个方向:存在→应用以下两个幂等补丁;不存在→运行清理步骤以移除之前运行中留下的任何过期/行。无论哪种路径,都能确保不会引用未构建的——这是构建时对禁止直接编辑树内DT规则的强制执行。
$COMPOSITE_DTSdtbo-y +=OVERLAY_DTB_FILE+=OVERLAY_DTB_FILE+=.dtbo- 每个目录的Makefile——在最后一个字面命名的条目后追加
dtbo-y +=。如果插入到dtbo-y += <name>.dtbo合并行之后,会跳过$(old-dtbo)前缀处理,构建会静默丢弃复合文件。提交到$(addprefix makefile-path/,…)单体仓库。完整代码片段+原理:bsp_sources/。references/composite-registration.md - 载体闪存配置——追加,首次接触时从覆盖层跟踪器导入原始版本。在新工作区中,跟踪器是空的git初始化仓库;在定制提交之前,从
OVERLAY_DTB_FILE+=",<name>.dtbo"导入配置并提交为bsp_image(工作流约定)。完整代码片段:pristine:。references/composite-registration.md
定制操作追加时复合文件的父子仓库HEAD变化,会被“检测脏源码仓库”步骤的脏检测逻辑捕获——此处无需额外记录。
调用前的自检:
nvidia-dtbsbash
grep -qxF "dtbo-y += ${COMPOSITE_BASE}.dtbo" "$COMPOSITE_MK" \\
|| refuse "补丁后复合Makefile注册缺失。"
grep -qxF "$line" "$FLASH_CONF" \\
|| refuse "补丁后复合闪存配置注册缺失。"Write the build manifest
写入构建清单
Walk the 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).
DIRTYThe full source → kbuild → destination mapping, YAML schema, and
filter rules live in
.
references/manifest-schema.mdAtomic write: stage to , then .
${MANIFEST}.tmpmv -f遍历集合,为每个相关产物生成清单条目,遵循跟踪到脏文件规则——仅包含可追溯到脏源码仓库的产物。禁止将基线差异的冗余内容纳入定制的审计跟踪中。
DIRTY完整的源码→kbuild→目标路径映射、YAML模式和过滤规则位于中。
references/manifest-schema.md原子写入:先写入到,然后执行。
${MANIFEST}.tmpmv -fUpdate watermark + summary
更新水印 + 摘要
On success, rewrite with the new per-repo HEADs, toolchain,
, and last-run mode (schema in
).
$STATEbsp_image.versionreferences/manifest-schema.mdReport:
- Toolchain (from ).
source.toolchain - Build mode: (auto-picked or forced by skill argument).
<dt|oot|kernel|full> - Dirty repos and their new HEADs.
- Artifacts built: counts per kind (, in-tree
.dtb, OOT.ko,.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.
成功后,用每个仓库的新HEAD、工具链、和上次运行模式重写(模式位于中)。
bsp_image.version$STATEreferences/manifest-schema.md报告内容:
- 工具链(来自)。
source.toolchain - 构建模式:(自动选择或由技能参数强制指定)。
<dt|oot|kernel|full> - 脏仓库及其新HEAD。
- 已构建产物:按类型统计数量(、树内
.dtb、OOT.ko、.ko)。Image - 清单路径 + 条目数量。
- 整合安装阶段路径(如果运行了“安装整合”步骤)。
- 下一步操作:。
/jetson-promote-image
如果是由定制技能触发的本次运行,提示用户重新发出原始请求。
Limitations
局限性
The top tier — failure modes that block a build or silently
produce wrong artifacts. See
for invariants, deploy patterns, and performance hints.
references/long-tail-gotchas.md- Toolchain resolution is 's job. This skill only reads
jetson-init-sourceand exportssource.toolchain. Missing field → refuse and route, never resolve in-skill.CROSS_COMPILE - R36.x Branch-A collision. R36.x's
$KS/Makefilecan leave the dGPU/OpenRM proprietary Makefile atpublic_sources.tbz2instead of the Tegra orchestrator; its$KS/Makefiletarget recurses intomodules+kernel-open/, pulls hostsrc/nvidia/headers, and breaks arm64 cross-builds with/lib/modules. R38+ extractions are unaffected.'-mlittle-endian' unrecognized's step 3a is the primary defense (extract-time); the "Common setup" check here is the safety net. Don't relax the regex./jetson-init-source - Kernel-DT changes: composite-overlay-only, split ownership.
Direct edits to in-tree /
.dtsfiles under.dtsiare forbidden for customize-* skills — every kernel-DT change lands as a fragment in the composite overlay slot (rule + rationale). The compositebsp_sources/content is owned by each customize-* skill; the build / Makefile / flash-conf registration is owned by this skill (gated on the composite.dtsexisting — so.dtscan't reference an unbuiltOVERLAY_DTB_FILE+=)..dtbo - the "Register composite custom overlay" step Makefile insertion point matters. Insert after
the last literal-named entry; inserting after
dtbo-y +=skips the$(old-dtbo)prefix pass and the build silently drops your$(addprefix makefile-path/,…). The regex.dtbofilters correctly; do not relax it.^dtbo-y *+= *[a-zA-Z0-9] - 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 and committed as
bsp_imagebefore the customization commit. Both commits go through the workflow acceptance gate.pristine: - Avoid bare in shell snippets inside this SKILL.md. When invoked with an argument, the harness expands skill-body
$0against the caller's$0before handing the rendered prompt to the model. Use sed-based line splicing or$0. Seeawk -v ROW="$0".references/composite-registration.md - No overlay staging. Build outputs stay where the build put
them; the manifest is the contract to . Deliberate divergence from the original overlay→promote indirection — keeps the full build output set out of the overlay tracker's git history.
jetson-promote-image - vs
KERNEL_HEADERSin DT mode. Different semantics (srctree vs objtree); do not collapse. the "DT-only" step's snippet is correct as written.KERNEL_OUTPUT - OOT mode prereq: previously-built kernel headers. A manual
invocation against a never-built tree refuses with "run
oot(orkernel) first" rather than producing a confusing build error.full
以下是顶级限制——会阻止构建或静默生成错误产物的故障模式。请参阅了解不变量、部署模式和性能提示。
references/long-tail-gotchas.md- 工具链解析是的职责。本技能仅读取
jetson-init-source并导出source.toolchain。缺失字段→拒绝操作并引导,绝不会在技能内解析。CROSS_COMPILE - R36.x Branch-A的冲突。R36.x的
$KS/Makefile可能会将dGPU/OpenRM专有Makefile留在public_sources.tbz2位置,而非Tegra编排器;其$KS/Makefile目标会递归到modules+kernel-open/,拉取主机src/nvidia/头文件,并在arm64交叉构建时因/lib/modules错误而失败。R38+版本的提取不受影响。'-mlittle-endian' unrecognized的步骤3a是主要防御手段(提取时);此处的“通用设置”检查是安全网。请勿放宽正则表达式。/jetson-init-source - 内核DT更改:仅复合覆盖层,拆分所有权。禁止技能直接编辑
customize-*下的树内bsp_sources//.dts文件——所有内核DT更改必须作为片段添加到复合覆盖层插槽中(规则+原理)。复合.dtsi的内容由每个.dts技能所有;构建/Makefile/闪存配置注册由本技能所有(以复合customize-*存在为门控——因此.dts不会引用未构建的OVERLAY_DTB_FILE+=)。.dtbo - “注册复合自定义覆盖层”步骤的Makefile插入位置至关重要。必须插入到最后一个字面命名的条目之后;如果插入到
dtbo-y +=之后,会跳过$(old-dtbo)前缀处理,构建会静默丢弃您的$(addprefix makefile-path/,…)。正则表达式.dtbo可正确过滤;请勿放宽。^dtbo-y *+= *[a-zA-Z0-9] - “注册复合自定义覆盖层”步骤的首次接触需要原始导入。在新工作区中,覆盖层跟踪器是空的git初始化仓库——载体闪存配置会从导入并提交为
bsp_image,然后再进行定制提交。两次提交均需通过工作流验收门控。pristine: - 本SKILL.md中的shell代码片段避免使用裸。当带有参数调用时,工具会在将渲染后的提示交给模型前,将技能主体中的
$0替换为调用者的$0。请使用基于sed的行拼接或$0。请参阅awk -v ROW="$0"。references/composite-registration.md - 无覆盖层部署。构建输出产物保留在构建生成的位置;清单是与的约定。故意偏离原始的“覆盖层→部署”间接方式——可避免将完整构建输出集合纳入覆盖层跟踪器的git历史中。
jetson-promote-image - DT模式中的与
KERNEL_HEADERS。语义不同(源码树与目标树);请勿合并。“仅DT”步骤的代码片段按编写方式是正确的。KERNEL_OUTPUT - OOT模式前提条件:已构建的内核头文件。针对从未构建过的树手动调用会拒绝操作,并提示“先运行
oot(或kernel)”,而非产生令人困惑的构建错误。full
Examples
示例
Auto-detect mode from the dirty source tree (typical invocation):
/jetson-build-sourceForce 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 consolidationTypical 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根据脏源码树自动检测模式(典型调用):
/jetson-build-source强制指定单个模式(跳过自动检测):
/jetson-build-source dt # 仅重新构建NVIDIA DTBs
/jetson-build-source oot # 仅重新构建OOT模块
/jetson-build-source kernel # 重新构建内核Image + 树内模块
/jetson-build-source full # 重新构建所有内容 + 安装整合定制技能提交到内核端仓库后的典型链式调用(定制技能会自动调用本技能):
/jetson-customize-pcie ... # 提交到hardware/nvidia/.../nv-public
↓
/jetson-build-source # 从脏集合自动选择`dt`模式
↓
/jetson-promote-image # 读取.build-manifest.yaml,部署到bsp_image
↓
/jetson-flash-image # 刷写镜像Troubleshooting
故障排除
| Error | Cause | Solution |
|---|---|---|
| Toolchain field stale (path moved, install missing) | Re-run |
| | Use the DT-mode snippet in |
| R36.x Branch-A | The Common-setup safety net normally repairs it; if not, |
| Kernel source tree never prepared | Run |
| Edits uncommitted in a sub-repo but | Commit the edits, or re-run with an explicit mode argument ( |
Composite | Per-dir Makefile insertion landed after | See |
| Promote step copies stale baseline artifacts | Trace-to-dirty filter skipped after a manual | Only edit via a customize-* skill or |
| | |
| 错误 | 原因 | 解决方案 |
|---|---|---|
| 工具链字段过期(路径移动、安装缺失) | 重新运行 |
| | 严格使用 |
| R36.x Branch-A的 | 通用设置安全网通常会修复此问题;如果未修复,执行 |
手动调用 | 内核源码树从未准备过 | 先运行 |
提示 | 子仓库中有未提交的编辑,但 | 提交编辑,或使用显式模式参数重新运行(例如 |
复合 | 每个目录的Makefile插入位置在 | 请参阅 |
| 部署步骤复制了过期的基线产物 | 手动 | 仅通过 |
| | 根据 |
See also
另请参阅
- — per-mode
references/build-modes.mdsnippets + install consolidation.make - —
references/manifest-schema.md+.build-manifest.yamlschemas..build-state.yaml - — the "Register composite custom overlay" step full snippets + rationale.
references/composite-registration.md - — invariants, deploy patterns, performance hints.
references/long-tail-gotchas.md - — verbatim NVIDIA recipe, divergences, spec status.
references/upstream-recipe.md - — workspace edit protocol.
../../context/bsp-customization-workflow.md - — composite custom-overlay contract.
../../references/bsp-customization-kernel-dtb.md - — BPMP-DTB edit contract (routed around this skill).
../../references/bsp-customization-bpmp-dtb.md - — Setup; authors
../jetson-init-source/SKILL.md.source.toolchain - — Deploy promoter; reads this skill's manifest.
../jetson-promote-image/SKILL.md
- ——各模式的
references/build-modes.md代码片段 + 安装整合。make - ——
references/manifest-schema.md+.build-manifest.yaml模式。.build-state.yaml - ——“注册复合自定义覆盖层”步骤的完整代码片段 + 原理。
references/composite-registration.md - ——不变量、部署模式、性能提示。
references/long-tail-gotchas.md - ——NVIDIA的原始步骤、差异、规范状态。
references/upstream-recipe.md - ——工作区编辑协议。
../../context/bsp-customization-workflow.md - ——复合自定义覆盖层约定。
../../references/bsp-customization-kernel-dtb.md - ——BPMP-DTB编辑约定(绕过本技能)。
../../references/bsp-customization-bpmp-dtb.md - ——设置环节;生成
../jetson-init-source/SKILL.md。source.toolchain - ——部署推广器;读取本技能的清单。",
../jetson-promote-image/SKILL.md