agentleFS
Seeed-ProjectsSeeed-Projects/Seeed-Jetson-DevelopTool/skills/codex/bsp-source-build/AGENTS.md

Seeed-Jetson-DevelopTool / bsp-source-build

AGENTS.md57 starsChanged 4 months agoMITView on GitHub

Build Seeed's custom BSP source code for Jetson devices — obtain NVIDIA L4T, overlay Seeed patches, compile kernel, and flash. Requires Ubuntu 20.04/22.04 host PC.

  • Installs packages

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run one phase at a time. After each phase:

    line 20
  2. Very specific:

    If output contains [STOP] → stop immediately, consult the failure decision tree

    line 21
  3. Very specific:

    If output ends with [OK] → tell the user "Phase N complete" and proceed

    line 22
  4. Distinctive:

    Put the Jetson device into recovery mode:

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Build Seeed Jetson BSP from Source

Obtain the BSP source code for Seeed's Jetson products, overlay Seeed's customizations from GitHub, compile the kernel, and flash onto the device.

Hardware: Seeed Jetson device (reComputer/reServer), USB cable for flashing Software: Ubuntu 20.04 or 22.04 host PC (native)

Source: https://github.com/Seeed-Studio/Linux_for_Tegra


Execution model

Run one phase at a time. After each phase:

  • If output contains [STOP] → stop immediately, consult the failure decision tree
  • If output ends with [OK] → tell the user "Phase N complete" and proceed

Replace <L4T_VERSION> with the target version (e.g. 36.4.3) throughout.


Phase 1 — install build dependencies (~2 min)

sudo apt-get update
sudo apt-get install -y build-essential flex bison libssl-dev \
  sshpass abootimg nfs-kernel-server libxml2-utils qemu-user-static git-lfs

[OK] when all packages install without errors.


Phase 2 — download & extract NVIDIA BSP + rootfs (~10 min)

Download from https://developer.nvidia.com/embedded/linux-tegra-archive:

  • L4T Driver Package (BSP): Jetson_Linux_r<L4T_VERSION>_aarch64.tbz2
  • Sample Root Filesystem: Tegra_Linux_Sample-Root-Filesystem_r<L4T_VERSION>_aarch64.tbz2
tar xf Jetson_Linux_r<L4T_VERSION>_aarch64.tbz2
sudo tar xpf Tegra_Linux_Sample-Root-Filesystem_r<L4T_VERSION>_aarch64.tbz2 \
  -C Linux_for_Tegra/rootfs/

[OK] when Linux_for_Tegra/rootfs/ is populated.


Phase 3 — sync NVIDIA source & overlay Seeed patches (~15 min)

cd Linux_for_Tegra/source/
./source_sync.sh -t jetson_<L4T_VERSION>
cd ../..

Clone Seeed's BSP overlay:

mkdir -p github/Linux_for_Tegra
git clone https://github.com/Seeed-Studio/Linux_for_Tegra.git \
  -b r<L4T_VERSION> --depth=1 github/Linux_for_Tegra

Overlay Seeed files:

cp -r github/Linux_for_Tegra/* Linux_for_Tegra/

Apply binaries:

cd Linux_for_Tegra
sudo ./apply_binaries.sh

[OK] when apply_binaries.sh completes.


Phase 4 — setup cross-compilation toolchain (~2 min)

Download the toolchain aarch64--glibc--stable-2022.08-1.tar.bz2 and extract:

mkdir -p l4t-gcc
tar xf aarch64--glibc--stable-2022.08-1.tar.bz2 -C ./l4t-gcc
export ARCH=arm64
export CROSS_COMPILE=$(pwd)/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-

[OK] when $CROSS_COMPILE points to a valid binary.


Phase 5 — build kernel (~10–30 min)

cd Linux_for_Tegra/source
./nvbuild.sh

[OK] when build completes without errors.


Phase 6 — install kernel & modules (~2 min)

./do_copy.sh
export INSTALL_MOD_PATH=$(pwd)/../rootfs/
./nvbuild.sh -i

[OK] when modules are installed to rootfs.


Phase 7 — flash device (~15–30 min)

Put the Jetson device into recovery mode:

  1. Power off
  2. Hold REC button, connect USB to host
  3. Release REC after 2 seconds

Verify:

lsusb | grep -i nvidia

Flash (JetPack 6 example):

cd ..
sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
  --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml \
  -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 <DEVICE_NAME> internal

Replace <DEVICE_NAME> with your board's config name. Available names for L4T 36.4.3:

  • recomputer-orin-j401
  • recomputer-industrial-orin-j201 (also for j40/j30 series)
  • reserver-agx-orin-j501x
  • reserver-agx-orin-j501x-gmsl
  • reserver-industrial-orin-j401
  • recomputer-orin-j40mini
  • recomputer-orin-robotics-j401
  • recomputer-orin-super-j401

For JetPack 5, change the -p parameter to: -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml"

[OK] when flash completes and device boots.


Failure decision tree

SymptomAction
source_sync.sh failsCheck internet. Verify tag jetson_<L4T_VERSION> exists.
Seeed GitHub branch not foundCheck available branches at https://github.com/Seeed-Studio/Linux_for_Tegra
apply_binaries.sh failsVerify rootfs was extracted correctly. Re-extract and retry.
nvbuild.sh compile errorCheck CROSS_COMPILE path. Ensure all build deps are installed.
lsusb doesn't show NVIDIA deviceRe-enter recovery mode. Try a different USB cable/port.
Flash fails with device name errorCheck .conf files in Linux_for_Tegra/ root for valid device names.
Flash fails mid-wayRetry. Ensure USB cable is ≤1.5m and stable.

Reference files

  • references/source.body.md — Original Seeed wiki with version-specific details and screenshots

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.