NVIDIA Jetson Orin Nano- Flashing the Board from Cmdline
NVIDIA Jetson Orin Nano RidgeRun documentation is currently under development. |
This section provides a guide to flash the Jetson Orin Nano 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 Flashing_the_board_using_GUI_Installer sections.
Assumptions
- You have Jetpack 5.1.1 installed on your host computer in the default path ($HOME/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra). If your Jetpack installation used a different path, make sure to modify accordingly the JETPACK environment variable in Step 1.
- The OS components to be installed in the Orin Nano 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 NVIDIA Jetson Orin Nano/Jetpack 5.X/Kernel Compile, then the files should be in the default locations. If you have the files stored in a custom location, make sure to use the appropriate flags to indicate to the flash script the paths to the kernel, dtb, and bootloader.
Step 1: Define the Environment Variables
Make sure to run the following commands in the terminal that you will use to flash the Orin Nano.
export JETPACK=$HOME/nvidia/nvidia_sdk/JetPack_5.1.1_Linux_JETSON_ORIN_NANO_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:
- Turned off and disconnected from the power supply the Jetson Orin Nano devkit.
- Get the USB-A to USB-C or USB-C to USB-C cable and connect the the USB-C end to your Orin Nano and the USB-A or USB-C end to your computer (the computer where you installed Jetpack)
- Connect a jumper between FC-REC pin and any GND pin as shown in figure 1.
- Connect the power supply.
At this point, the Orin Nano 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:7523 NVidia Corp
Step 3: Apply binaries
This commands are intended to prepare the files for a correct flash.
cd $JETPACK sudo ./apply_binaries.sh sudo ./tools/l4t_flash_prerequisites.sh
Step 4 (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 Nano 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> for a username and password of your choice.
cd $JETPACK/tools sudo ./l4t_create_default_user.sh -u <user_name> -p <password>
Step 5: 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:
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device <device-type> \ -c <xml-drive-configuration-file> -p "-c <xml-qspi-file>" \ --showlogs --network usb0 jetson-orin-nano-devkit internal
There are four possible options of target board for the Orin Nano:
- jetson-orin-nano-devkit: Recommended, this configuration is used for a Jetson Orin Nano SOM connected to the NVIDIA Orin Nano devkit.
In the following subsections, we are going to use the jetson-orin-nano-devkit configuration to flash the Orin.
The root device indicates the storage that will be used to boot the Orin, the following options are available:
- USB Drive
- NVMe
- SD Card
The following subsections show the command to flash each of the storage options available.
Option #1: NVMe
This option is the most simple, just execute the following commands:
cd $JETPACK sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \ -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \ --showlogs --network usb0 jetson-orin-nano-devkit internal
The flashing process will take a while, and should print a success message if the flash is finished successfully. After the flash script finishes successfully, the Orin will boot automatically.
Option #2: SD card
This option is the most simple, just execute the following commands:
cd $JETPACK sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device mmcblk1p1 \ -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \ --showlogs --network usb0 jetson-orin-nano-devkit internal
The flashing process will take a while, and should print a success message if the flash is finished successfully. After the flash script finishes successfully, the Orin will boot automatically.
Option #3: USB Drive
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device sda1 \ -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/t186ref/cfg/flash_t234_qspi.xml" \ --showlogs --network usb0 jetson-orin-nano-devkit internal