NVIDIA Jetson Orin - Flashing the Board from Cmdline

From RidgeRun Developer Wiki



Follow Us On Twitter LinkedIn Email Share this page


Previous: JetPack_6.1/Compiling_Code/Building Index Next: JetPack_6.1/Flashing_Board/Flash_Filesystem









This section provides a guide to flash the Jetson Orin OS components from the host computer command line. Flashing is the process of copying the files required into the selected storage from which the Orin is going to boot. In the flashing process, we use the host computer and the Orin.

This section assumes that you already have followed through our Getting Started and Installing Jetpack sections.

Assumptions

  1. You have JetPack 6.1 installed on your host computer in the default path ($HOME/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra). If your JetPack installation used a different path, make sure to modify accordingly the JETPACK environment variable in Step 1.
  2. The OS components to be installed in the Orin AGX are stored in the default locations expected by the JetPack flash script. If you haven't modified your JetPack directory or if you followed our Compiling Code Section, then the files should be in the default locations.

Step 1: Define the Environment Variables

Make sure to run the following commands in the terminal that you will use to flash the Orin.

export JETPACK=$HOME/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra

Step 2: Set Board in Recovery Mode

In order to flash the Orin, we must set it in recovery mode so that it can accept the files. The procedure to put the Orin in recovery mode is:

  1. Start with the Jetson Orin AGX devkit turned off and disconnected from the power supply.
  2. Get the USB-A to USB-C cable and connect the USB-A end to your host computer (the computer where you installed JetPack) and the USB-C end to the Orin type C port L, shown in Figure 2.
  3. Press and hold the FORCE RECOVERY button (B in Figure 1).
  4. While pressing the FORCE RECOVERY button, press and release the RESET button (C in Figure 1).
Figure 1: Recovery Mode Buttons
Figure 2: USB-C Port for Flashing

At this point, the Orin should be in recovery mode. To verify, you can run the following command on your host computer:

lsusb

If the Orin is in recovery mode, you should see a line similar to the following among the command output:

Bus 001 Device 011: ID 0955:7023 NVidia Corp

Step 3 (Optional): Create a Default User

The default user/password can be configured after flashing if you can connect a display, keyboard, and mouse to the Orin to complete the OEM configuration during the first boot. If you wish to save time and create a default user/password for your Orin before flashing, you can execute the commands below, make sure to replace <user_name> and <password> with a username and password of your choice.

cd $JETPACK/tools
sudo ./l4t_create_default_user.sh -u <user_name> -p <password>

Step 4: Execute the Flash Script

NVIDIA provides a script for flashing the Orin in the JetPack directory. This script takes two arguments, the target board, and the root device:

cd $JETPACK
sudo ./flash.sh <target board> <rootdev>

There are several options of target board for the Orin AGX and Orin NX:

  • jetson-agx-orin-devkit: Recommended, this configuration is used for a Jetson AGX Orin SOM connected to the NVIDIA AGX Orin devkit.
  • jetson-agx-orin-devkit-as-jao-40w: This configuration emulates a Jetson Orin NX 32GB module on an AGX Orin devkit.
  • jetson-agx-orin-devkit-as-nx-16gb: This configuration emulates a Jetson Orin NX 16GB module on an AGX Orin devkit.
  • jetson-agx-orin-devkit-as-nx-8gb: This configuration emulates a Jetson Orin NX 8GB module on an AGX Orin devkit.
  • jetson-orin-nano-devkit: Configuration for Jetson Orin Nano Devkit (SD Card boot supported).

The root device indicates the storage that will be used to boot the Orin. Available options are:

  1. eMMC
  2. USB Drive
  3. NVMe
  4. SD Card (only supported for Orin Nano / NX, not AGX Orin)

Option #1: eMMC

cd $JETPACK
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

Option #2: USB Drive

To boot from USB, you must first prepare the filesystem on the USB drive. See NVIDIA_Jetson_Orin/JetPack_6.1/Flashing_Board/Flash_Filesystem for detailed instructions.

cd $JETPACK
sudo ./flash.sh jetson-agx-orin-devkit sda1

Option #3: NVMe

To boot from NVMe, you must first prepare the filesystem on the NVMe device. See NVIDIA_Jetson_Orin/JetPack_6.1/Flashing_Board/Flash_Filesystem for detailed instructions.

cd $JETPACK
sudo ./flash.sh jetson-agx-orin-devkit nvme0n1p1

Option #4: SD Card (Orin Nano / NX only)

To boot from SD Card (supported only on Orin Nano / NX), you must first prepare the filesystem on the card. See NVIDIA_Jetson_Orin/JetPack_6.1/Flashing_Board/Flash_Filesystem for detailed instructions.

cd $JETPACK
sudo ./flash.sh jetson-orin-nano-devkit mmcblk1p1

Advanced Flashing Options

Flashing with Initrd

cd $JETPACK
sudo ./l4t_initrd_flash.sh --external-device nvme0n1p1 -c bootloader/flash.xml \
    --showlogs --network usb0 jetson-agx-orin-devkit mmcblk0p1

Flashing by UUID

cd $JETPACK
sudo ./flash.sh --reuse-uuid jetson-agx-orin-devkit mmcblk0p1

Flashing by Partition Name

cd $JETPACK
sudo ./flash.sh jetson-agx-orin-devkit sda1

Flash Script Options

NVIDIA provides several scripts to help generate the images and flash the resulting images. The main script is flash.sh. Run the following command to see all supported arguments:

cd $JETPACK
./flash.sh -h



Previous: JetPack_6.1/Compiling_Code/Building Index Next: JetPack_6.1/Flashing_Board/Flash_Filesystem