Is this a dev kit? Or does it use a third party carrier board? I will answer for a dev kit, but if you have a third party carrier board, then there are changes needed for device tree.
On your Ubuntu 20.04 host PC, go to the L4T release page, and then to the release which matches your current system (found with “head -n 1 /etc/nv_tegra_release
”). In the case of nothing on the system already, then you pick the most recent release which is compatible with your TX2 hardware (so an R32.x release, whatever is currently the newest):
https://developer.nvidia.com/linux-tegra
From there you will download the “driver package” and the “sample root filesystem”.
Find an empty directory on your host PC. Unpack the driver package without using sudo
. This produces a “Linux_for_Tegra/
” subdirectory. Go there. You will then see a “rootfs/
” subdirectory to that directory. Go to that. Now unpack the “sample root filesystem” using sudo
. Now cd
back to “Linux_for_Tegra/
”. Prepare the rootfs via this command:
sudo ./apply_binaries.sh
Optionally, if you want to set up the first boot account before flashing, and have this exist on every flashed system, then you can also do that:
sudo ./tools/l4t_create_default_user.sh
All of that is done only once. From then on you can flash. If you had used JetPack, then all of that (other than l4t_create_default_user.sh
) would have been done automatically (even the download part).
Since I assume this is a “jetson-tx2
” target. At “Linux_for_Tegra/
”, notice a lot of “*.conf
” files. Many of these are symbolic links (acting like an alias) to other files. Those “other files” are named after a “not so descriptive” module model, plus a carrier board model. This determines some of the content of a flash, e.g., it can change boot content and device tree. When you use the target “jetson-tx2
”, then it really uses “jetson-tx2.conf
”. The alias “jetson-tx2.conf
” might point at “p2771-0000-devkit.conf
”, which is more or less a specification. Because a TX2 dev kit does not have an optional carrier board, you won’t find the final file naming a more complex product number. A related model is the TX2 industrial, which is target “jetson-tx2i.conf
”, and this in turn is an alias to a more complicated model pair p2771-3489-ucm1.conf
". That’s actually unimportant, but I wanted to suggest that the gist of knowing what to flash is to look at the .conf
files and find one which matches your hardware. For you, it is probably just “jetson-tx2
” (there might at times be an alias “jetson-tx2-devkit
”).
The eMMC is designated as “/dev/mmcblk0
”, and the rootfs partition designation is “/dev/mmcblk0n1p1
”. This is the command line flash, and assumes the Jetson is correctly connected via USB and is in recovery mode:
sudo ./flash.sh jetson-tx2 mmcblk0p1
If something fails, you could log this flash with a simple modification (it doesn’t hurt to save a copy of the flash anyway):
sudo ./flash.sh jetson-tx2 mmcblk0p1 2>&1 | tee log_flash.txt
There are possibly some packages you’ll need to add on the host PC if something is “missing” during flash. If flash fails for this reason, you just use apt-get
to install this to the host PC. You have reset the recovery mode before a second flash operation, so perhaps you would hold recovery pins shorted (there is a nice button on the TX2 dev kit), and momentarily power reset (then let go of the recovery pin).
If something is still wrong, the attach the flash log to the forum.
Note that you will need to log in to the Jetson itself to add optional content, e.g., CUDA.