Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install LT4 21.1 on Jetson TK1

For best results, you should read through the official NVIDIA documentation found on:

https://developer.nvidia.com/linux-tegra-rel-21

In particular, the Quick Start Guide.

For this process you will need:

  • A host desktop or laptop computer running Ubuntu Linux 12.04 is officially recommended. In practice, this may be a virtual machine, I have used VirtualBox in the past. Also, I've successfully flashed from Ubuntu Linux 14.04. Your mileage may vary.
  • Micro USB cable provided with the Jetson TK1 kit
  • Jetson TK1 and power supply
  • Optional: DB9 null modem cable if you want to use the serial console during boot
  1. On your host computer open a Terminal, then create a directory to operate from, and switch to it. As an example:
mkdir ~/LT4
cd ~/LT4
  1. Download NVIDIA Linux4Tegra (L4T) Board Support Package (BSP) and Sample Root Filesystem from NVIDIA
wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.1.0/Tegra124_Linux_R21.1.0_armhf.tbz2
wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.1.0/Tegra_Linux_Sample-Root-Filesystem_R21.1.0_armhf.tbz2
  1. Extract NVIDIA files (BSP and rootfs)
sudo tar xpf Tegra124_Linux_R21.1.0_armhf.tbz2
cd Linux_for_Tegra/rootfs
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R21.1.0_armhf.tbz2
cd ../ 
  1. Apply binaries
#sudo is important here
sudo ./apply_binaries.sh
  1. Connect the Jetston TK1 to the host Linux computer via the micro-usb cable, and place the Jetson TK1 into recovery mode (by holding down the hardware Recovery button on the board and either pushing the Reset button if power is already plugged in, or plug in power for the first time).
  2. Run lsusb on your host computer and make sure you see some kind of NVIDIA device
  3. Flash the entire board from host computer command line (this will take some time to build the image and then download everything via usb)
sudo ./flash.sh jetson-tk1 mmcblk0p1
  1. You should eventually see Reset the board to boot from internal eMMC. on the host computer. At that point, press the Reset button on the Jetson TK1 board or power cycle it.

  2. You should see boot messages scroll by on a monitor connected to the Jetson. Optionally, you can connect to your Jetson using the DB9 null modem cable and screen /dev/cu.usbserial-A602FDXV 115200 8N1 on the host computer and verify that boot messages scroll by after reset.

  3. Default login is user ubuntu, password ubuntu. You can sudo su to change to root user if necessary.

You should be good to go at this point.

@shehzan10

This comment has been minimized.

Show comment
Hide comment
@shehzan10

shehzan10 Nov 12, 2014

Thanks for the gist.
Does this require the NVIDIA provided USB cable or will any micro-USB cable work?
I'm stuck as my host system is unable to detect the device in recovery mode.

shehzan10 commented Nov 12, 2014

Thanks for the gist.
Does this require the NVIDIA provided USB cable or will any micro-USB cable work?
I'm stuck as my host system is unable to detect the device in recovery mode.

@shehzan10

This comment has been minimized.

Show comment
Hide comment
@shehzan10

shehzan10 Nov 12, 2014

Found the cable. Looks like that was needed.

shehzan10 commented Nov 12, 2014

Found the cable. Looks like that was needed.

@N9VV

This comment has been minimized.

Show comment
Hide comment
@N9VV

N9VV Nov 12, 2014

I had no luck with a new SDHC card. I even tried to mkfs.ext4 /dev/mmblk1p1 but on a subsecquent fdisk -l it shows up as FAT32 (ugh). So I blew away my eMMC and flashed successfully with this command:
sudo ./flash.sh -S 14GiB jetson-tk1 mmcblk0p1
the system now boots into what I believe is 21.1 but that number does not show up in a uname -a or cat /etc/lsb-release or cat /proc/version where should I look to be sure I have the right kernel?
thanks from Chicago, IL USA

N9VV commented Nov 12, 2014

