Compiling Jetson TX2 source code

From RidgeRun Developer Wiki



Newest Jetpack Versions (Jetpack 3.1 and later)

For newest Jetpack versions please reference this wiki page: Compiling_Tegra_X1/X2_source_code. In case you are going to use Jetpack 3.0 continue in this page.

Introduction

In this wiki page you are going to find the instructions to download the source code to rebuild the Jetson TX2 images using jetpack, several parts of this wiki were based in the document called Start_L4T_Docs.html given by NVIDIA in L4T. This NVIDIA Jetson TX2 page should be considered a work in progress. These steps were run on Jetson TX2.

Platform

Baseboard: 
Jetson module:
Soc:

Download kernel code

Option 1 Manually Download and Expand

Let's call $DEVDIR the path where you download the kernel.

1. In a browser, navigate to: https://developer.nvidia.com/embedded/downloads, Locate and download the L4T Sources (L4T Sources 27.1 2017/03/14). Also you can use wget command:

wget http://developer2.download.nvidia.com/embedded/L4T/r27_Release_v1.0/BSP/r27.1.0_sources.tbz2

2. Copy L4T kernel sources into DEVDIR.

cp r27.1.0_sources.tbz2 $DEVDIR

3. Expand the TBZ2 file.

tar -vxjf r27.1.0_sources.tbz2
# Decompress kernel
sudo tar -xjf kernel_src.tbz2

Option 2 Sync with git

Let's call $JETPACKDIR the path where you installed your development directory or Jetpack.

1) In order to download the source code you can run the script called source_sync.sh

$JETPACKDIR/64_TX2/Linux_for_Tegra_64_tx2$ ./source_sync.sh

This will download the bootloader and kernel.

2) It downloads all the kernel tree but you need to specify the tag, looking into the script it seems that the tags should be specified with k and u parameters

Use: source_sync.sh [options]
Available general options are,
     -h     :     help
     -e     : exit on sync error
     -d DIR : root of source is DIR

By default, all sources are downloaded.
Only specified sources are downloaded, if one or more of the following options are mentioned.

     -k [TAG]: Download kernel source and optionally sync to TAG
     -u [TAG]: Download u-boot source and optionally sync to TAG

Repositories JetPack 3.0 by default has 4.4 kernel version, but if you go to source_sync.sh script, the kernel version is 3.10 as follows:


k:kernel:nv-tegra.nvidia.com/linux-3.10.git:
u:u-boot:nv-tegra.nvidia.com/3rdparty/u-boot.git:

Change the kernel version removing the line:

k:kernel:nv-tegra.nvidia.com/linux-3.10.git:


and adding:

k:kernel:nv-tegra.nvidia.com/linux-4.4.git:


you can see the repositories on the web looking for:

http://nv-tegra.nvidia.com/gitweb/?o=age

kernel 4.4 and u-boot

http://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
http://nv-tegra.nvidia.com/gitweb/?p=3rdparty/u-boot.git;a=summary

3) It will download the git repositories for kernel and uboot but you need to specify the branch or the tag

Branch:

cd $JETPACKDIR/64_TX2/Linux_for_Tegra_64_tx2/sources/kernel_source
git branch -a
git checkout l4t/l4t-r27.1

cd $JETPACKDIR/64_TX2/Linux_for_Tegra_64_tx2/sources/u-boot_source
git branch -a
git checkout l4t/l4t-r27.1

Or if you want to download a tag then the command should look like:

./source_sync.sh -k tegra-l4t-r27.1 -u tegra-l4t-r27.1

Toolchain

Option 1

1) Download the pre-built toolchain binaries, The AARCH64 toolchain is available at: http://developer.nvidia.com/embedded/dlc/l4t-gcc-toolchain-64-bit-27-1. The source TAR file is named: gcc-4.8.5-aarch64.tgz

2) Decompress tarball file.

tar -xvf gcc-4.8.5-aarch64.tgz

3) Install toolchain.

