jetson-init-source
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInitialize BSP Customization Workspace
初始化BSP定制工作区
Overview
概述
This skill bootstraps the source-side workspace that customize-* / build
skills depend on: the overlay tracker (git repo for
pristine + customization commits), the mono-tree (kernel,
OOT, nvgpu, display, hwpm, hardware DTs), and a working NVIDIA
Crosstool-NG cross-compile prefix. It owns only the block in
the active profile and the on-disk source workspace under
(default: ).
Linux_for_Tegrabsp_sources/source:<source.root_path><workspace>/SourceResponsibilities:
- Optionally record a non-default .
source.root_path - Create or mount the overlay tracker.
Linux_for_Tegra - Materialize using the precedence in the "Materialize the BSP-sources baseline" step.
bsp_sources - Resolve and record .
source.toolchain - Clone extra user-defined repos from .
source.repos:
该技能会搭建定制类/构建类技能依赖的源码端工作区:覆盖跟踪器(用于存储原始提交与定制提交的Git仓库)、单目录树(包含内核、OOT、nvgpu、显示、hwpm、硬件设备树),以及可用的NVIDIA Crosstool-NG交叉编译前缀。它仅负责激活配置文件中的块,以及下的磁盘源码工作区(默认路径:)。
Linux_for_Tegrabsp_sources/source:<source.root_path><workspace>/Source职责:
- 可选记录非默认的。
source.root_path - 创建或挂载覆盖跟踪器。
Linux_for_Tegra - 按照「生成BSP-sources基线」步骤中的优先级生成。
bsp_sources - 解析并记录。
source.toolchain - 从克隆用户定义的额外仓库。
source.repos:
When to invoke
调用时机
- The user asks to bootstrap, init, or sync the BSP customization workspace.
- A downstream customization skill refused with "no workspace
tracker at ".
<source.root_path>/Linux_for_Tegra/ - After (Setup's next step on a fresh target).
jetson-init-image
- 用户要求引导、初始化或同步BSP定制工作区时。
- 下游定制技能返回错误「处无工作区跟踪器」时。
<source.root_path>/Linux_for_Tegra/ - 执行之后(全新目标设备的下一步设置操作)。
jetson-init-image
Procedure
操作流程
Quick-start prefill mapping
快速启动预填充映射
Follow the shared
contract.
This skill has source-specific mappings:
quick_start_prefill- maps to the Branch-A archive candidate.
quick_start_prefill.source.public_sources_archive - maps to proposed
quick_start_prefill.source.reposentries; validate reserved keys andsource.repos:/url:mutual exclusion before writing.archive: - may be a cross-compile prefix, a
quick_start_prefill.source.toolchainpath, a containinggccdirectory, anbin/archive path, orx-tools.tbz2.skip
This skill remains the only owner of , ,
and profile writes.
source.root_pathsource.repos:source.toolchain遵循共享的协议。该技能有特定于源码的映射规则:
quick_start_prefill- 映射到Branch-A归档候选。
quick_start_prefill.source.public_sources_archive - 映射到建议的
quick_start_prefill.source.repos条目;写入前需验证保留键以及source.repos:/url:的互斥性。archive: - 可以是交叉编译前缀、
quick_start_prefill.source.toolchain路径、包含gcc的目录、bin/归档路径或x-tools.tbz2。skip
该技能是唯一有权修改、和配置文件的模块。
source.root_pathsource.repos:source.toolchainResolve the active target + paths
解析激活目标与路径
Resolve the active profile + workspace defaults per the contract in
.
../../context/target-platform-contract.md- Refuse if does not contain
<bsp_image.root_path>(BSP not extracted — route toLinux_for_Tegra/)./jetson-init-image - If the profile has , use it. Otherwise
source.root_path:defaults to<source.root_path>; use that default silently and do not write<workspace>/Sourceto the profile. Ask only for an explicit custom path, unrelated content at the default path, or an unwritable parent.source.root_path:
Read (if present) into a map keyed by entry name,
each carrying optional , , , . Reserved keys:
(overlay tracker), (kernel-source
repo). Every other key is an extra user-defined repo.
source.repos:urlrefsubdirpathLinux_for_Tegrabsp_sources根据中的协议解析激活配置文件与工作区默认值。
../../context/target-platform-contract.md- 如果不包含
<bsp_image.root_path>,则拒绝执行(引导至Linux_for_Tegra/)。/jetson-init-image - 如果配置文件中有,则使用该路径。否则
source.root_path:默认设为<source.root_path>;静默使用该默认值,不向配置文件写入<workspace>/Source。仅当用户要求显式自定义路径、默认路径存在无关内容或父目录不可写时才询问。source.root_path:
将(如果存在)读取为以条目名称为键的映射,每个条目包含可选的、、、。保留键包括:(覆盖跟踪器)、(内核源码仓库)。其余所有键均为用户定义的额外仓库。
source.repos:urlrefsubdirpathLinux_for_Tegrabsp_sources(Optional) prompt for source.root_path
override
source.root_path(可选)提示覆盖source.root_path
source.root_pathOnly when is absent from the profile and one of the
override conditions above applies:
source.root_path: default =source.root_path. Press Enter to accept, or enter an absolute path to override.<workspace>/Source
- On Enter — keep the default; do not touch the profile.
- On override path — validate the closest existing parent is
writable; refuse and re-prompt if not. Edit
in place to add/update
target-platform/<active>.yaml. Preserve all other blocks, comments, and quoting — use a round-tripping YAML loader (e.g.source.root_path:).ruamel.yaml
Fires at most once per profile. Otherwise create as
needed and continue without prompting.
<workspace>/Source仅当配置文件中缺少且满足上述覆盖条件之一时触发:
source.root_path: 默认值 =source.root_path。按Enter键接受默认值,或输入绝对路径进行覆盖。<workspace>/Source
- 按Enter — 保留默认值;不修改配置文件。
- 输入覆盖路径 — 验证最近的现有父目录是否可写;如果不可写则拒绝并重新提示。使用支持往返的YAML加载器(如),在原地编辑
ruamel.yaml以添加/更新target-platform/<active>.yaml。保留所有其他块、注释和引号格式。source.root_path:
每个配置文件最多触发一次。否则按需创建并继续执行,无需提示。
<workspace>/SourceMaterialize Linux_for_Tegra
Linux_for_Tegra生成Linux_for_Tegra
Linux_for_TegraMount path is canonical: .
<source.root_path>/Linux_for_Tegra/Default (no entry):
source.repos.Linux_for_Tegrabash
LFT="<source.root_path>/Linux_for_Tegra"
mkdir -p "$LFT"
[ -d "$LFT/.git" ] || git -C "$LFT" initEmpty tracker. Do not commit anything here — pristine imports
happen file-by-file when customization skills run.
Override (, , optional ):
urlrefsubdirbash
undefined挂载路径为标准路径:。
<source.root_path>/Linux_for_Tegra/默认情况(无条目):
source.repos.Linux_for_Tegrabash
LFT="<source.root_path>/Linux_for_Tegra"
mkdir -p "$LFT"
[ -d "$LFT/.git" ] || git -C "$LFT" init空跟踪器。请勿在此处提交任何内容 — 原始导入操作会在定制技能运行时逐文件执行。
覆盖情况(指定、,可选):
urlrefsubdirbash
undefinedClone the user's repo to a side location, then mount the
将用户仓库克隆到侧边位置,然后将预期目录(子目录或仓库根目录)挂载到标准路径。
expected tree (subdir or repo root) at the canonical path.
—
CLONE="<source.root_path>/.repos/Linux_for_Tegra"
git clone <url> -b <ref> "$CLONE"
ln -s "$CLONE/<subdir or .>" "<source.root_path>/Linux_for_Tegra"
If the mount already exists with valid git state, skip; refuse if it
exists with unrelated content.CLONE="<source.root_path>/.repos/Linux_for_Tegra"
git clone <url> -b <ref> "$CLONE"
ln -s "$CLONE/<subdir or .>" "<source.root_path>/Linux_for_Tegra"
如果挂载已存在且Git状态有效,则跳过;如果挂载存在但包含无关内容,则拒绝执行。Materialize the BSP-sources baseline
生成BSP-sources基线
Three branches, dispatched in precedence order against the
profile entry :
source.repos.bsp_sources| Order | Profile state | Branch |
|---|---|---|
| 1 | | C. Customer git clone (explicit override always wins) |
| 2 | | A. Local archive extraction (default) |
| 3 | Entry absent AND no local archive | B. |
url:archive:Branch A is the preferred default because it sidesteps NVIDIA git
egress entirely (the most common Setup failure mode). Branch B
exists for fresh workspaces with no pre-downloaded tarball.
Branch C is for customer forks of the whole BSP layout.
三种分支模式,根据配置文件条目按优先级顺序触发:
source.repos.bsp_sources| 顺序 | 配置文件状态 | 分支模式 |
|---|---|---|
| 1 | 设置了 | C. 客户Git克隆(显式覆盖始终优先) |
| 2 | 设置了 | A. 本地归档提取(默认模式) |
| 3 | 条目缺失且无本地归档 | B. |
url:archive:Branch A是首选默认模式,因为它完全避开了NVIDIA Git出口(这是设置过程中最常见的失败原因)。Branch B适用于没有预下载压缩包的全新工作区。Branch C适用于客户对整个BSP布局的分支版本。
Branch A — Local archive extraction (default)
Branch A — 本地归档提取(默认模式)
Default branch: extract a pre-downloaded into
as a single mono-repo ( +
pristine commit). See
for the full archive shape, path-resolution rules, and the extraction
script (including the Tegra OOT Makefile force-replace workaround for
R36.x).
public_sources.tbz2<source.root_path>/bsp_sources/git initreferences/branch-a-extraction.mdBranches B and C may produce per-component repos instead; downstream
build logic still walks the canonical sub-paths under
.
<source.root_path>/bsp_sources/默认分支:将预下载的提取到,作为单一仓库( + 原始提交)。完整归档结构、路径解析规则以及提取脚本(包括针对R36.x版本的Tegra OOT Makefile强制替换解决方案)请参考。
public_sources.tbz2<source.root_path>/bsp_sources/git initreferences/branch-a-extraction.mdBranch B和C可能会生成按组件划分的仓库;下游构建逻辑仍会遍历下的标准子路径。
<source.root_path>/bsp_sources/Branch B — source_sync.sh
(fallback)
source_sync.shBranch B — source_sync.sh
(fallback模式)
source_sync.shRuns only when no local archive is found and no is set.
Create the mount directory under
and run from the extracted BSP with two flags:
url:bsp_sources/<source.root_path>source_sync.shbash
mkdir -p "<source.root_path>/bsp_sources"
bash "<bsp_image.root_path>/Linux_for_Tegra/source/source_sync.sh" \
-d "<source.root_path>/bsp_sources" \
-t "jetson_<major.minor>"- — write clones into the
-d <source.root_path>/bsp_sourcessubdir of the workspace, so the on-disk folder matches the schema key. Withoutbsp_sources/, the script writes under its own directory (the BSP itself) — wrong for the overlay model.-d - — pin the tag to the BSP release line. Derive from
-t jetson_<major.minor>by truncating to the first two dotted components:bsp_image.version→"38.4.0". Tag-format fallback: if rejected, tryjetson_38.4(older L4T sometimes uses the full form). If that also fails, surface the error and stop — never fall back to "latest" silently.jetson_<bsp_image.version>
Refuse if does not exist: re-run
to repopulate .
source_sync.sh/jetson-init-imageLinux_for_Tegra/source/source_sync.shFailed to clonegitlab.com/nvidia/nv-tegranv-tegra.nvidia.compublic_sources.tbz2/quick-start仅当未找到本地归档且未设置时运行。在下创建挂载目录,并使用两个标志运行已提取BSP中的:
url:<source.root_path>bsp_sources/source_sync.shbash
mkdir -p "<source.root_path>/bsp_sources"
bash "<bsp_image.root_path>/Linux_for_Tegra/source/source_sync.sh" \
-d "<source.root_path>/bsp_sources" \
-t "jetson_<major.minor>"- — 将克隆内容写入工作区的
-d <source.root_path>/bsp_sources子目录,确保磁盘文件夹与架构键匹配。如果不使用bsp_sources/,脚本会写入自身目录(BSP目录) — 这不符合覆盖模型。-d - — 将标签固定到BSP发布系列。从
-t jetson_<major.minor>派生,截断为前两个点分组件:bsp_image.version→"38.4.0"。标签格式 fallback:如果被拒绝,尝试jetson_38.4(旧版L4T有时使用完整格式)。如果仍然失败,则显示错误并停止 — 绝不静默回退到"latest"。jetson_<bsp_image.version>
如果不存在则拒绝执行:重新运行以重新填充。
source_sync.sh/jetson-init-imageLinux_for_Tegra/source/即使所有克隆失败,也会返回0 — 通过统计输出中的行数进行验证,如果行数非零则拒绝执行。普遍失败的最可能原因是git出口被阻止,无法访问 / ;需明确告知用户,并引导用户通过下载以使用Branch A。
source_sync.shFailed to clonegitlab.com/nvidia/nv-tegranv-tegra.nvidia.com/quick-startpublic_sources.tbz2Branch C — Customer git clone (url:
override)
url:Branch C — 客户Git克隆(url:
覆盖)
url:Triggered by an explicit field. Clone the customer repo once
and expose its canonical kernel-side sub-paths under
. The canonical sub-path list is
read from source_sync.sh's at runtime — do not
hard-code it, so future NVIDIA additions/removals propagate
automatically:
url:<source.root_path>/bsp_sources/SOURCE_INFObash
undefined由显式的字段触发。克隆一次客户仓库,并将其标准内核端子路径暴露在下。标准子路径列表在运行时从source_sync.sh的读取 — 请勿硬编码,以便自动适配NVIDIA未来的添加/移除操作:
url:<source.root_path>/bsp_sources/SOURCE_INFObash
undefinedParse canonical sub-paths from source_sync.sh's SOURCE_INFO
从source_sync.sh的SOURCE_INFO解析标准子路径
(only the kernel-side entries marked k:
in the second field).
k:(仅第二个字段标记为k:
的内核端条目)。
k:SUBPATHS=$(grep -oP '^\sk:[^:]+:'
"<bsp_image.root_path>/Linux_for_Tegra/source/source_sync.sh"
| sed 's/^\sk://; s/:$//')
"<bsp_image.root_path>/Linux_for_Tegra/source/source_sync.sh"
| sed 's/^\sk://; s/:$//')
mkdir -p "<source.root_path>/bsp_sources"
CLONE="<source.root_path>/.repos/bsp_sources"
git clone <url> -b <ref> "$CLONE"
ROOT="$CLONE/<subdir or .>"
for SUB in $SUBPATHS; do
[ -d "$ROOT/$SUB" ] &&
ln -s "$ROOT/$SUB" "<source.root_path>/bsp_sources/$SUB" done
ln -s "$ROOT/$SUB" "<source.root_path>/bsp_sources/$SUB" done
Report any canonical sub-path expected for the active chip family
but not present inside the customer repo (warn, don't refuse —
customer may legitimately not have all repos).SUBPATHS=$(grep -oP '^\sk:[^:]+:'
"<bsp_image.root_path>/Linux_for_Tegra/source/source_sync.sh"
| sed 's/^\sk://; s/:$//')
"<bsp_image.root_path>/Linux_for_Tegra/source/source_sync.sh"
| sed 's/^\sk://; s/:$//')
mkdir -p "<source.root_path>/bsp_sources"
CLONE="<source.root_path>/.repos/bsp_sources"
git clone <url> -b <ref> "$CLONE"
ROOT="$CLONE/<subdir or .>"
for SUB in $SUBPATHS; do
[ -d "$ROOT/$SUB" ] &&
ln -s "$ROOT/$SUB" "<source.root_path>/bsp_sources/$SUB" done
ln -s "$ROOT/$SUB" "<source.root_path>/bsp_sources/$SUB" done
如果客户仓库中缺少当前芯片系列所需的标准子路径,需进行报告(仅警告,不拒绝执行 — 客户可能合法地不需要所有仓库)。Resolve cross-compile toolchain
解析交叉编译工具链
The downstream reads from
this profile and exports it as . This step must
land a valid prefix before init-source returns, or any subsequent
kernel / OOT / DT build will refuse.
jetson-build-sourcesource.toolchainCROSS_COMPILENVIDIA's official Crosstool-NG Toolchain gcc is the canonical
toolchain for L4T. owns any network fetch of
; this skill only discovers, extracts, validates, and
writes the resolved prefix. Resolution follows a three-step ladder:
jetson-download-bspx-tools.tbz2下游会从配置文件读取并将其导出为。此步骤必须在init-source返回前确定有效的前缀,否则后续内核/OOT/DT构建将拒绝执行。
jetson-build-sourcesource.toolchainCROSS_COMPILENVIDIA官方的Crosstool-NG Toolchain gcc是L4T的标准工具链。负责网络获取;该技能仅负责发现、提取、验证并写入解析后的前缀。解析遵循三步流程:
jetson-download-bspx-tools.tbz2Auto-discover
自动发现
Look under for the Crosstool-NG
layout — typically one of:
<workspace>/toolchain/x-tools/<workspace>/toolchain/x-tools/aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
<workspace>/toolchain/x-tools/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-gccGlob: .
If exactly one match, bind:
<workspace>/toolchain/x-tools/aarch64-*-linux-gnu/bin/aarch64-*-linux-gnu-gccbash
TC_PREFIX=<absolute path to that .../bin/<triple>-> # trailing dash mandatorySkip to "Write to profile" below. If zero matches, fall through
to "Auto-extract from " below. If multiple, refuse with the list and ask the user to
remove the unwanted ones (we never pick one silently among
ambiguous installs — different Crosstool-NG flavors produce ABI-
incompatible binaries).
Downloads/x-tools.tbz2在下查找Crosstool-NG布局 — 通常为以下路径之一:
<workspace>/toolchain/x-tools/<workspace>/toolchain/x-tools/aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
<workspace>/toolchain/x-tools/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-gcc使用通配符:。如果恰好找到一个匹配项,则绑定:
<workspace>/toolchain/x-tools/aarch64-*-linux-gnu/bin/aarch64-*-linux-gnu-gccbash
TC_PREFIX=<该.../bin/<triple>-的绝对路径> # 必须包含末尾的短横线跳至下方的「写入配置文件」步骤。如果未找到匹配项,则继续执行「从自动提取」步骤。如果找到多个匹配项,则拒绝执行并列出所有匹配项,要求用户移除不需要的版本(我们从不静默选择模糊安装中的某一个 — 不同Crosstool-NG版本会生成ABI不兼容的二进制文件)。
Downloads/x-tools.tbz2Auto-extract from Downloads/x-tools.tbz2
Downloads/x-tools.tbz2从Downloads/x-tools.tbz2
自动提取
Downloads/x-tools.tbz2If exists (mirrors the
Branch-A pattern in the "Materialize the BSP-sources baseline" step — air-gapped /
no-egress users drop archives there):
<workspace>/Downloads/x-tools.tbz2public_sources.tbz2bash
file -b "<workspace>/Downloads/x-tools.tbz2" | grep -q "bzip2 compressed" || \
refuse "<workspace>/Downloads/x-tools.tbz2 is not a bzip2 tarball"
mkdir -p "<workspace>/toolchain"
tar xjf "<workspace>/Downloads/x-tools.tbz2" -C "<workspace>/toolchain"Then re-run the "Auto-discover" pass above. Refuse if extraction succeeds
but no is produced (archive
content doesn't match the Crosstool-NG layout).
x-tools/aarch64-*-linux-gnu/bin/如果存在(与「生成BSP-sources基线」步骤中的Branch-A模式类似 — 离线/无出口用户可将归档放置在此处):
<workspace>/Downloads/x-tools.tbz2public_sources.tbz2bash
file -b "<workspace>/Downloads/x-tools.tbz2" | grep -q "bzip2 compressed" || \
refuse "<workspace>/Downloads/x-tools.tbz2不是bzip2压缩包"
mkdir -p "<workspace>/toolchain"
tar xjf "<workspace>/Downloads/x-tools.tbz2" -C "<workspace>/toolchain"然后重新执行上方的「自动发现」步骤。如果提取成功但未生成,则拒绝执行(归档内容不符合Crosstool-NG布局)。
x-tools/aarch64-*-linux-gnu/bin/Prompt the user
提示用户
If both Auto-discover and Auto-extract came up empty, ask:
No Crosstool-NG toolchain found ator in<workspace>/toolchain/.<workspace>/Downloads/x-tools.tbz2Reply with one of:
- absolute path to your
binary or its containingaarch64-*-linux-gnu-gccdirectory,bin/ to abort.cancelTo fetch the archive instead, cancel this run, run, then re-run/jetson-download-bsp./jetson-init-source
For a path reply, validate via . Refuse
and re-prompt on failure.
[ -f "${TC_PREFIX}gcc" ]如果自动发现和自动提取均失败,则询问:
在或<workspace>/toolchain/中未找到Crosstool-NG工具链。<workspace>/Downloads/x-tools.tbz2请回复以下内容之一:
二进制文件的绝对路径或其所在的aarch64-*-linux-gnu-gcc目录路径bin/ 以中止操作cancel如果需要获取归档,请取消本次运行,执行,然后重新运行/jetson-download-bsp。/jetson-init-source
对于路径回复,通过进行验证。如果验证失败,则拒绝并重新提示。
[ -f "${TC_PREFIX}gcc" ]Write to profile
写入配置文件
Once resolves and exists, write it
into the active profile using a round-tripping YAML loader:
$TC_PREFIX${TC_PREFIX}gccyaml
source:
toolchain: <TC_PREFIX> # absolute, with trailing dashIf is otherwise empty (no override, no
entries), the block is now non-empty and stays
in the profile. Future runs skip the "Resolve cross-compile toolchain" step
if is already set and points at a working .
source:root_pathrepos:source:jetson-init-sourcesource.toolchaingcc一旦解析完成且存在,使用支持往返的YAML加载器将其写入激活配置文件:
$TC_PREFIX${TC_PREFIX}gccyaml
source:
toolchain: <TC_PREFIX> # 绝对路径,包含末尾的短横线如果块原本为空(无覆盖,无条目),则块现在变为非空并保留在配置文件中。如果已设置且指向可用的,未来的运行将跳过「解析交叉编译工具链」步骤。
source:root_pathrepos:source:source.toolchaingccjetson-init-sourceClone extra user-defined repos
克隆用户定义的额外仓库
For each entry under whose name is not
or :
source.repos:Linux_for_Tegrabsp_sourcesbash
MOUNT="<source.root_path>/<entry.path or entry.name>"
if [ -n "<entry.subdir>" ]; then
CLONE="<source.root_path>/.repos/<entry.name>"
git clone <entry.url> -b <entry.ref> "$CLONE"
ln -s "$CLONE/<entry.subdir>" "$MOUNT"
else
git clone <entry.url> -b <entry.ref> "$MOUNT"
fiRefuse if a mount path already exists with unrelated content.
对于下名称不是或的每个条目:
source.repos:Linux_for_Tegrabsp_sourcesbash
MOUNT="<source.root_path>/<entry.path or entry.name>"
if [ -n "<entry.subdir>" ]; then
CLONE="<source.root_path>/.repos/<entry.name>"
git clone <entry.url> -b <entry.ref> "$CLONE"
ln -s "$CLONE/<entry.subdir>" "$MOUNT"
else
git clone <entry.url> -b <entry.ref> "$MOUNT"
fi如果挂载路径已存在且包含无关内容,则拒绝执行。
Summary
总结
Print:
- Resolved ,
<workspace>, and<bsp_image.root_path>.<source.root_path> - For each materialized component: created, reused, skipped, or refused.
- For : branch selected plus key evidence (archive path,
bsp_sourcesfailure count, or clone URL/ref).source_sync.sh - Toolchain prefix, resolution source, and first line.
${TC_PREFIX}gcc --version - Reminder that customize-* skills stage future BSP edits in
; promote is what later copies committed overlay changes into
<source.root_path>/Linux_for_Tegra/.bsp_image
If a downstream skill triggered this run, tell the user to re-issue
their original request.
打印以下内容:
- 解析后的、
<workspace>和<bsp_image.root_path>。<source.root_path> - 每个生成组件的状态:已创建、已复用、已跳过或已拒绝。
- 的分支选择情况及关键依据(归档路径、
bsp_sources失败次数或克隆URL/ref)。source_sync.sh - 工具链前缀、解析来源以及的第一行输出。
${TC_PREFIX}gcc --version - 提醒用户:定制类技能会将未来的BSP修改暂存到;后续的promote操作会将已提交的覆盖变更复制到
<source.root_path>/Linux_for_Tegra/。bsp_image
如果本次运行由下游技能触发,告知用户重新发出原始请求。
Gotchas
注意事项
- and
Linux_for_Tegramount paths are canonical.bsp_sourcesapplies only to extra user-defined repos.path: - The default tracker is intentionally empty; do not pre-populate it.
Linux_for_Tegra - precedence is
bsp_sources→url:→ auto-discoveredarchive:→Downloads/public_sources.tbz2.source_sync.shandurl:are mutually exclusive.archive: - Branch A auto-discovery does not prompt and is not written back to the
profile. Persist it only with .
source.repos.bsp_sources.archive: - Branch A collision. Inner tarballs in
$DEST/Makefileship two files namedpublic_sources.tbz2: the Tegra orchestrator (Makefile) and the dGPU/OpenRM proprietary Makefile (kernel_oot_modules_src.tbz2). Alphabetical extraction order lets the dGPU one win on R36.x; downstream arm64 cross-builds then fail withnvidia_kernel_display_driver_source_without_ root_dir.tbz2. Step 3a force-replaces from'-mlittle-endian' unrecognizedwhen the Tegra<bsp_image>/Linux_for_Tegra/source/Makefilesignature is missing. R38+ extractions already match; the check is a no-op there.modules: hwpm nvidia-oot nvgpu nvidia-display - Branch C customer repos must expose the canonical sub-path layout, optionally shifted by
source_sync.sh.subdir: - Derive the tag from
source_sync.shasbsp_image.versionfirst; never fall back to an unpinned latest.jetson_<major.minor> - owns network downloads of
jetson-download-bspandpublic_sources.tbz2; this skill consumes local archives only.x-tools.tbz2 - must be an NVIDIA Crosstool-NG prefix with trailing dash and a working
source.toolchain. Never silently use${prefix}gcc.$PATH - Use a round-tripping YAML writer for profile edits.
- 和
Linux_for_Tegra的挂载路径为标准路径。bsp_sources仅适用于用户定义的额外仓库。path: - 默认的跟踪器故意为空;请勿预先填充内容。
Linux_for_Tegra - 的优先级为
bsp_sources→url:→ 自动发现的archive:→Downloads/public_sources.tbz2。source_sync.sh和url:互斥。archive: - Branch A自动发现不会提示,也不会写回配置文件。仅当设置时才会持久化。
source.repos.bsp_sources.archive: - Branch A的冲突。
$DEST/Makefile中的内部压缩包包含两个名为public_sources.tbz2的文件:Tegra编排器(Makefile)和dGPU/OpenRM专有Makefile(kernel_oot_modules_src.tbz2)。在R36.x版本中,按字母顺序提取会让dGPU的Makefile覆盖Tegra的;下游arm64交叉构建随后会因nvidia_kernel_display_driver_source_without_root_dir.tbz2失败。步骤3a会在缺少Tegra的'-mlittle-endian' unrecognized签名时,从modules: hwpm nvidia-oot nvgpu nvidia-display强制替换。R38+版本的提取已修复此问题,该检查会自动跳过。<bsp_image>/Linux_for_Tegra/source/Makefile - Branch C的客户仓库必须暴露定义的标准子路径布局,可通过
source_sync.sh调整根目录。subdir: - 从派生
bsp_image.version的标签时,优先使用source_sync.sh;绝不回退到未固定的latest版本。jetson_<major.minor> - 负责网络下载
jetson-download-bsp和public_sources.tbz2;该技能仅使用本地归档。x-tools.tbz2 - 必须是带有末尾短横线的NVIDIA Crosstool-NG前缀,且
source.toolchain可用。绝不静默使用${prefix}gcc。$PATH - 编辑配置文件时使用支持往返的YAML写入器。
Prerequisites
前置条件
- Active target profile resolved per
.
../../context/target-platform-contract.md - already run so
/jetson-init-imageis recorded (Branch Bbsp_image.versiontag derives from it).source_sync.sh - For Branch A: a local (and optionally
public_sources.tbz2) staged underx-tools.tbz2.Downloads/ - For Branch C: customer Git access to the override repo URL.
- 根据解析激活目标配置文件。
../../context/target-platform-contract.md - 已运行,因此
/jetson-init-image已记录(Branch B的bsp_image.version标签由此派生)。source_sync.sh - 对于Branch A:下已放置本地
Downloads/(可选public_sources.tbz2)。x-tools.tbz2 - 对于Branch C:客户拥有覆盖仓库URL的Git访问权限。
Limitations
限制
- Owns only the block; never edits
source:,bsp_image,reference_devkit, orcustom_carrier.documents - Network egress only for Branch B () and Branch C (customer Git clone); Branch A is fully offline.
source_sync.sh - Refuses to silently substitute a system toolchain — the NVIDIA Crosstool-NG prefix must be present or extractable.
- 仅负责块;绝不修改
source:、bsp_image、reference_devkit或custom_carrier。documents - 仅在Branch B()和Branch C(客户Git克隆)时使用网络出口;Branch A完全离线。
source_sync.sh - 拒绝静默替换系统工具链 — 必须存在或可提取NVIDIA Crosstool-NG前缀。
Troubleshooting
故障排除
- not found — re-stage
${toolchain}gccunderx-tools.tbz2and rerun, or pass a verified absolute prefix path.Downloads/ - cannot resolve
source_sync.shtag — the recordedjetson_<major.minor>is wrong; re-runbsp_image.versionto refresh it./jetson-init-image - shows uncommitted hand-edits — abort and ask the user to commit or stash; this skill expects a clean tracker.
Linux_for_Tegra/.git - Branch C clone missing canonical sub-paths — repo layout doesn't
match ; set
source_sync.shto the right sub-root or fall back to multi-repo overrides undersubdir:.source.repos:
- 未找到 — 将
${toolchain}gcc重新放置到x-tools.tbz2下并重新运行,或传入已验证的绝对前缀路径。Downloads/ - 无法解析
source_sync.sh标签 — 记录的jetson_<major.minor>错误;重新运行bsp_image.version以刷新。/jetson-init-image - 显示未提交的手动修改 — 中止操作,要求用户提交或暂存修改;该技能要求跟踪器处于干净状态。
Linux_for_Tegra/.git - Branch C克隆缺少标准子路径 — 仓库布局与不匹配;设置
source_sync.sh为正确的子根目录,或回退到subdir:下的多仓库覆盖。source.repos:
References
参考资料
- —
../../references/platform_template.yamlschema, including thesource:map.repos: - — target-platform contract.
../../context/target-platform-contract.md - — Workspace edit protocol.
../../context/bsp-customization-workflow.md - — authors the profile this skill consumes.
../jetson-init-target/SKILL.md - — extracts the BSP and back-fills
../jetson-init-image/SKILL.md; run before this skill.bsp_image.version
- —
../../references/platform_template.yaml架构,包括source:映射。repos: - — 目标平台协议。
../../context/target-platform-contract.md - — 工作区编辑协议。
../../context/bsp-customization-workflow.md - — 该技能所使用的配置文件的创建者。
../jetson-init-target/SKILL.md - — 提取BSP并回填
../jetson-init-image/SKILL.md;需在该技能之前运行。bsp_image.version