Spi Enable Jetsonnano 标志

Spi Enable Jetsonnano

组织
Seeed-Projects
spi-enable-jetsonnano

Enable SPI1 interface on Jetson Nano by modifying the device tree before flashing. Covers DTB decompilation, SPI pin patching, recompilation, flashing, and loopback testing. Must be applied before flashing the image.

概览

发布者Seeed-Projects
代码仓库Seeed-Jetson-DevelopTool
技能名称spi-enable-jetsonnano
星标数
58
复刻数
9
附带文件
2
许可协议MIT
链接
  • Markdown 格式的指令

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

  • 兼容任何大语言模型

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

  • 2 个附带文件

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

  • 开源

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

安装

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

1

安装到 TypingMind

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

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

安装到其他智能体

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Seeed-Projects/Seeed-Jetson-DevelopTool.git /tmp/Seeed-Jetson-DevelopTool
mkdir -p .claude/skills
cp -r /tmp/Seeed-Jetson-DevelopTool/seeed_jetson_develop/skills/openclaw/spi-enable-jetsonnano .claude/skills/spi-enable-jetsonnano
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

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

一旦请求与技能匹配,模型就会自动加载 Spi Enable Jetsonnano。

兼容任何 AI 模型

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

  • 仅在需要时加载

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

  • 在聊天中切换模型

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

技能指令

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

Enable SPI Interface on Jetson Nano

Execution model

Run one phase at a time. After each phase, verify the expected result before continuing.

  • If a phase succeeds → print [OK] and move to the next phase.
  • If a phase fails → print [STOP], consult the failure decision tree, and ask the user before retrying.

Important: This procedure must be performed on the host PC before flashing the Jetson Nano. SPI cannot be enabled via jetson-io.py on Nano.

Phase 1 — Enter recovery mode and prepare BSP on host PC

Short the REC and GND pins on the Jetson Nano to enter recovery mode.

Download L4T BSP and Root Filesystem from NVIDIA Jetson Linux Archive (example uses L4T 32.7.2):

bash
tar xf Jetson-210_Linux_R32.7.2_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.7.2_aarch64.tbz2
cd ..
sudo ./apply_binaries.sh

Expected: BSP extracted and binaries applied without errors.

Phase 2 — Create and run SPI modification script

Create modify_spi.sh in the Linux_for_Tegra directory with the following content, then run it:

bash
cat << 'SCRIPT_EOF' > modify_spi.sh
#!/bin/bash
set -e

cd "$(dirname "$0")"
cd kernel/dtb

DTS=tegra210-p3448-0002-p3449-0000-b00.dts
DTB=tegra210-p3448-0002-p3449-0000-b00.dtb

echo "Decompiling $DTB to $DTS..."
sudo dtc -I dtb -O dts -o "$DTS" "$DTB"

fix_spi_node() {
    local node=$1
    if grep -A5 "$node {" "$DTS" | grep -q 'status'; then
        sudo sed -i "/$node {/,/spi-max-frequency/ s/status = \".*\";/status = \"okay\";/" "$DTS"
    else
        sudo sed -i "/$node {/,/spi-max-frequency/ s/compatible = \"tegra-spidev\";/&\n\t\tstatus = \"okay\";/" "$DTS"
    fi
}

echo "Enabling spi@0 and spi@1..."
fix_spi_node "spi@0"
fix_spi_node "spi@1"

patch_pin() {
    local pin=$1
    sudo sed -i "/${pin} {/,/nvidia,enable-input/ {
        s/nvidia,function = \"rsvd1\"/nvidia,function = \"spi1\"/
        s/nvidia,tristate = <0x01>/nvidia,tristate = <0x00>/
        s/nvidia,enable-input = <0x00>/nvidia,enable-input = <0x01>/
    }" "$DTS"
}