mkdir /opt/jetpack3.0
cp install /opt/jetpack3.0/ -r

Option 2

1) Download the pre-built toolchain binaries from the Embedded Download Center on the NVIDIA Developer page at: https://developer.nvidia.com/embedded/downloads (Sources for GCC Tool Chain for 64-bit BSP )

The toolchain source tarball (src_aarch64_gcc-4.8.5.tar) contains the following:

  • The required sources to build the toolchain.
  • The make-aarch64-toolchain.sh script that builds the toolchain.
  • A patches folder containing patches to the toolchain sources.

2) Decompress tarball file.

tar -xvf src_aarch64_gcc-4.8.5.tar

3) Run the toolchain building script.

./make-aarch64-toolchain.sh

4) Install the toolchain

mkdir /opt/jetpack3.0
cp install /opt/jetpack3.0/ -r

Kernel

In order to compile the kernel please follow these steps

Build Kernel

Let's call $DEVDIR the path where you download the kernel code.

1. Specify the path to the toolchain and architecture:

export CROSS_COMPILE=/opt/jetpack3.0/install/bin/aarch64-unknown-linux-gnu-
export ARCH=arm64

2. Define and create destination directories.

export TEGRA_KERNEL_OUT=/home/$USER/devdirs/tegra-kernel/r27.1.0_sources/images
export TEGRA_MODULES_OUT=/home/$USER/devdirs/tegra-kernel/r27.1.0_sources/modules
mkdir -p $TEGRA_KERNEL_OUT
mkdir -p $TEGRA_MODULES_OUT

3. Clean your kernel and configuration

make -C kernel/kernel-4.4/ mrproper

4. Configure your kernel

make -C kernel/kernel-4.4/ O=$TEGRA_KERNEL_OUT tegra18_defconfig
make -C kernel/kernel-4.4/ O=$TEGRA_KERNEL_OUT menuconfig

5. Compile kernel, device tree and modules. To speed up compilation on multiprocessor systems, use -j n, this option tells make to execute many recipes simultaneously.

make -C kernel/kernel-4.4/ O=$TEGRA_KERNEL_OUT zImage
make -C kernel/kernel-4.4/ O=$TEGRA_KERNEL_OUT dtbs
make -C kernel/kernel-4.4/ O=$TEGRA_KERNEL_OUT modules
make -C kernel/kernel-4.4/ O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$TEGRA_MODULES_OUT

6. Save your Images and device tree

