Upgrading NVidia Tegra TK1 Linux4Tegra rootfs

Upgrading NVidia Tegra TK1 Linux4Tegra rootfs

Checking the file system versions

You might have noticed that the TK1 home directory has a folder called 'NVIDIA_INSTALLER'. Using a quick ls on that directory you should see the release of Linux4Tegra that shipped with your TK1. 

To save you a lot of time read past history release notes. I'll list the highlights prior to the current version release 21.2. 
  • My unit shipped with release 19.2 (and likely cuda 6.0)
  • After release 21.1 the default bootloader changed from 'fastboot' to 'U-boot' and cuda was upgraded to support cuda 6.5
  • The current release 21.2 ships with both bootloaders, so the configuration can be tweaked if desired prior to installing

Source reference

The best documentation out there is from the release Documentation. The index.html will cover almost everything needed. It outlines the file format, so as to be able to write shell scripts to update to a new release and also how to upgrade the bootloader and config files. The target http calls for releases are generally using the same formatted directories for wget to use. 

Visit the releases website to check for updates:
developer.nvidia.com/linux-tegra

Steps to upgrade OS to Linux4Tegra release 21.2

On the host development machine (Ubuntu 14.04), run the provided shell script to download and unwrap the pre-configured release package.

#: sudo get-pkg_r21.2.sh

This effectively does the following:

wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_armhf/Tegra124_Linux_R21.2.0_armhf.tbz2

wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_armhf/Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2

sudo tar -jvxpf Tegra124_Linux_R21.2.0_armhf.tbz2
cd Linux_for_Tegra/rootfs
sudo tar -jvxpf ../../Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2

rm -f ../../Tegra124_Linux_R21.2.0_armhf.tbz2
rm -f ../../Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2

cd ../
sudo ./apply_binaries.sh



  1. Power down the Jetson and then connect the Jetson via the USB micro B to A male connector to your host PC. 
  2. You need to put the board into 'Recovery Mode' first. To do this, you need to press and hold the 'Recovery Mode' button while pressing and releasing the 'Power' button. After 1-2 seconds release the 'Recovery Mode' button after the board has booted.


If you are using a Ubuntu 12.04 or 14.04 machine, just use lsusb to find the Nvidia device when connected physically. The device will be labeled 'NVidia Corp.'

If you are using a VM (like I am), you will need to set the USB connection as a pass-through. Unfortunately this device does not interrupt OSX to ask whether you would like to connect it to Mac or Linux. Instead you have to connect the VM to the device first. This is done in different places in each vm host (virtualbox, vmware, etc...). I'm using vmware to host my Ubuntu 14.04 on my mac. 

So, I have to select from the menu Virtual Machine > USB & Bluetooth > USB & Bluetooth Settings... and then, I have to check the connection I would like to connect. 


After connecting the Jetson Recovery Mode driver to the VM, you can then use lsusb to see the device 'NVidia Corp.'

To update using fastboot:
#: cd Linux_for_Tegra
#: sudo ./flash.sh jetson-tk1 mmcblk0p1

To update using u-boot:
#: cd Linux_for_Tegra
#: sudo ./flash.sh -L bootloader/jetson-tk1/u-boot.bin jetson-tk1 mmcblk0p1

You will see a file browser open and mount a 15GB drive as 'mnt'. The shell script will build a full image to deploy to the device and it will take about 10 minutes to complete. The mount window will disappear, the board will reboot and a USB transfer will start. At the end of the USB transfer there will be instructions to boot the board, however, mine booted automatically. The new image defaults to the GUI display rather than the terminal.


Installing CUDA and OpenCV4Tegra

After you've flashed the Jetson with the latest revision. Install CUDA first, and then install OpenCV4Tegra with the provided shell scripts.

#: scp install-cuda-6.5.sh ubuntu@192.168.x.x:/home/ubuntu
#: scp install-opencv4tegra.sh ubuntu@192.168.x.x:/home/ubuntu
#: ssh ubuntu@192.168.x.x
#: sudo ./install-cuda-6.5.sh
#: sudo ./install-opencv4tegra.sh

Enabling USB 3.0 port

Next the USB is not enabled to 3.0 by default. If you use lsusb you will see that all the ports are set to 2.0 speed. Enabling is actually really simple.

#: sudo vi /boot/extlinux/extlinux.conf

Edit usb_port_owner_info=2 to enable USB 3.0. By default it is set to usb_port_owner_info=0.

#: sudo shutdown -h now




No comments:

Post a Comment