Jump to content

Flashing the Board

From RidgeRun Developer Wiki

Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page

Preferred Partner Logo 3 Partner Program Banner



Flashing the Board

After generating the deploy artifacts, the next step is programming the image into the target Jetson platform.

This section explains how to deploy the generated flash bundle onto a Jetson device using the NVIDIA flashing utilities included in the Yocto generated deployment package.

The flash bundle packages the generated image artifacts together with the NVIDIA flashing assets required for deployment.

Overview

The flashing sequence consists of:

  1. Extracting the generated flash bundle
  2. Putting the Jetson device into recovery mode
  3. Running the generated flashing scripts
  4. Deploying the generated image to the target platform

The flashing environment is generated directly from the Yocto build output, ensuring alignment between the deployed system and the selected MACHINE configuration.

The exact flashing behavior may vary depending on the Jetson platform and storage target, such as eMMC, NVMe, SD card, or external storage.

Locate the Flash Bundle

After a successful build, the deploy artifacts are available under:

$WORKSPACE/build/tmp/deploy/images/$MACHINE/

The generated flash bundle typically follows this naming pattern:

demo-image-full-$MACHINE.rootfs.tegraflash.tar.zst

When building a different image recipe, the bundle name changes accordingly. For example:

demo-image-base-$MACHINE.rootfs.tegraflash.tar.zst

The exact directory contents can vary depending on the selected image recipe, machine configuration, and build targets.

The .tegraflash.tar.zst artifact is the primary deployment package used for flashing.

It contains:

  • Root filesystem
  • Kernel image
  • Device tree binaries and overlays
  • Bootloader components
  • Partition configuration
  • Flashing scripts

Extract the Flash Package

Create a temporary flashing workspace:

mkdir -p /tmp/tegraflash

Extract the generated bundle:

tar -C /tmp/tegraflash \
    -xf $WORKSPACE/build/tmp/deploy/images/$MACHINE/demo-image-full-$MACHINE.rootfs.tegraflash.tar.zst

This creates an isolated flashing workspace separate from the original build output.

The extracted directory contains the deployment files and flashing scripts used during the flashing process.

Support for .zst compressed archives requires the appropriate host tools, such as zstd, to be installed on the host system.

After extraction, confirm that the flashing scripts are present:

ls /tmp/tegraflash

ls /tmp/tegraflash/initrd-flash

Put the Board into Recovery Mode

Before flashing, the Jetson device must enter recovery mode and be connected to the host through USB.

General procedure:

  1. Power off the board
  2. Press and hold the recovery button
  3. Power on or reset the device
  4. Connect the board to the host through USB

The exact recovery button sequence can vary depending on the Jetson platform or carrier board. Refer to the hardware documentation for the specific board being used.

Verify detection from the host:

lsusb

A detected NVIDIA recovery device confirms that the platform is ready for flashing.

The output should include an NVIDIA USB device entry similar to:

NVIDIA Corp.

At this stage, it is also important to determine which flashing method to use for the target platform and deployment scenario.

For additional information about the available flashing methods and when to use them, see:
Related page: initrd vs doflash

Run the Flash Script

Enter the extracted workspace:

cd /tmp/tegraflash

Start the flashing process:

sudo ./initrd-flash

The initrd-flash script performs the deployment process using the artifacts packaged in the flash bundle.

Depending on the selected platform and storage configuration, the process may:

  • Detect the Jetson device in recovery mode
  • Prepare storage partitions
  • Deploy bootloader and firmware assets
  • Write the root filesystem
  • Configure boot assets
  • Reboot the board after completion

After completion, the board reboots automatically.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.