mkdir boot
cp images/arch/arm64/boot/Image boot/
cp images/arch/arm64/boot/dts/* boot/

Flash your Kernel image using Jetpack 3.0 root file system

1. Install jetpack 3.0: Installing_Jetpack_3.0

2. Flash your board with Jetpack, the root file system will be on an SD card

3. Go to Linux_for_Tegra_64_tx2 directory

cd $JETPACKDIR/64_TX2/Linux_for_Tegra_64_tx2/

4. Put the board into force USB Recovery Mode:

1. Power down the device. If connected, remove the AC adapter from the device. The device must be
powered OFF, and not in a suspend or sleep state.
2. Connect the Micro-B plug on the USB cable to the Recovery (USB Micro-B) Port on the device and
the other end to an available USB port on the host PC.
3. Connect the power adapter to the device.
4. Press POWER button
5. Press and hold the RECOVERY FORCE (REC) button.
6. While pressing the RECOVERY FORCE button, press and release the RESET button.
7. Wait 2 seconds and release the RECOVERY FORCE button

5. Use ./flash.sh in order to configure TX2 board, Also this script configures jetpack rootfs to be used as SD filesystem. Execute the script as follows:

sudo ./flash.sh jetson-tx2 mmcblk1p1

6. Create ext4 partition called "rootfs".

sudo mkfs.ext4 /dev/mmcblk0p1 -L "rootfs"

7. Copy rootfs from jetpack 3.0

sudo cp -a $JETPACKDIR/64_TX2/Linux_for_Tegra_tx2/rootfs/* /media/$USER/rootfs/

8. Copy kernel image, device tree, and modules.

cd $TEGRA_KERNEL_OUT
sudo cp -a arch/arm64/boot/Image /media/$USER/rootfs/boot/Image 
sudo cp -a arch/arm64/boot/dts/tegra186-quill-p3310-1000-c03-00-base.dtb /media/$USER/rootfs/boot/
cd $TEGRA_MODULES_OUT
sudo cp -a lib/* /media/$USER/rootfs/lib/

9. Modify extlinux.conf. The Device Tree Binary (DTB) is no longer specified by default in /boot/extlinux/extlinux.conf therefore you have to set this field manually in /media/$USER/rootfs/boot/extlinux/extlinux.conf (see: http://elinux.org/Jetson/TX2_DTB)

TIMEOUT 30
DEFAULT primary

MENU TITLE p2771-0000 SD Card boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
      APPEND fbcon=map:0 net.ifnames=0 console=tty0 OS=l4t console=ttyS0,115200n8 memtype=0 video=tegrafb no_console_suspend=1 earlycon=uart8250,mmio32,0x03100000 gpt tegraid=18.1.2.0.0 tegra_keep_boot_clocks maxcpus=6 android.kerneltype=normal androidboot.serialno=0335115020673 vpr_resize root=/dev/mmcblk1p1 rw rootwait

10. Unmount the device and Put the SD into the tx2 board, and boot the board.

umount /media/$USER/rootfs

Username and password: nvidia. You can see the ipaddress connecting a keyboard, mouse and monitor to the board at this point since ubuntu would be already booted.

DTB

Looking into the file $JETPACKDIR/64_TX2/Linux_for_Tegra_tx2/jetson-tx2.conf the dtb used by jetson x1 is: tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb

#!/bin/bash

# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#  * Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#  * Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#  * Neither the name of NVIDIA CORPORATION nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# p2771-0000-devkit-24x7.conf: configuration for T186-A02 te770d-UCM2 Silicon

BPFDTB_FILE=tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb;

source "${LDK_DIR}/p2771-0000.conf.common";

Bootloader

The bootloader is a combination of NVIDIA T-Boot (nvtboot) and U-Boot. You can read about the BOOT FLOW in the nvtboot wiki page.

According to the devtalk forum there are two ways to boot the board: fast boot and uboot

  • Fastboot is simpler, and offers no options during boot. It strictly looks for a kernel in the GPT partition from the install's "-k 6" option. This would probably be the way to go for a non-interactive embedded appliance (if not bare metal booting).
  • U-boot offers more options, and looks for a zImage in the /boot partition. Boot configuration can also be edited here, for example I threw in a couple of zImage variants (like debugging version and network options added), and edited extlinux.conf...and magically I can boot to any of those kernels at the serial console boot prompt (provided my eye is fast). No flash was required for any kernel beyond the first kernel.

Inside of the bootloader directory you will find several binaries or components, to get a description of these please read the nvtboot wiki page.

Build DTC

U-boot requires the Device Tree Compiler (dtc) which is used to compile device tree files contained in the U-Boot source tree. One version is included inside of the kernel. However, that binary is too old according to u-boot when trying to use that one

*** Your dtc is too old, please upgrade to dtc 1.4 or newer
$DEVDIR/images/dtc -v
Version: DTC 1.2.0-g37c0b6a0

In order to build it please run:

cd $JETPACKDIR/64_TX2/Linux_for_Tegra_tx2/sources
git clone git://git.kernel.org/pub/scm/utils/dtc/dtc.git
cd dtc
make
cp dtc $DEVDIR/images/

Build u-boot

1. Backup original uboot files. You see which platform you are using checking the file in $/64_TX2/Linux_for_Tegra_tx2/jetson-tx2.conf, it says:

SYSBOOTFILE=p2371-2180-devkit/extlinux.conf;

copy the files to the packages-backup directory

mkdir $JETPACK/images/packages-backup/bootloader/
cp -rf $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/t210ref/p2371-2180-devkit $JETPACK/images/packages-backup/bootloader/
cd $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/
cp nvtboot.bin nvtboot_cpu.bin u-boot-dtb.bin bpmp.bin warmboot.bin tos.img tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb $JETPACK/images/packages-backup/bootloader/
cp $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/t210ref/p2371-2180 $JETPACK/images/packages-backup/bootloader/

Check that all these components are flashed in one partition according to output when flashing Tegra X1. The description of each of these components in on the t210-nvtboot-flow and tegra-boot-flow pages.

2. Go to uboot and set environment variables. You need to export the images directory path in order to allow u-boot find the DTC

cd $JETPACK/64_TX2/Linux_for_Tegra_tx2/sources/u-boot_source/
PATH=$JETPACK/images:$PATH
export CROSS_COMPILE=/opt/linaro/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export ARCH=arm64

3. Clean and compile

make distclean
make p2371-2180_defconfig
make

4. Save your new binaries

mkdir $JETPACK/images/bootloader
cp $JETPACK/64_TX2/Linux_for_Tegra_tx2/sources/u-boot_source/u-boot{,.bin,.dtb,-dtb.bin} $JETPACK/images/bootloader

5. Now, copy your u-boot binaries to the directory used by Jetpack to look for them. As you can see in the DTB it will look for them in

target_board="t210ref";
BOOTLOADER="bootloader/${target_board}/p2371-2180/u-boot-dtb.bin";

To copy the files run

cp  $JETPACK/images/bootloader/u-boot{,.bin,.dtb,-dtb.bin} $JETPACK/64_TX2/Linux_for_Tegra_tx2/bootloader/t210ref/p2371-2180/

6. Now run jetpack or follow the steps below to use flash.sh and let it install the new binaries as we did with the kernel. You can check the serial console output to see that u-boot has a newer date

U-Boot 2015.07-rc2 (Apr 28 2016 - 19:24:09 -0600)

If you are attached to the serial port while flashing you should see the serial port output log while flashing

Boot sequence

According to the U-boot guide provided by Nvidia uboot scans booteable devices as follows:

  • External SD Card
  • Internal eMMC
  • USB Device
  • NFS Device

It looks for an extlinux.conf configuration file in the following directory of the bootable device:

<rootfs>/boot/extlinux

Upon finding the extlinux.conf file, U-Boot does the following.

  • Uses the sysboot command to read out boot configuration from extlinux.conf,
  • Loads kernel Image file and device tree file (/boot), and then
  • Boots the kernel.

extlinux.conf is a standard text-format sysboot configuration file that contains all boot information, it is installed in /boot according to the boot method.

Boot log and uboot environment

Following boot log was obtained when connected to the serial console using the default uboot environment.

The environment is defined in extlinux.conf, however, the environment variables can be set in the uboot code directly or directly when the board is booting using the typical uboot commands like: print, saveenv, printenv, etc

Filesystem

Jetpack comes with a sample filesystem with X and ubuntu and Canonical keeps updating the packages available, you can also use your own filesystem. In both cases you have to install on it the Nvidia binaries, the instructions to do that are in the file Start_L4T_Docs.html, in the Getting started section. It mentions:

Extract the sample file system to the rootfs directory with this command:

$ sudo tar jxpf ../../Tegra-Linux-Sample-Root-Filesystem_<release_type>.tbz2

Run the apply_binaries.sh script to copy the NVIDIA user space libraries into the target file system:

$ cd ..
$ sudo ./apply_binaries.sh

If you are using a different rootfs, or if you have already configured your rootfs, apply the NVIDIA user space libraries by setting the LDK_ROOTFS_DIR environment variable to point to your rootfs. Then run the script, as shown above, to copy the binaries into your target file system.

If the apply_binaries.sh script installs the binaries correctly, the last message output from the script is “Success!”.

You can create your own ubuntu filesystem using .deb packages as sources following this instructions. The sample filesystem provided is a 32 bits filesystem, however, the kernel is a 64bits kernel. According to devtalk nvidia will be releasing a 64bits filesystem.

The remaining steps on this guide assumes that you are using the default filesytem or that you already have one built, specially for the flashing section, where flashing assumes that the filesystem already exists.

To receive notifications of new packages

1. Locate and edit the following file:

 /etc/apt/sources.list

2. Add the following line:

deb http://ports.ubuntu.com/ubuntu-ports <distribution>-updates main universe

Where <distribution> is the name of the Ubuntu distribution your rootfs is based on. For example, for a rootfs based on the Trusty Tahr distribution of Ubuntu, add the line:

deb http://ports.ubuntu.com/ubuntu-ports trusty-updates main universe

Prerequisite

You have attached an Ethernet cable to the device through either the Ethernet port (if available) or through the USB Ethernet adapter. To install more packages

  • Boot the target device.
  • Verify your Ethernet connection.
  • Update the package list by executing:
$ sudo apt-get update
$ sudo apt-get install wget

Flashing the board

NVIDIA provides several scripts to help to generate the images and to flash the resulting images. Including if you are going to install uboot or fastboot. First the board needs to be in recovery mode and then the main script to flash it is $JETPACK/64_TX2/Linux_for_Tegra_tx2/flash.sh. What this script will do is to install or flash the image in the desired destination. It is important that the script is controlled by variables defined in the DTB file.

# Examples:
# ./flash.sh <target_board> mmcblk0p1			- boot <target_board> from eMMC
# ./flash.sh <target_board> mmcblk1p1			- boot <target_board> from SDCARD
# ./flash.sh <target_board> sda1			- boot <target_board> from USB device
# ./flash.sh -N <IPaddr>:/nfsroot <target_board> eth0	- boot <target_board> from NFS
# ./flash.sh -k LNX <target_board> mmcblk1p1		- update <target_board> kernel
# ./flash.sh -k EBT <target_board> mmcblk1p1		- update <target_board> bootloader
#
# Optional Environment Variables:
# BCTFILE ---------------- Boot control table configuration file to be used.
# BOARDID ---------------- Pass boardid to override EEPROM value
# BOOTLOADER ------------- Bootloader binary to be flashed
# BOOTPARTLIMIT ---------- GPT data limit. (== Max BCT size + PPT size)
# BOOTPARTSIZE ----------- Total eMMC HW boot partition size.
# CFGFILE ---------------- Partition table configuration file to be used.
# CMDLINE ---------------- Target cmdline. See help for more information.
# DEVSECTSIZE ------------ Device Sector size. (default = 512Byte).
# DTBFILE ---------------- Device Tree file to be used.
# EMMCSIZE --------------- Size of target device eMMC (boot0+boot1+user).
# FLASHAPP --------------- Flash application running in host machine.
# FLASHER ---------------- Flash server running in target machine.
# IGNOREFASTBOOTCMDLINE -- Block fastboot from filling unspecified kernel
#                          cmdline parameters with its defaults.
# INITRD ----------------- Initrd image file to be flashed.
# ITSFILE ---------------- Multi image u-boot package template file.
# KERNEL_IMAGE ----------- Linux kernel zImage file to be flashed.
# MTS -------------------- MTS file name such as mts_si.
# MTSPREBOOT ------------- MTS preboot file name such as mts_preboot_si.
# NFSARGS ---------------- Static Network assignments.
#			   <C-ipa>:<S-ipa>:<G-ipa>:<netmask>
# NFSROOT ---------------- NFSROOT i.e. <my IP addr>:/exported/rootfs_dir.
# ODMDATA ---------------- Odmdata to be used.
# ROOTFSSIZE ------------- Linux RootFS size (internal emmc/nand only).
# ROOTFS_DIR ------------- Linux RootFS directory name.
# TEGRABOOT -------------- lowerlayer bootloader such as nvtboot.bin.
# UBOOTSCRIPT ------------ U-boot HUSH boot script file.
# UBOOT_TEXT_BASE -------- U-boot Image Load Address.
# UIMAGE_LABEL ----------- Kernel version for U-boot image header.
# UIMAGE_NAME ------------ uImage file name.
# WB0BOOT ---------------- Warmboot code such as nvtbootwb0.bin

Recovery mode

To put the board into force USB Recovery Mode:

1. Power down the device. If connected, remove the AC adapter from the device. The device must be
powered OFF, and not in a suspend or sleep state.
2. Connect the Micro-B plug on the USB cable to the Recovery (USB Micro-B) Port on the device and
the other end to an available USB port on the host PC.
3. Connect the power adapter to the device.
4. Press POWER button
5. Press and hold the RECOVERY FORCE (REC) button.
6. While pressing the RECOVERY FORCE button, press and release the RESET button.
7. Wait 2 seconds and release the RECOVERY FORCE button

All remaining examples assume that the board is in recovery mode

Flash filesystem

Emmc

To flash the filesystem in the emmc you need to run:

cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh jetson-tx2 mmcblk0p1

USB

To flash the filesystem to USB you need to put the filesystem on the USB first

1) Insert your USB flash/drive in your PC and check where it was mounted

mount
/dev/sdb1 on /media/dsoto/EF02-5626 type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

2) Format the USB drive in your PCB

umount /dev/sdb1
sudo mkfs.ext4 /dev/sdb1

3) Copy the filesystem to the USB drive. It takes a while, its size is normally 2.4GB

mkdir $JETPACK/images/fs
sudo mount /dev/sdb1 $JETPACK/images/fs 
cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/
sudo cp -a * $JETPACK/images/fs  && sync

4) Unmount the USB drive and remove it

sudo umount $JETPACK/images/fs

5) Finally connect the USB drive to the Jetson board put the Jetson on recovery mode, flash the board to look for the filesystem on the USB port:

cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh jetson-tx2 sda1 #it can be other mount point

SD card

Similar to USB but you need to replace the extlinux.conf so before copying the filesystem into the SD card run:

sudo cp $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/bootloader/t210ref/p2371-2180-devkit/extlinux.conf.sdcard $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/boot/extlinux/extlinux.conf

then flash it

cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh jetson-tx2 mmcblk1p1

NFS

1) First you need to set up your NFS server using these instructions.

2) Open file in $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/etc/network/interfaces and add

auto eth0
iface eth0 inet manual

3) Then flash the board to generate and install the initrd image to use nfs, you need to do this everytime that you recompile the kernel

cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
MY_IPADDRESS=192.169.0.3
sudo ./flash.sh -N $MY_IPADDRESS:$JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs jetson-tx2 eth0

Flash kernel

To flash your kernel you just need to copy it to /boot in your filesystem. The old method to flash it in the LNX partition (./flash.sh -k LNX <target_board> mmcblk1p1) is NOT longer used

sudo cp $JETPACK/images/zImage $JETPACK/images/Image $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/rootfs/boot/

if you are not booting from NFS then you need to reflash your filesystem in order to update the kernel. However, likely you did some changes in the kernel modules so it is recommended to run the apply_binaries.sh script instead of only copying the kernel images.

cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./apply_binaries.sh

then flash your filesystem again.

Flash bootloader

Update the content of the EBT partition where uboot is located

cd $JETPACK/64_TX2/Linux_for_Tegra_64_tx2/
sudo ./flash.sh -k EBT jetson-tx2 mmcblk1p1

Serial Console

J21 contains the Serial Console signals as can be seen in the pin out header. Basically:

J21 Pin 8 (UART 1 TXD) -> Cable RXD
J21 Pin 10 (UART 1 RXD) -> Cable TXD
TX2 J21 Pin 9 (GND) -> Cable GND

There is a nice video with details.

See also



For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.


Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.