I had no luck with a new SDHC card. I even tried to mkfs.ext4 /dev/mmblk1p1 but on a subsecquent fdisk -l it shows up as FAT32 (ugh). So I blew away my eMMC and flashed successfully with this command:
sudo ./flash.sh -S 14GiB jetson-tk1 mmcblk0p1
the system now boots into what I believe is 21.1 but that number does not show up in a uname -a or cat /etc/lsb-release or cat /proc/version where should I look to be sure I have the right kernel?
thanks from Chicago, IL USA

@jetsonhacks

This comment has been minimized.

Show comment
Hide comment
@jetsonhacks

jetsonhacks Nov 12, 2014

N9VV,
$ uname -r
gives the kernel. For the L4T 21.1 release it should be:

3.10.40-g8c4516e

Owner

jetsonhacks commented Nov 12, 2014

N9VV,
$ uname -r
gives the kernel. For the L4T 21.1 release it should be:

3.10.40-g8c4516e

@nikochaffin

This comment has been minimized.

Show comment
Hide comment
@nikochaffin

nikochaffin Sep 29, 2015

You, sir, are a baller and a scholar. Thanks a ton for the walk-through.

nikochaffin commented Sep 29, 2015

You, sir, are a baller and a scholar. Thanks a ton for the walk-through.

@sachinpandhare

This comment has been minimized.

Show comment
Hide comment
@sachinpandhare

sachinpandhare Oct 14, 2015

Hi, I am not able to switch to 'root' using "sudo su".
It gives me following message:
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid b

Appreciate inputs on this.

sachinpandhare commented Oct 14, 2015

Hi, I am not able to switch to 'root' using "sudo su".
It gives me following message:
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid b

Appreciate inputs on this.

@bollig

This comment has been minimized.

Show comment
Hide comment
@bollig

bollig Nov 19, 2015

FYI, the "./flash.sh: line 519: ./mksparse: cannot execute binary file: Exec format error" will also occur if you don't run on an Intel compatible architecture:

Linux_for_Tegra/bootloader# file mksparse
mksparse: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.2.5, not stripped

Thought I could get away with flashing the TK1 from a Raspberry PI. Guess I'll setup a VM in VirtualBox instead.

bollig commented Nov 19, 2015

FYI, the "./flash.sh: line 519: ./mksparse: cannot execute binary file: Exec format error" will also occur if you don't run on an Intel compatible architecture:

Linux_for_Tegra/bootloader# file mksparse
mksparse: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.2.5, not stripped

Thought I could get away with flashing the TK1 from a Raspberry PI. Guess I'll setup a VM in VirtualBox instead.

@alsam

This comment has been minimized.

Show comment
Hide comment
@alsam

alsam Oct 5, 2016

Hello All!
I've got a problem.
I followed the instructions modified to TX1 and up to date rootfs and BSP

wget ... Tegra_Linux_Sample-Root-Filesystem_R24.1.0_armhf.tbz2
wget ... Tegra210_Linux_R24.1.0_armhf.tbz2

unpacked and made all the necessary steps, but unfortunately after cold boot the system hang in uboot loader.
Any attempts to boot it with either boot or bootdfailed:

Tegra210 (P2371-2180) # bootd
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...

USB device 0: unknown device
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-tegra210
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.

At first glance rootfs was ok:

Tegra210 (P2371-2180) # ext4ls mmc 0:1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 boot
<DIR>       4096 bin
<DIR>          0 dev
<DIR>          0 etc
<DIR>      12288 home
<DIR>      27052 lib
<DIR>       6381 media
<DIR>       4096 mnt
<DIR>        982 opt
<DIR>      14036 proc
              62 README.txt
<DIR>       3422 root
<DIR>       4096 run
<DIR>       3135 sbin
<DIR>       5108 srv
<DIR>       4920 sys
<DIR>       4476 tmp
<DIR>       8450 usr
<DIR>     211416 var

but delving into it:

Tegra210 (P2371-2180) # ext4ls mmc 0:1 /boot/
<DIR>          0 .
<DIR>         57 ..
               0 libidirectfbfont_default.so
               0 libidirectfbfont_dgiff.so

some junk and there is no zImage.
/etc was empty and an attempt to look into /lib hanged uboot

