Flashing the Jetson - jad-mansour/jetson-inference GitHub Wiki
In the section below, we provide two methods to flash the Jetson board. Flashing is required in case you change the storage medium or the board stops responding. It consists of installing JetPack OS and all its machine learning components. Please note that the version of JetPack OS that you want to install is highly dependent on your host OS. For example, in case of installing a version of JetPack OS lower than 5.0, a host OS of Ubuntu 18.04 isNow that you fully flashed your Jetson, install your dependencies and start tinkering. required. You can utilize Docker images if your system has a newer version (more on that later). Also, this tutorial is written using different Jetson boards. However, note that all the steps provided are similar for all boards.
Method 1: Using the Provided Docker Images
To avoid installing extra dependencies on your system, it is recommended to flash your Jetson using a Docker image. Moreover, if you have a newer version of Ubuntu, your system will not be able to build the Jetson OS image. For example, the 2GB Jetson Nano only supports Jetpack 4.6.3 with Ubuntu 18.04, as such, it is required to have Ubuntu 18.04 to flash the Jetson. Using a docker image will make the process easier and will allow you to flash your Jetson with any system.
-
Download your desired Docker image from here. Note that it is important to check if your device supports the version of the downloaded Docker image.
-
Setup Docker on your system and load the image:
docker load -i ./sdkmanager-[version].[build#]-[base_OS]_docker.tar.gz
- It is recommended that you tag the version as "latest" for ease of use:
docker tag sdkmanager:[version].[build#] sdkmanager:latest
- The docker image cannot be run in interactive mode without using the sdkmanager executable. To check the available arguments run:
docker run -it --rm sdkmanager --query
- For more information about the docker CLI arguments, refer to the guide provided by NVIDIA. Let us suppose we want to flash the Jetson Nano, we run the following command:
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb/ -v /dev:/dev -v /media/$USER:/media/nvidia:slave --name jetson_nano_flash --network host sdkmanager --cli install --logintype devzone --product Jetson --version 4.6.3 --targetos Linux --target JETSON_NANO_TARGETS --flash all
Note that there is no need to add the --host
argument as flashing the Jetson does not require the installation of CUDA inside the Docker container.
-
Log in to your NVIDIA developer account and press any arrow key.
-
Choose what packages you want to install on your Nano, you can select/deselect items with the space bar and navigate with the arrow keys.
-
Once chosen, press enter and wait for all files to download.
-
The Nano should be plugged in while in recovery mode, before connecting it and turning it on, insert a jumper on the FC RECOVERY and GND pins. Once on and booted, remove that jumper. Note that each Jetson board has its own instructions for it to be set in recovery mode. Please refer to the appropriate NVIDIA instructions.
-
Flash the Nano in manual mode and wait for the installation to finish.
-
The Nano’s OS is fully installed, now it’s time to initialize the OS. You can follow this tutorial for a headless installation. In Ubuntu 18.04, the drivers of the WiFi adapter are already included. Now you can set up your environment and use it accordingly.
Method 2: Using NVIDIA SDKManager GUI
GUI Installation depends on your host OS. In this sense, some older Jetsons may require older versions of Ubuntu (18.04). Some commercial development boards might require the GUI method as they are not intended for development. Only use this method if required as it will use some of your system’s dependencies.
-
Download the NVIDIA SDKManager from here. Use the .deb file to install it on Ubuntu and make sure that your Jetson device is supported by your host OS.
-
Install the NVIDIA SDKManager with apt and run it.
-
Login to your NVIDIA Developer account.
-
In this tutorial, we will use the Jetson Xavier NX. Boot it up in force recovery (insert jumper on FC RECOVERY and GND pins).
-
Deselect host OS packages, choose your Jetson device from the drop-down menu along with the desired version of JetPack (latest is recommended).
-
Choose what packages you want to download and install. SDKManager will now download the required packages and build the target OS using your host OS dependencies. Once the download is finished, it is time to flash your Jetson.
-
Remove the jumper, and choose the storage device you want to install the OS on.
-
Wait for flashing to finish, and follow this tutorial for headless installation. Now you can ssh into your device as usual.