echo "Patching pinmux blocks..."
for pin in spi1_mosi_pc0 spi1_miso_pc1 spi1_sck_pc2 spi1_cs0_pc3 spi1_cs1_pc4; do
    patch_pin "$pin"
done

echo "Fixing tristate and input-enable for SPI1 pins..."

fix_pinmux_field() {
  local pin=$1
  awk -v pin="$pin" '
  BEGIN { in_block = 0 }
  {
    if ($0 ~ pin " {") { in_block = 1 }
    if (in_block && /nvidia,tristate =/) { sub(/<0x1>/, "<0x0>") }
    if (in_block && /nvidia,enable-input =/) { sub(/<0x0>/, "<0x1>") }
    print
    if (in_block && /}/) { in_block = 0 }
  }' "$DTS" | sudo tee "$DTS.fixed" > /dev/null && sudo mv "$DTS.fixed" "$DTS"
}

fix_pinmux_field "spi1_mosi_pc0"
fix_pinmux_field "spi1_miso_pc1"
fix_pinmux_field "spi1_sck_pc2"
fix_pinmux_field "spi1_cs0_pc3"
fix_pinmux_field "spi1_cs1_pc4"

echo "Recompiling DTS to $DTB..."
sudo dtc -I dts -O dtb -o "$DTB" "$DTS"

echo "SPI DTS patch applied and DTB regenerated successfully."
SCRIPT_EOF

sudo bash modify_spi.sh

To enable SPI2 instead, replace spi1 with spi2 in the script.

Expected: Script completes with "SPI DTS patch applied and DTB regenerated successfully."

Phase 3 — Flash the Jetson Nano

bash
sudo ./flash.sh jetson-nano-emmc mmcblk0p1

Expected: Flash completes successfully. After reboot, SPI pins are available on the 40-pin header.

Phase 4 — Test SPI1 with loopback

On the Jetson Nano, short pin 19 (SPI0_MOSI) and pin 21 (SPI0_MISO) for loopback test.

bash
sudo modprobe spidev
git clone https://github.com/rm-hull/spidev-test
cd spidev-test/
gcc spidev_test.c -o spidev_test
./spidev_test -v -D /dev/spidev0.0 -p "Test"

Verify available SPI devices:

bash
ls /dev/spidev*

Expected: Loopback test shows transmitted data matches received data; /dev/spidev0.0 exists.

Failure decision tree

SymptomLikely causeSuggested fix
dtc command not foundDevice tree compiler not installedsudo apt-get install device-tree-compiler
DTB file not foundWrong L4T version or pathVerify the DTB filename matches your board revision
Flash failsDevice not in recovery modeRe-short REC and GND pins; verify with lsusb on host
/dev/spidev* not found after bootScript did not patch correctlyRe-run modify_spi.sh and reflash; check DTS changes
Loopback test failsPins not shorted properlyVerify pin 19 and pin 21 are connected; check wiring
SPI2 needed instead of SPI1Wrong SPI controller targetedReplace spi1 with spi2 in modify_spi.sh and reflash

Reference files

  • references/source.body.md — Full original wiki content (reference only)

附带文件

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

常见问题

Spi Enable Jetsonnano AI 技能有什么作用?

Enable SPI1 interface on Jetson Nano by modifying the device tree before flashing. Covers DTB decompilation, SPI pin patching, recompilation, flashing, and loopback testing. Must be applied before flashing the image.

为什么在 TypingMind 中使用 Spi Enable Jetsonnano?

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

如何在 TypingMind 中安装 Spi Enable Jetsonnano?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/Seeed-Projects/Seeed-Jetson-DevelopTool/tree/main/seeed_jetson_develop/skills/openclaw/spi-enable-jetsonnano。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Spi Enable Jetsonnano?

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

Spi Enable Jetsonnano 可以搭配多少个 AI 模型使用?

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

Spi Enable Jetsonnano AI 技能免费吗?

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

什么是 AI 技能?

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

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

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

查看全部

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

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