Tegra210 (P2371-2180) # ext4ls mmc 0:1 /etc/
Tegra210 (P2371-2180) # ext4ls mmc 0:1 /lib/
< ? >          0

So it is likely that system.img is corrupted.
Please note I strictly followed these gist instructions and NVIDIA TEGRA LINUX DRIVER PACKAGE QUICK-START GUIDE
I repeated the exercise with flash.sh many times with either artifacts after standard JetPack installation or from pristine Tegra_Linux_Sample-Root-Filesystem_R24.1.0_armhf.tbz2 and got to preliminary conclusion that flash.sh is unreliable at least for TX1 board. As I learned JetPack doesn't use flash.sh for system.img preparation and flashing but rather a binary called flash_os.
Has anybody encountered with the similar problem?
Thanks!

alsam commented Oct 5, 2016

Hello All!
I've got a problem.
I followed the instructions modified to TX1 and up to date rootfs and BSP

wget ... Tegra_Linux_Sample-Root-Filesystem_R24.1.0_armhf.tbz2
wget ... Tegra210_Linux_R24.1.0_armhf.tbz2

unpacked and made all the necessary steps, but unfortunately after cold boot the system hang in uboot loader.
Any attempts to boot it with either boot or bootdfailed:

Tegra210 (P2371-2180) # bootd
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...

USB device 0: unknown device
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-tegra210
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
No ethernet found.

At first glance rootfs was ok:

Tegra210 (P2371-2180) # ext4ls mmc 0:1
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 boot
<DIR>       4096 bin
<DIR>          0 dev
<DIR>          0 etc
<DIR>      12288 home
<DIR>      27052 lib
<DIR>       6381 media
<DIR>       4096 mnt
<DIR>        982 opt
<DIR>      14036 proc
              62 README.txt
<DIR>       3422 root
<DIR>       4096 run
<DIR>       3135 sbin
<DIR>       5108 srv
<DIR>       4920 sys
<DIR>       4476 tmp
<DIR>       8450 usr
<DIR>     211416 var

but delving into it:

Tegra210 (P2371-2180) # ext4ls mmc 0:1 /boot/
<DIR>          0 .
<DIR>         57 ..
               0 libidirectfbfont_default.so
               0 libidirectfbfont_dgiff.so

some junk and there is no zImage.
/etc was empty and an attempt to look into /lib hanged uboot

Tegra210 (P2371-2180) # ext4ls mmc 0:1 /etc/
Tegra210 (P2371-2180) # ext4ls mmc 0:1 /lib/
< ? >          0

So it is likely that system.img is corrupted.
Please note I strictly followed these gist instructions and NVIDIA TEGRA LINUX DRIVER PACKAGE QUICK-START GUIDE
I repeated the exercise with flash.sh many times with either artifacts after standard JetPack installation or from pristine Tegra_Linux_Sample-Root-Filesystem_R24.1.0_armhf.tbz2 and got to preliminary conclusion that flash.sh is unreliable at least for TX1 board. As I learned JetPack doesn't use flash.sh for system.img preparation and flashing but rather a binary called flash_os.
Has anybody encountered with the similar problem?
Thanks!

@SubhiH

This comment has been minimized.

Show comment
Hide comment
@SubhiH

SubhiH Apr 5, 2017

Hello All,
I am working on Jetson TX1.
When I update ubuntu from 14 to 16 many problems appeared and I have to flash the drivers again.
when I run flash.sh I got the following error:

line 534 ./mksparse: cannot execute binary file: Exec format jetson TX1
I need urgent help I have been trying to solve it for hours but failed.
Thanks.

SubhiH commented Apr 5, 2017

Hello All,
I am working on Jetson TX1.
When I update ubuntu from 14 to 16 many problems appeared and I have to flash the drivers again.
when I run flash.sh I got the following error:

line 534 ./mksparse: cannot execute binary file: Exec format jetson TX1
I need urgent help I have been trying to solve it for hours but failed.
Thanks.

@Tarkahn

This comment has been minimized.

Show comment
Hide comment
@Tarkahn

Tarkahn Apr 6, 2017

bollig commented on Nov 18, 2015
FYI, the "./flash.sh: line 519: ./mksparse: cannot execute binary file: Exec format error" will also occur if you don't run on an Intel compatible architecture:

