The Jetson TK1 is development board from NVIDIA based on the Tegra K1 chip (also known as Tegra 124). The Tegra K1 (codenamed "Logan") features a quad-core 32-bit ARM Cortex-A15 CPU and Kepler GPU (GK20A) with 192 CUDA cores. The Jetson TK1 can run Debian's armhf port.
U-Boot
Current versions of the Jetson TK1 ship with U-Boot, but if you have an older one you may need to install it. See Installing U-Boot further down this page.
Installing Debian
You can use Debian installer to install Debian on your Jetson TK1.
Copy the standard hd-media files (kernel, ramdisk and boot script) onto your SD card(formatted with VFAT or EXT2). Add a dtb file for the jetson board under a dtbs directory, and a copy of the netboot.iso installer image.
The easiest way to to this is:
untar http://ftp.nl.debian.org/debian/dists/testing/main/installer-armhf/current/images/netboot/hd-media.tar.gz onto the SD card
copy http://cdimage.debian.org/debian-cd/8.5.0/armhf/iso-cd/debian-8.5.0-armhf-netinst.iso onto the SD card (don't try to unpack, just copy the file over)
The existing U-boot config doesn't specify the dtb filename or the console to use for output. You need to set those two things for the installer to work.
setenv console ttyS0,115200n8 setenv fdtfile tegra124-jetson-tk1.dtb saveenv
The Linux kernel won't show any output on the serial console with the default U-Boot configuration, and without the right dtb file it's won't work at all.
Now put the SD card into the Jetson and reset the board. It should just boot off the SD card. If not you can do it manually:
run bootcmd_mmc1
or at lower level
load mmc 1:1 ${kernel_addr_r} /vmlinuz load mmc 1:1 ${fdt_addr_r} /dtbs/tegra124-jetson-tk1.dtb load mmc 1:1 ${ramdisk_addr_r} /initrd.gz bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
The installer will start and you can perform a normal installation. You can consult the installation guide for more information.
The installer will tell you that there is a missing firmware file (rtl_nic/rtl8168g-2.fw). You can safely ignore this warning and choose "no" (don't load additional firmware). The Ethernet will work fine without this firmware file.
You can install to the internal emmc, the external SD card, or a Sata drive (or a USB stick, not covered here). The options are covered below.
Please note that the IDs of the MMC/SD cards are reversed in U-Boot and Debian:
MMC/SD |
U-Boot |
Debian |
Internal |
0 (mmc0) |
0 (mmcblk1) |
External |
1 (mmc1) |
0 (mmcblk0) |
Installing to Sata drive
The U-boot bootloader cannot boot directly off the sata disk, so /boot has to be on flash (either internal or SD card). It is best to use the internal flash so it 'just works'. The large first partition is the one formatted as a real filesystem for this (the other 7 are raw space used for various things such as the bootloader itself).
So set up the disks with /boot on /dev/mmcblk1p1 formatted as ext2 And /root on /dev/sda1 (or however you wish to set up your drive).
After completing the installation you have to tell U-boot where the root partition is, so that it can tell the kernel (it would be nice if this was automatic).
End the installation, and reboot, removing the SD card. Hit a key to stop the boot to get a U-boot prompt and set bootargs to point to whichever partition you used for root:
Simple root on sda1:
setenv bootargs root=/dev/sda1 saveenv
Root using lvm:
setenv bootargs root=/dev/<volumegroup>/<logicalvolume> saveenv
then reboot, and you should be done.
Installing to Internal flash
To install to the internal flash you would install Debian to the first partition on "MMC/SD card #2 (mmcblk1p1)" in the installer. It can be formatted ext2,3 or 4. Leave the other 7 partitions alone as they are used for things like storing the bootloader itself. The board can boot directly from this device.
After you finish your installation, remove the SD card, and Debian will boot from the internal flash. You can override this by putting in an external bootable SD card.
The boot process uses U-Boot's distro support. U-Boot will load a boot script from the SD card (generated by Debian's flash-kernel) which in turn will start the kernel.
Installing to External SD
To install to the external SD you would install Debian to "MMC/SD card #1 (mmcblk0)" in the installer. Note that you need to run the installer frmo some other medium (like a USB stick) to do this.
After you finish your installation, Debian will boot from the external SD card. The external SD card has preference over the internal eMMC.
The boot process uses U-Boot's distro support. U-Boot will load a boot script from the SD card (generated by Debian's flash-kernel) which in turn will start the kernel.
Installing U-Boot
Current versions of the Jetson TK1 ship with U-Boot. If you have an old version, you may have to upgrade to U-Boot first.
You have two options to install U-Boot. You can either install U-Boot provided by NVIDIA or by Debian.
In order to flash U-Boot to your Jetson, you have to put it in recovery mode:
- Turn the device off
- Connect the micro-B USB connector on the Jetson with the USB port on your host
- Hold the "Force Recovery" button
- Turn the board on (while still holding the "force recovery" button)
- Release the button after a few seconds
- You won't see anything on the serial console. However, lspci on your host should show the following device: Bus 003 Device 060: ID 0955:7140 NVidia Corp.
U-Boot from NVIDIA
Please obtain the Linux For Tegra R21.4 driver package (Tegra124_Linux_R21.4.0_armhf.tbz2) from NVIDIA's developer site.
Unpack the tar ball, go to the Linux_for_Tegra directory and run:
sudo ./flash.sh jetson-tk1 mmcblk1p1
Your Jetson should now run U-Boot version 2014.10-rc2.
You can interrupt the boot process by pressing a key via the serial console.
U-Boot from Debian
Debian provides an U-Boot image for the Jetson TK1. In order to install U-Boot from Debian, please obtain the Linux For Tegra R19.3 driver package (Tegra124_Linux_R19.3.0_armhf.tbz2) from NVIDIA's developer site.
Please note that versions R21.1 to R21.4 can not be used to flash Debian's U-Boot.
If you're running Debian stretch, you can install the Tegra U-Boot package on your host:
sudo dpkg --add-architecture armhf sudo apt-get update sudo apt-get install u-boot-tegra:armhf
If you're on an older version of Debian, you can download the package and unpack it somewhere.
Now flash U-Boot to your Jetson:
sudo ./flash.sh -L /usr/lib/u-boot/jetson-tk1/u-boot-dtb-tegra.bin jetson-tk1 mmcblk1p1
(Change the location of the jetson-tk1 directory if you unpacked the package manually.)
Debian's U-Boot binary doesn't support Ethernet at the moment.
Running Debian on the Jetson TK1
Firmware
The Jetson TK1 requires some non-free firmware files to operate fully. Please configure Debian's non-free repository in APT and install the firmware-misc-nonfree package. This is required for the operation of:
- GK20A graphics core (nouveau)
- xHCI (Linux 4.7 and later)
As described above, you can ignore the warnings about missing Realtek (rtl_nic) firmware files. You can install the firmware-realtek package to get of the warnings if you want.
Graphics
NVIDIA ported the free nouveau driver to the Kepler GPU (GK20A) of the Tegra K1.
External links
Jetson TK1 information on the embedded Linux wiki
Jetson TK1 developer forum hosted by NVIDIA
TODO
- Provide SD card images (with the installer, maybe even U-Boot)
- Test and document graphics
- Figure out why Ethernet doesn't work in Debian's U-Boot
- Explain DTB and U-Boot's distro support