Ever wonder which L4T version is running on your NVIDIA Jetson Development Kit? There’s a script for that! Looky here:
If you are a newcomer to the Jetson, some of the references to the operating system that runs on the device can be a little confusing. The operating system is Linux 4 Tegra, abbreviated as L4T, a Linux Ubuntu variant. Ubuntu runs on top of a Linux kernel, which is the lower level part of the operating system which interacts with the computer and devices. That seems simple enough, but it tends to get confusing because of the different development environments that people use.
The NVIDIA recommendation is to install the OS and supporting packages using the JetPack installer from a host Ubuntu computer. JetPack installs L4T on the device, along with other support libraries selected by the user. The user may optionally select to install many of these tools on the host. This is useful for developers who wish to use the host PC as a cross development environment for the Jetson.
Each different version of JetPack has a specific version of L4T that it installs. Typically JetPack will note which version that will be installed during the installation process. What happens is that many people will refer to the OS version as the JetPack version that installed L4T on the Jetson. Of course, as different JetPack releases and Jetson Dev Kit versions become more numerous, it becomes harder to correlate which version of L4T is actually installed on the device. It’s an obvious disconnect. Some of the more experienced Jetson developers can keep the map in their head, but for more normal folks it’s easier to look it up. Worse, if you use multiple Jetsons or you did not flash them yourself using JetPack, then sometimes it’s difficult to know what version is actually running.
Once you know the distinction between the OS version and JetPack, it’s easy enough to figure out. Linux developers will simply look in /etc/nv_tegra_release which describes the release in the first line (sample, GCID hidden):
# R28 (release), REVISION: 1.0, GCID: [an ID], BOARD: t186ref, EABI: aarch64, DATE: Thu Jul 20 07:59:31 UTC 2017
There’s the information. The release is R28 and revision is 1.0 which gives L4T 28.1.0. The BOARD parameter indicates the t186ref which is a Jetson TX2 Development Kit.
If you’re a bit like me, I think the polite term now is ‘simple’, you realize that it would be nice to have a little script that looks this up and prints it out.
Installation and Execution
There is a repository on the JetsonHacks account on Github which contains a Python script to help us along. To install:
$ git clone https://github.com/jetsonhacks/jetsonUtilities
$ cd jetsonUtilities
To run the script:
$ python jetsonInfo.py
Because the script is marked as executable, an alternative is to:
The result will be similar to:
Hardware Model Name not available
Ubuntu 16.04 LTS
Kernel Version: 4.4.38-tegra
In addition to the L4T version, the script prints out the Ubuntu version and kernel version which may be useful to know.
On some versions of the release, the Hardware Model of the board may be present, e.g. jetson_tx1. On the later versions of L4T this does not seem to be the case. Note that it is not an error.
Out in the real world, most people talk about the Ubuntu version. Therefore it’s useful at times to know which Ubuntu version that L4T is built from. For example, if you are using ROS there is a corresponding version for each Ubuntu release. It’s a slight distinction, but worth noting. For the most part, the L4T revision denotes the changes to get Ubuntu running on the Jetson hardware at the firmware, kernel and device tree level.
Hopefully this article gives a little bit of insight as to what other developers mean when they talk about which version of L4T is running on the Jetson. While an experienced developer can infer which version of L4T is installed on the device, the L4T designator is really the only way to know the current machine configuration.
As shown in the video, this script works on the Jetson TX2, Jetson TX1, and Jetson TK1.