I'm not sure if this is true or not, i'm having the same trouble. What is the host hardware you're flashing from?

Tarkahn commented Apr 6, 2017

bollig commented on Nov 18, 2015
FYI, the "./flash.sh: line 519: ./mksparse: cannot execute binary file: Exec format error" will also occur if you don't run on an Intel compatible architecture:

I'm not sure if this is true or not, i'm having the same trouble. What is the host hardware you're flashing from?

@SubhiH

This comment has been minimized.

Show comment
Hide comment
@SubhiH

SubhiH Apr 7, 2017

I was trying to flash it directly on the board. I did not know that I have to connect the board with a host to flash it.
It is ok now. Thank you all!

SubhiH commented Apr 7, 2017

I was trying to flash it directly on the board. I did not know that I have to connect the board with a host to flash it.
It is ok now. Thank you all!

@EOADEV

This comment has been minimized.

Show comment
Hide comment
@EOADEV

EOADEV Jun 2, 2017

Hello,

i tried to installed the Grinch kernel but after that Jetson never booted up again. So...after following the steps above i eventually see "Reset the board to boot from internal eMMC", and i press the reset button. Jetson is connected with HDMI to the monitor but is outputs nothing. The monitor doesn't even recognize input from the HDMI port. I also tried with the oldest version (that was working for me when i bought the device) 19.3.0.

Any ideas?

EOADEV commented Jun 2, 2017

Hello,

i tried to installed the Grinch kernel but after that Jetson never booted up again. So...after following the steps above i eventually see "Reset the board to boot from internal eMMC", and i press the reset button. Jetson is connected with HDMI to the monitor but is outputs nothing. The monitor doesn't even recognize input from the HDMI port. I also tried with the oldest version (that was working for me when i bought the device) 19.3.0.

Any ideas?

@jarodwen

This comment has been minimized.

Show comment
Hide comment
@jarodwen

jarodwen Jun 11, 2017

One side note: make sure you have at least 10 GB available space in your host Linux system. Otherwise you will see failure at the very beginning when it is preparing the system image.

jarodwen commented Jun 11, 2017

One side note: make sure you have at least 10 GB available space in your host Linux system. Otherwise you will see failure at the very beginning when it is preparing the system image.

@snapp-development

This comment has been minimized.

Show comment
Hide comment
@snapp-development

snapp-development Oct 14, 2017

Has anyone solved the issue of no HDMI output after flashing? I'm having the same problem but can't find a solution anywhere.

snapp-development commented Oct 14, 2017

Has anyone solved the issue of no HDMI output after flashing? I'm having the same problem but can't find a solution anywhere.

@tkkcc

This comment has been minimized.

Show comment
Hide comment
@tkkcc

tkkcc Jul 10, 2018

flashing dji manifold, use flash.sh without -r

  • using archlinux native host, no HDMI output
  • using ubuntu14.04 & ubuntu16.04 in virtualbox, has HDMI output, stuck at boot with this error
[64.249291] tegra-xhci tegra-xhci: failed to init firmware from filesystem tegra_xusb_firmware
  • using ubuntu14.04 native host, same error but with little difference
  • finally create an image of a working device and flash, works

tkkcc commented Jul 10, 2018

flashing dji manifold, use flash.sh without -r

  • using archlinux native host, no HDMI output
  • using ubuntu14.04 & ubuntu16.04 in virtualbox, has HDMI output, stuck at boot with this error
[64.249291] tegra-xhci tegra-xhci: failed to init firmware from filesystem tegra_xusb_firmware
  • using ubuntu14.04 native host, same error but with little difference
  • finally create an image of a working device and flash, works
@FXRer

This comment has been minimized.

Show comment
Hide comment
@FXRer

FXRer Sep 13, 2018

Dear tkkcc,

I also experienced your cited error. What would you propose as host system please? I have Ubuntu 18.4

Thanks,

FXRer commented Sep 13, 2018

Dear tkkcc,

I also experienced your cited error. What would you propose as host system please? I have Ubuntu 18.4

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment