jetson-derive-carrier
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesejetson-derive-carrier
jetson-derive-carrier
Customize first-run gate for any skill on a custom
carrier. Resolve the active target per
.
Refuse if no block, or if
is missing
( first). Template file create/copy rows land in a
single overlay-tracker commit and copy directly to the
custom-carrier-renamed target path — reference-named pristine files
are never staged (see Fork plan for the local rule, which
overrides the standard pristine + customization split from the
workflow);
conf-chain discovery follows
per-board conf dispatch.
Kernel base DTB is not forked — carrier deltas layer as a DT
overlay wired via .
customize-*target-platform-contract.mdcustom_carrier:<source.root_path>/Linux_for_Tegra/.gitjetson-init-sourceOVERLAY_DTB_FILEIdentifiers (from active profile): from
via
catalogue (unknown →
warn, fallback ); / from
; / from
; //
from . =
(NVIDIA convention → ;
warn + treat top-level as real + skip symlink-wrapper row if not a
symlink).
<chip>reference_devkit.module.idtegra234<module-id><module-sku>reference_devkit.module<carrier-id><carrier-sku>reference_devkit.carrier<custom-id><custom-sku><custom-flash-conf>custom_carrier<real-conf>readlink <bsp_image.root_path>/Linux_for_Tegra/<reference_devkit.flash_config><devkit>.conf<carrier>-<module>-a<rev>.conf<custom-id>pNNNN<custom-id-file-token>NNNN<custom-id>^p[0-9]{4}$<custom-id>p为自定义载板上的任意 skill定制首次运行入口。根据解析当前目标平台。拒绝执行的情况:配置中无块,或缺失(需先执行)。模板文件的创建/复制操作会合并为单个overlay-tracker提交,并直接复制到重命名后的自定义载板目标路径——参考命名的原始文件绝不会被暂存(本地规则详见复刻方案,该规则覆盖了工作流中标准的原始文件+定制拆分逻辑);配置链发现遵循每板配置分发规则。
内核基础DTB不会被复刻——载板差异以DT overlay形式分层,通过关联。
customize-*target-platform-contract.mdcustom_carrier:<source.root_path>/Linux_for_Tegra/.gitjetson-init-sourceOVERLAY_DTB_FILE标识符(来自当前配置文件):来自,通过目录获取(未知则警告,默认回退为);/来自;/来自;//来自。 = (NVIDIA惯例为 → ;若不是符号链接则警告,将顶层文件视为真实配置并跳过符号链接包装步骤)。
<chip>reference_devkit.module.idtegra234<module-id><module-sku>reference_devkit.module<carrier-id><carrier-sku>reference_devkit.carrier<custom-id><custom-sku><custom-flash-conf>custom_carrier<real-conf>readlink <bsp_image.root_path>/Linux_for_Tegra/<reference_devkit.flash_config><devkit>.conf<carrier>-<module>-a<rev>.conf<custom-id>pNNNN<custom-id>^p[0-9]{4}$<custom-id-file-token>NNNN<custom-id>Instructions
操作说明
The fork plan below is the instruction set: one discovery pass, then a
row-by-row fork of the per-board fileset, gated by the commit-message
preview before each .
git commit以下复刻方案即为操作指令:先执行一次发现扫描,再逐行复刻每板文件集,每次前会显示提交信息预览供确认。
git commitFork plan
复刻方案
Every produced by this skill — in the overlay tracker
() or the source repo — runs through
the
commit message preview gate.
Surface the staged file list + proposed message to the operator
and require accept / edit / cancel before each ; on
cancel leave the index staged for manual resolution.
git commitLinux_for_Tegra/hardware/git commitMaterialize renamed forks even when bytes do not change. For every
accepted fork-plan row, create and track the custom-carrier target path;
do not skip a missing target because the fork is only a rename/copy or is
byte-identical to the reference. This includes BCT forks such as pinmux,
GPIO/GPIOINT, padvoltage/PMC, misc, and MB2 misc. Skip only when the
Acceptance column allows it, the source is an explicit warn-and-skip
miss, or the expected target path is already tracked; in the last case,
report it as already derived and do not create an empty commit.
Template file create/copy rows squash into one overlay-tracker
commit, and reference-named pristine files are never staged. All
rows that materialize a new (template-derived) file in the overlay
tracker — board flash-conf, flash-conf symlink, MB1 BCT (pinmux,
GPIO/GPIOINT, padvoltage/PMC, misc), MB2 BCT (misc), BPMP DTB (when
opted in), nvpmodel, nvfancontrol — copy directly from
to
with any
content edits applied before staging. The reference-named
(-keyed) filename is never staged or
committed in the overlay tracker — only the custom-carrier-renamed
file is tracked. This overrides the standard pristine + customization
split from
commit batching.
All such rows land in a single overlay-tracker commit that adds:
(i) the custom-carrier-named files at their target paths with content
already applied, (ii) the flash-conf symlink, and (iii) the targeted
flash-conf content rewrites inside the renamed flash-conf for
/ / / /
/ (plus when BPMP DTB is opted
in). Rows that edit existing upstream files instead of creating
templates — the patch — and the overlay wire-up
( append to the just-created flash-conf fork,
treated as a temporally distinct phase per
commit batching)
remain separate commits per their own rows. The DT overlay skeleton
commits in , not the overlay tracker, so it is
unaffected. The commit message preview gate fires once on the
squashed commit; warn-and-skipped rows do not contribute, and if every
row in the bundle is already tracked the commit is omitted entirely.
<bsp_image.root_path>/Linux_for_Tegra/<rel>/<reference-name><source.root_path>/Linux_for_Tegra/<rel>/<custom-name><carrier-id>-<carrier-sku>PINMUX_CONFIGGPIO_CONFIGGPIOINT_CONFIGPMC_CONFIGMISC_CONFIGMB2_BCTBPFDTB_FILEnvpower.shOVERLAY_DTB_FILE+=bsp_sources/hardware/本skill生成的每一个——无论是在overlay tracker()还是源码仓库中——都会经过提交信息预览确认。向操作者展示暂存文件列表+拟提交信息,要求在每次前选择接受/编辑/取消;若选择取消,则保留暂存索引供手动处理。
git commitLinux_for_Tegra/hardware/git commit**即使文件内容未变更,也要生成重命名后的复刻文件。**对于每一条被接受的复刻方案行,创建并跟踪自定义载板的目标路径;即使仅为重命名/复制操作,或与参考文件内容完全一致,也不能跳过目标文件创建。这包括BCT复刻,如pinmux、GPIO/GPIOINT、padvoltage/PMC、misc以及MB2 misc。仅在以下情况跳过:适用条件允许跳过、源文件明确为警告并跳过的缺失项,或预期目标路径已被跟踪;最后一种情况会报告该文件已完成复刻,不会创建空提交。
模板文件的创建/复制操作合并为单个overlay-tracker提交,参考命名的原始文件绝不会被暂存。所有在overlay tracker中生成新的(基于模板的)文件的操作——板卡烧录配置、烧录配置符号链接、MB1 BCT(pinmux、GPIO/GPIOINT、padvoltage/PMC、misc)、MB2 BCT(misc)、BPMP DTB(若启用)、nvpmodel、nvfancontrol——都会直接从复制到,并在暂存前应用所有内容编辑。参考命名(以为关键字)的文件名绝不会在overlay tracker中被暂存或提交——仅跟踪重命名后的自定义载板文件。这覆盖了提交批处理中的标准原始文件+定制拆分逻辑。所有此类操作会合并为单个overlay-tracker提交,包含:(i) 自定义载板命名的文件已应用内容修改并处于目标路径;(ii) 烧录配置符号链接;(iii) 重命名后的烧录配置中针对/////(若启用BPMP DTB则额外包含)的定向内容改写。编辑现有上游文件而非创建模板的操作——补丁——以及overlay关联(向刚创建的烧录配置复刻文件追加,根据提交批处理视为时间上独立的阶段)仍会按各自步骤生成独立提交。DT overlay骨架提交在而非overlay tracker中,因此不受影响。合并提交会触发一次提交信息预览确认;警告并跳过的步骤不会纳入提交,若合并包中的所有步骤均已被跟踪则完全省略该提交。
<bsp_image.root_path>/Linux_for_Tegra/<rel>/<reference-name><source.root_path>/Linux_for_Tegra/<rel>/<custom-name><carrier-id>-<carrier-sku>PINMUX_CONFIGGPIO_CONFIGGPIOINT_CONFIGPMC_CONFIGMISC_CONFIGMB2_BCTBPFDTB_FILEnvpower.shOVERLAY_DTB_FILE+=bsp_sources/hardware/Discovery (single batched pass)
发现扫描(单次批处理)
Run one discovery pass; do not interleave with staging. Do not
truncate listings — every candidate filename in each scanned
directory must be visible to the matcher. , , ,
, and any other row-limiting filter are out of bounds for
this step; use / unclipped, or grep on the full output.
Truncating risks false warn-and-skip calls when the matching file
sits past the cutoff. Capture:
headtail| head -N| tail -Nls -1find- Flash-conf vars: /
DTB_FILE/TBCDTB_FILE/BPFDTB_FILE/PINMUX_CONFIG/PMC_CONFIG/GPIO_CONFIG.GPIOINT_CONFIG/DTB_FILEare captured for reference only so the overlay wire-up can deriveTBCDTB_FILEfor the overlay filename — they are never rewritten by this skill.<dtb-stem> - BCT at
.dts;bootloader/generic/BCT/siblings live one level up at.dtsi— NOT alongside.bootloader/ - nvpmodel: . nvfancontrol:
nvpmodel_<module-id>_<module-sku>*.conf.nvfancontrol_<module-id>_<module-sku>_<carrier-id>_<carrier-sku>.conf - anchors for (a)–(d):
nvpower.shcvb branch,<carrier-id>SKU<module-id>-<module-sku>,elifnvpmodel cascade,tegra<chip>nvfancontrol cascade.tegra<chip>
| File / category | Discovery | Acceptance | Fork rule |
|---|---|---|---|
| Board flash conf | | Always | Filename sub |
| Flash-conf symlink | Unconditional | Always (skip if | New symlink |
| MB1 BCT pinmux | | Always | Rename rule † |
| MB1 BCT GPIO | | Always | Rename rule † |
| MB1 BCT padvoltage | | Always | Rename rule † |
| MB1 BCT misc | | Always | Rename rule † |
| MB2 BCT misc | | Always | Rename rule † |
| Kernel DTB + source DTS | (reference only — see header) | Never forked | Base DTB stays at reference. No pristine binary copy in the overlay tracker; no source DTS fork in |
| DT overlay skeleton (NEW) | Unconditional | Always | Create |
| Per-dir Makefile registration | | Always | Append |
| Overlay wire-up | Unconditional | Always | Append |
| nvpmodel config | | Always | Filename: append |
| nvfancontrol config | | Always | Filename: substitute carrier portion (append |
| | Always | Pristine + single customization commit with 4 insertions: (a) cvb cascade |
| BPMP DTB | prebuilt at | Opt-in y/N, default N — module-level, usually shared with reference | Fork binary: pristine + filename sub |
¶ follow. Scan each captured for directives anywhere in the file (NVIDIA BSPs put them
inside BCT node bodies); carrier-keyed includes join the fork list.
Stop at one level.
#include.dts#include "..."† Rename rule. Carrier-keyed source (e.g.
) → filename sub
→ ; rewrite the
flash-conf variable (e.g. ) to the renamed filename in
the same customization commit. Module portion is preserved
verbatim from pristine — if pristine has , fork keeps
; if pristine has , fork keeps .
Never pin module-SKU on your own. Same rule for any other
wildcard in the carrier-SKU position when pristine uses it (e.g.
→ ). Module-keyed
source (e.g. ) → append
(underscore-form) or
(dash-form) plus an extra commit on
flash-conf fork rewriting the variable (e.g. ) to the
suffixed name. Content never substituted by default; prompt if
content holds a literal carrier-id-sku self-reference.
…-p3834-xxxx-p4071-0000.dts<carrier-id>-<carrier-sku><custom-id>-<custom-sku>PINMUX_CONFIGp3834-xxxxp3834-xxxxp3834-0008p3834-0008xxxxp4071-xxxxp1234-xxxx…-p3767-dp-a03.dtsi_<custom-id-file-token>_<custom-sku>-<custom-id>-<custom-sku>PINMUX_CONFIG‡ Overlay skeleton. DT plugin overlay () with one
at ; inside set
and . machine narrowing reads .
/plugin/;fragment@0target-path = "/"__overlay__model = "<custom_carrier.name> carrier board"compatible = "nvidia,<custom-id>-<custom-sku>+<module-id>-<module-sku>", "nvidia,<chip>"nvpower.shcompatible执行一次发现扫描;不要与暂存操作交错进行。不要截断列表——每个扫描目录中的所有候选文件名都必须能被匹配器识别。、、、及其他行限制过滤器在此步骤禁用;使用无截断的/,或对完整输出执行grep。截断可能导致匹配文件在截断范围外时出现错误的警告并跳过操作。需捕获以下内容:
headtail| head -N| tail -Nls -1find- 烧录配置变量:/
DTB_FILE/TBCDTB_FILE/BPFDTB_FILE/PINMUX_CONFIG/PMC_CONFIG/GPIO_CONFIG。GPIOINT_CONFIG/DTB_FILE仅用于参考,以便overlay关联推导overlay文件名的TBCDTB_FILE——本skill绝不会改写这些变量。<dtb-stem> - BCT 文件位于
.dts;bootloader/generic/BCT/同级文件位于上一级目录.dtsi——不在同一目录下。bootloader/ - nvpmodel:。nvfancontrol:
nvpmodel_<module-id>_<module-sku>*.conf。nvfancontrol_<module-id>_<module-sku>_<carrier-id>_<carrier-sku>.conf - 的锚点:(a)–(d):
nvpower.shcvb分支、<carrier-id>SKU<module-id>-<module-sku>、elifnvpmodel级联、tegra<chip>nvfancontrol级联。tegra<chip>
| 文件/类别 | 发现方式 | 适用条件 | 复刻规则 |
|---|---|---|---|
| 板卡烧录配置 | | 始终适用 | 文件名替换 |
| 烧录配置符号链接 | 无条件 | 始终适用(若 | 创建新符号链接 |
| MB1 BCT pinmux | | 始终适用 | 重命名规则 † |
| MB1 BCT GPIO | | 始终适用 | 重命名规则 † |
| MB1 BCT padvoltage | | 始终适用 | 重命名规则 † |
| MB1 BCT misc | | 始终适用 | 重命名规则 † |
| MB2 BCT misc | | 始终适用 | 重命名规则 † |
| 内核DTB + 源码DTS | 仅作参考——见头部说明 | 绝不复刻 | 基础DTB保持参考值。overlay tracker中不会复制原始二进制文件; |
| DT overlay骨架(新增) | 无条件 | 始终适用 | 创建 |
| 目录Makefile注册 | | 始终适用 | 在最后一个字面命名的 |
| Overlay关联 | 无条件 | 始终适用 | 向烧录配置复刻文件追加 |
| nvpmodel配置 | | 始终适用 | 文件名:追加 |
| nvfancontrol配置 | | 始终适用 | 文件名:替换载板部分(若源文件仅以模块为关键字则追加 |
| | 始终适用 | 原始文件+单个定制提交,包含4处插入:(a) 在参考分支前插入cvb级联 |
| BPMP DTB | 预编译文件位于 | 可选是/否,默认否——模块级文件,通常与参考开发板共享 | 复刻二进制文件:原始文件+文件名替换 |
¶ 追踪引用。扫描每个捕获的文件中任意位置的指令(NVIDIA BSP通常将其放在BCT节点体内);与载板相关的引用会加入复刻列表。仅追踪一层引用。
#include.dts#include "..."† 重命名规则。与载板相关的源文件(如)→ 文件名替换 → ;在同一定制提交中改写烧录配置变量(如)为新命名的文件名。模块部分完全保留原始内容——若原始文件包含,复刻文件保留;若原始文件包含,复刻文件保留。绝不能自行固定模块SKU。若原始文件在载板SKU位置使用通配符(如 → ),规则相同。以模块为关键字的源文件(如)→ 追加(下划线格式)或(连字符格式)并在烧录配置复刻文件的额外提交中改写变量(如)为带后缀的名称。默认不替换内容;若内容包含字面载板id-sku自引用则提示操作者。
…-p3834-xxxx-p4071-0000.dts<carrier-id>-<carrier-sku><custom-id>-<custom-sku>PINMUX_CONFIGp3834-xxxxp3834-xxxxp3834-0008p3834-0008xxxxp4071-xxxxp1234-xxxx…-p3767-dp-a03.dtsi_<custom-id-file-token>_<custom-sku>-<custom-id>-<custom-sku>PINMUX_CONFIG‡ Overlay骨架。DT插件overlay()包含一个位于的;在内设置和。通过读取来缩小机器范围。
/plugin/;target-path = "/"fragment@0__overlay__model = "<custom_carrier.name> carrier board"compatible = "nvidia,<custom-id>-<custom-sku>+<module-id>-<module-sku>", "nvidia,<chip>"nvpower.shcompatibleEdit verification
编辑验证
Re-grep after every / patch. silently no-ops on miss;
exit code 0 proves nothing. Multi-line replacements: use Python
, not multi-line (brittle to whitespace
drift, silent no-ops). Refuse to commit on verification miss.
sedsedstr.replace(old, new)sedSummary. Print forks per repo (count + commit SHAs), BPMP-DTB
decision, warn-and-skipped rows (mandatory source file missing on
this BSP — don't fail the run), overlay path written.
每次执行/补丁后重新执行grep检查。在匹配失败时会静默无操作;退出码0不代表编辑成功。多行替换:使用Python,而非多行(对空格变化敏感,易静默无操作)。验证失败时拒绝提交。
sedsedstr.replace(old, new)sed总结。打印每个仓库的复刻情况(数量+提交SHA)、BPMP-DTB选择、警告并跳过的步骤(当前BSP中缺失必需源文件——不会终止运行)、已写入的overlay路径。
Examples
示例
Trigger phrases the operator might use:
text
derive custom carrier
bootstrap custom carrier
fork carrier board from reference devkitMinimal block in the active profile that the skill
expects to find:
custom_carrier:yaml
custom_carrier:
id: p1234 # any token; need not be NVIDIA pNNNN style
sku: 0000
flash_config: p1234.conf
name: Acme Custom Carrier操作者可能使用的触发短语:
text
derive custom carrier
bootstrap custom carrier
fork carrier board from reference devkit本skill期望在当前配置文件中找到的最小块:
custom_carrier:yaml
custom_carrier:
id: p1234 # 任意标识;无需遵循NVIDIA pNNNN格式
sku: 0000
flash_config: p1234.conf
name: Acme Custom CarrierPurpose
用途
Customize the per-board fileset for a new carrier board so downstream
skills, , and the boot chain land on the
custom carrier instead of the reference devkit. Base DTB stays at the
reference; carrier deltas live in a DT overlay so a re-derive against
a new reference BSP only needs to re-run this skill.
customize-*nvpower.sh为新载板定制每板文件集,使下游 skill、和启动链指向自定义载板而非参考开发板。基础DTB保持参考值;载板差异通过DT overlay实现,因此针对新参考BSP重新复刻时只需再次运行本skill。
customize-*nvpower.shPrerequisites
前置条件
- Active profile resolved per
with a
target-platform-contract.mdblock (id, sku, flash-conf, friendly name).custom_carrier: - initialized — run
source.root_path/Linux_for_Tegra/.gitfirst; this skill refuses if the overlay tracker is missing./jetson-init-source - populated by
bsp_image.root_pathso the reference flash-conf symlink can be resolved./jetson-init-image - populated (module + carrier) so the rename rule has carrier-id/sku tokens to substitute away from.
reference_devkit:
- 当前配置文件已根据解析完成,且包含
target-platform-contract.md块(id、sku、烧录配置、友好名称)。custom_carrier: - 已初始化——需先运行
source.root_path/Linux_for_Tegra/.git;若overlay tracker缺失,本skill会拒绝执行。/jetson-init-source - 已通过
bsp_image.root_path填充,以便解析参考烧录配置符号链接。/jetson-init-image - 已填充(模块+载板),以便重命名规则有可替换的载板id/sku标识。
reference_devkit:
Limitations
限制
- Kernel base DTB and its source DTS are not forked — carrier
deltas must layer through the DT overlay wired via
.
OVERLAY_DTB_FILE - BPMP DTB fork is opt-in (default OFF). Most carrier swaps share the reference BPMP DTB; only opt in when board power/clock topology diverges.
- Flash-conf content substitution is targeted, not blanket. Vars
whose files this skill does not fork (,
DTB_FILE,TBCDTB_FILE,SCR_CONFIG,PMIC_CONFIG,DEVICEPROD_CONFIG,PROD_CONFIG,MINRATCHET_CONFIG, dynamicUPHY_CONFIG) stay at reference values — rewriting them would point at files that do not exist.OVERLAY_DTB_FILE+= - Custom-carrier IDs need not follow NVIDIA style; the p-stripped numeric token is derived only when the ID matches
pNNNN.^p[0-9]{4}$ - Does not customize module-level files. Use the relevant
skill for pinmux, clocks, fan curves, nvpmodel, PCIe, UPHY, USB, MGBE, or camera deltas.
jetson-customize-*
- 内核基础DTB及其源码DTS不会被复刻——载板差异必须通过关联的DT overlay实现。
OVERLAY_DTB_FILE - BPMP DTB复刻为可选(默认关闭)。大多数载板更换会共享参考BPMP DTB;仅当板卡电源/时钟拓扑不同时才启用。
- 烧录配置内容替换为定向替换,而非全局替换。本skill未复刻文件对应的变量(、
DTB_FILE、TBCDTB_FILE、SCR_CONFIG、PMIC_CONFIG、DEVICEPROD_CONFIG、PROD_CONFIG、MINRATCHET_CONFIG、动态UPHY_CONFIG)保持参考值——改写这些变量会指向不存在的文件。OVERLAY_DTB_FILE+= - 自定义载板ID无需遵循NVIDIA 格式;仅当ID匹配
pNNNN时才推导去除p前缀的数字标识。^p[0-9]{4}$ - 不会定制模块级文件。如需修改pinmux、时钟、风扇曲线、nvpmodel、PCIe、UPHY、USB、MGBE或相机,请使用相应的skill。
jetson-customize-*
Troubleshooting
故障排除
- Refuses with "no block" — declare the block in the active profile before re-running; the skill will not infer it.
custom_carrier: - Refuses with ".git missing in " — overlay tracker not initialized. Run
Linux_for_Tegra/first./jetson-init-source - "not a symlink" — NVIDIA convention is a
<real-conf>symlink to<devkit>.conf; if the top-level is the real conf, the skill warns, treats it as real, and skips the symlink-wrapper row. Not an error.<carrier>-<module>-a<rev>.conf - reported success but the edit is missing —
sedsilently no-ops on miss. The skill re-greps after every patch and refuses to commit on verification miss; for multi-line replacements switch to Pythonsed.str.replace - "chip: unknown" / fallback to — module ID is not in the catalogue; update the catalogue rather than override in the profile.
tegra234 - Commit message preview prompt blocks the run — expected gate per commit-batching; accept, edit, or cancel. On cancel the index is left staged for manual resolution.
- A mandatory source file is missing on this BSP — the row is recorded as warn-and-skipped in the summary; the rest of the run still completes.
- 提示“无块”并拒绝执行——重新运行前需在当前配置文件中声明该块;本skill不会自动推断。
custom_carrier: - 提示“中缺失.git”并拒绝执行——overlay tracker未初始化。需先运行
Linux_for_Tegra/。/jetson-init-source - 提示“不是符号链接”——NVIDIA惯例是
<real-conf>符号链接到<devkit>.conf;若顶层文件为真实配置,本skill会发出警告,将其视为真实配置并跳过符号链接包装步骤。这不是错误。<carrier>-<module>-a<rev>.conf - 报告成功但编辑内容缺失——
sed在匹配失败时会静默无操作。本skill会在每次补丁后重新执行grep检查,验证失败时拒绝提交;多行替换请改用Pythonsed。str.replace - 提示“chip: unknown” / 回退为——模块ID不在目录中;请更新目录而非在配置文件中覆盖。
tegra234 - 提交信息预览提示中断运行——这是提交批处理中的预期确认步骤;选择接受、编辑或取消。取消后会保留暂存索引供手动处理。
- 当前BSP中缺失必需源文件——该步骤会在总结中记录为警告并跳过;其余步骤仍会完成。