jetson-print-bsp-info
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesejetson-print-bsp-info
jetson-print-bsp-info
Prints a concise summary of a Jetson Linux_for_Tegra (BSP) tree on the host PC.
This skill is intended as a reference example for the repo and the NVIDIA-wide skills CI. It performs read-only inspection — no flashing, no rootfs changes.
jetson-bsp-skills在主机PC上打印Jetson Linux_for_Tegra(BSP)目录树的简明摘要。
本技能旨在作为仓库和NVIDIA全平台技能CI的参考示例。它仅执行只读检查——不进行刷机操作,也不修改rootfs。
jetson-bsp-skillsPurpose
用途
Capture a baseline snapshot of a Linux_for_Tegra BSP tree (release, board configs, rootfs state) before flashing, so issues like "wrong L4T version" or "rootfs never populated" are caught early.
在刷机前捕获Linux_for_Tegra BSP目录树的基准快照(版本、板卡配置、rootfs状态),以便尽早发现诸如“L4T版本错误”或“rootfs未填充”之类的问题。
When to use
使用场景
- A user has unpacked a Jetson BSP tarball and wants to confirm the L4T version, supported boards, and rootfs state before flashing.
- You need a quick sanity check that a directory looks valid (expected scripts and config files present).
Linux_for_Tegra/
- 用户已解压Jetson BSP压缩包,希望在刷机前确认L4T版本、支持的板卡以及rootfs状态。
- 你需要快速检查目录是否有效(确认所需脚本和配置文件是否存在)。
Linux_for_Tegra/
Prerequisites
前提条件
- Running on the host PC (Linux), not on the Jetson target.
- A directory extracted from a Jetson BSP tarball.
Linux_for_Tegra/ - Standard CLIs available: ,
ls,head,cat,paste.sed
- 在主机PC(Linux系统)上运行,而非Jetson目标设备。
- 已从Jetson BSP压缩包中提取出目录。
Linux_for_Tegra/ - 具备标准CLI工具:、
ls、head、cat、paste。sed
Inputs
输入参数
- (optional): absolute path to the
L4T_ROOTdirectory. If unset, use the current working directory.Linux_for_Tegra/
- (可选):
L4T_ROOT目录的绝对路径。若未设置,则使用当前工作目录。Linux_for_Tegra/
Instructions
操作步骤
Run each step in order and print the captured values into the report shown under Output format.
- Resolve and validate the directory is a Linux_for_Tegra root — exit early otherwise.
L4T_ROOTandflash.share the two anchor artifacts that every BSP ships:nv_tegra/bashL4T_ROOT="${L4T_ROOT:-$PWD}" if [ ! -f "$L4T_ROOT/flash.sh" ] || [ ! -d "$L4T_ROOT/nv_tegra" ]; then echo "Not a Linux_for_Tegra root: '$L4T_ROOT' (missing flash.sh or nv_tegra/)" exit 1 fi echo "$L4T_ROOT" - Extract the L4T release header line. The canonical host-side location is ; the same file is copied into the rootfs by
nv_tegra/nv_tegra_release. Only the first line is useful — the rest is a long list of library SHAs:apply_binaries.shbashhead -1 "$L4T_ROOT/nv_tegra/nv_tegra_release" 2>/dev/null \ || head -1 "$L4T_ROOT/rootfs/etc/nv_tegra_release" 2>/dev/null \ || echo "L4T release info not found" - List supported board config files and join them onto one comma-separated line:
bash
(cd "$L4T_ROOT" && ls *.conf 2>/dev/null) | paste -sd, - - Check whether the rootfs has been populated. An empty means
rootfs/has not been run yet:apply_binaries.shbashif [ -f "$L4T_ROOT/rootfs/etc/passwd" ]; then echo "populated" else echo "empty" fi
按顺序执行每个步骤,并将捕获的值打印到输出格式中所示的报告里。
- 解析并验证该目录是否为Linux_for_Tegra根目录——否则提前退出。每个BSP都会附带两个核心文件:
L4T_ROOT和flash.sh:nv_tegra/bashL4T_ROOT="${L4T_ROOT:-$PWD}" if [ ! -f "$L4T_ROOT/flash.sh" ] || [ ! -d "$L4T_ROOT/nv_tegra" ]; then echo "Not a Linux_for_Tegra root: '$L4T_ROOT' (missing flash.sh or nv_tegra/)" exit 1 fi echo "$L4T_ROOT" - 提取L4T版本头信息行。主机端的标准位置是;该文件会被
nv_tegra/nv_tegra_release复制到rootfs中。只有第一行有用——其余内容是长长的库SHA列表:apply_binaries.shbashhead -1 "$L4T_ROOT/nv_tegra/nv_tegra_release" 2>/dev/null \ || head -1 "$L4T_ROOT/rootfs/etc/nv_tegra_release" 2>/dev/null \ || echo "L4T release info not found" - 列出支持的板卡配置文件,并合并为一行逗号分隔的内容:
bash
(cd "$L4T_ROOT" && ls *.conf 2>/dev/null) | paste -sd, - - 检查rootfs是否已填充。若为空,则表示尚未运行
rootfs/:apply_binaries.shbashif [ -f "$L4T_ROOT/rootfs/etc/passwd" ]; then echo "populated" else echo "empty" fi
Output format
输出格式
Print a short report with these sections, one line each where possible:
text
L4T root: <path>
L4T release: <release header line>
Board configs: <comma-separated list>
Rootfs: populated | empty打印一份包含以下部分的简短报告,尽可能每行对应一个部分:
text
L4T root: <path>
L4T release: <release header line>
Board configs: <comma-separated list>
Rootfs: populated | emptyExamples
示例
Example output on an Orin AGX BSP (L4T R36):
text
L4T root: $HOME/Linux_for_Tegra
L4T release: # R36 (release), REVISION: 3.0
Board configs: jetson-agx-orin-devkit.conf,jetson-orin-nano-devkit.conf
Rootfs: populatedExample output on a freshly untarred BSP where has not been run yet:
apply_binaries.shtext
L4T root: /tmp/Linux_for_Tegra
L4T release: # R39 (release), REVISION: 0.0
Board configs: jetson-agx-thor-devkit.conf
Rootfs: emptyOrin AGX BSP(L4T R36)的示例输出:
text
L4T root: $HOME/Linux_for_Tegra
L4T release: # R36 (release), REVISION: 3.0
Board configs: jetson-agx-orin-devkit.conf,jetson-orin-nano-devkit.conf
Rootfs: populated刚解压完成且尚未运行的BSP示例输出:
apply_binaries.shtext
L4T root: /tmp/Linux_for_Tegra
L4T release: # R39 (release), REVISION: 0.0
Board configs: jetson-agx-thor-devkit.conf
Rootfs: emptyError handling
错误处理
Each command falls back to a clearly labeled string if the underlying file is missing — the skill never errors out mid-report. If does not contain and , exit early with a clear "not a Linux_for_Tegra root" message rather than printing misleading info.
"... not found"L4T_ROOTflash.shnv_tegra/如果底层文件缺失,每个命令都会回退到明确标记的字符串——本技能不会在报告中途报错。如果不包含和,会提前退出并显示清晰的“不是Linux_for_Tegra根目录”消息,而非打印误导性信息。
"... not found"L4T_ROOTflash.shnv_tegra/Limitations
局限性
- Read-only inspection only — does not validate signatures, kernel images, or device-tree overlays.
- Only checks the presence of as a populated-rootfs proxy; will not detect a half-populated rootfs.
rootfs/etc/passwd - Lists all board configs in
*.conf; does not try to infer which one the user intends to flash.L4T_ROOT/
- 仅支持只读检查——不验证签名、内核镜像或设备树覆盖层。
- 仅通过的存在来判断rootfs是否已填充;无法检测部分填充的rootfs。
rootfs/etc/passwd - 会列出中所有
L4T_ROOT/板卡配置文件;不会尝试推断用户打算刷写哪一个。*.conf
Troubleshooting
故障排除
-
Error:Cause:
Not a Linux_for_Tegra root: '...' (missing flash.sh or nv_tegra/)points at a parent directory, an extracted rootfs, or an unrelated path. Solution: PointL4T_ROOTat the directory that containsL4T_ROOT(typicallyflash.sh).Linux_for_Tegra/ -
Error:Cause: Neither
L4T release info not foundnornv_tegra/nv_tegra_releaseexists — the BSP tarball may be incomplete orrootfs/etc/nv_tegra_releasewas never run. Solution: Re-extract the BSP tarball or runapply_binaries.shto populate the rootfs.apply_binaries.sh
-
错误:原因:
Not a Linux_for_Tegra root: '...' (missing flash.sh or nv_tegra/)指向父目录、已提取的rootfs或无关路径。 **解决方案:**将L4T_ROOT指向包含L4T_ROOT的目录(通常为flash.sh)。Linux_for_Tegra/ -
错误:原因:
L4T release info not found和nv_tegra/nv_tegra_release均不存在——BSP压缩包可能不完整,或从未运行rootfs/etc/nv_tegra_release。 **解决方案:**重新解压BSP压缩包,或运行apply_binaries.sh以填充rootfs。apply_binaries.sh
Notes
注意事项
- Do not modify any files. This skill is read-only.
- If multiple board config files exist, list all of them — do not try to guess which one the user intends to flash.
- 请勿修改任何文件。本技能为只读操作。
- 如果存在多个板卡配置文件,请列出所有文件——不要尝试猜测用户打算刷写哪一个。