Build BSP from Source (JetPack 7.2)
EAR100T — Build & Flash
EAR-100T7-00-208N08 · JetPack 7.2 · L4T R39.2.0
Prerequisites
Before proceeding, please refer to the NVIDIA Jetson Linux Developer Guide for required host-side tools and setup:
https://docs.nvidia.com/jetson/archives/r39.2/DeveloperGuide/
You will need to install additional apps as below
sudo apt install curl xclip
You will need to create your own SSH key for git clone. Check the following support document from gitlab regarding how to proceed.
https://docs.gitlab.com/19.2/user/ssh/?tab=Linux+%28requires+the+xclip+package%29
Download Jetson Thor Source
"THOR_SOURCE_PATH" is the directory where you will proceed with this source repo through the whole WIKI. Replace all "THOR_SOURCE_PATH" in all steps below to where you want to start everything.
cd "THOR_SOURCE_PATH"
git clone ssh://git@gitlab.everfocus.com.tw:2222/jetson_thor/jetpack.git -b 100t
After cloning, "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra will be the BSP root, and "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra/rootfs will be the root filesystem path.
Toolchain
mkdir "THOR_SOURCE_PATH"/l4t-gcc
cd "THOR_SOURCE_PATH"/l4t-gcc
wget https://developer.nvidia.com/downloads/embedded/L4T/r38_Release_v2.0/release/x-tools.tbz2
tar xf x-tools.tbz2
Build Kernel
Download customized rootfs
cd "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra
git clone ssh://git@gitlab.everfocus.com.tw:2222/jetson_thor/rootfs_100t_customization.git
cd rootfs_100t_customization;./build.sh
sudo mv rootfs "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra/
export ROOTFS_PATH="THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra/rootfs
Build kernel
cd "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra/source
export CROSS_COMPILE="THOR_SOURCE_PATH"/l4t-gcc/x-tools/aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export INSTALL_MOD_PATH="$ROOTFS_PATH"
./nvbuild.sh
Install kernel module
./nvbuild.sh -i
Copy kernel image
cp kernel_out/kernel/kernel-noble/arch/arm64/boot/Image ../kernel/Image
cp kernel_out/build/nvidia-public/devicetree/generic-dtbs/* ../kernel/dtb/
Build Firmware version
cd "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra/product
export ARCH=arm64
export CROSS_COMPILE="THOR_SOURCE_PATH"/l4t-gcc/x-tools/aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
make EXTRA_CFLAGS="-DPRODUCT_INFO=FIRMWARE_VERSION"
# Replace FIRMWARE_VERSION with your own naming rules
# EX: make EXTRA_CFLAGS="-DPRODUCT_INFO=EAR-100T7-00-208N08_JP7.2_v1.0.003"
sudo cp product.ko ../rootfs/lib/modules/6.8.12-1021-tegra/kernel/drivers/char/
sudo depmod -b "$ROOTFS_PATH" 6.8.12-1021-tegra
Flash
ROOTFS_AB=1 parameter is optional if you need OTA.
cd "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra
sudo SKIP_EEPROM_CHECK=1 ROOTFS_AB=1 ./tools/kernel_flash/l4t_initrd_flash.sh jetson-agx-thor-devkit internal
⚠️ After a successful flash, the DUT will NOT reboot automatically. Manually power-cycle or reboot the DUT to verify the flash was successful.
Release Image
Generate release image
ROOTFS_AB=1 parameter is optional if you need OTA.
cd "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra
sudo ROOTFS_AB=1 ./l4t_initrd_flash.sh --no-flash --network usb0 --massflash 1 jetson-agx-thor-devkit external
# output image filename will be mfi_jetson-agx-thor-devkit.tar.gz
Flash Release Image
Copy mfi_jetson-agx-thor-devkit.tar.gz generated in the previous step to another machine or a different directory on the same machine. Do not extract or flash from the original output directory.
tar -xf mfi_jetson-agx-thor-devkit.tar.gz
cd mfi_jetson-agx-thor-devkit
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --network usb0 --massflash 1 jetson-agx-thor-devkit --showlogs
⚠️ After a successful flash, the DUT will NOT reboot automatically. Manually power-cycle or reboot the DUT to verify the flash was successful.
Generate OTA packge
cd "THOR_SOURCE_PATH"/jetpack
wget https://developer.nvidia.com/downloads/embedded/L4T/r39_Release_v2.0/release/ota_tools_R39.2.0_aarch64.tbz2
tar xf ota_tools_R39.2.0_aarch64.tbz2
cd Linux_for_Tegra
sudo ROOTFS_AB=1 ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh -E bootloader/esp.img --external-device nvme0n1 jetson-agx-thor-devkit R39-2
# the follwing OTA package will be generated
# "THOR_SOURCE_PATH"/jetpack/Linux_for_Tegra/bootloader/jetson-agx-thor-devkit/ota_payload_package.tar.gz