Installation of RedHawk™ 7.3.2 on Jetson™
TX1, TX2 and TX2i Development Boards
Release Notes
July 20th, 20180898003-7.3.2-TX-REV-AThis page intentionally left blank1. Introduction
This document describes the process of installing the ARM64 version of RedHawk™ 7.3.2 on theNVIDIA® Jetson™ TX1, TX2 and TX2i development boards. The directions in this document
supersede all others – they are specific to installing the software on Concurrent Real-Time’s
RedHawk systems.

2. Requirements•••Jetson TX1, TX2 or TX2i Development Board with Internet accessAn x86_64 host system running Ubuntu 14.04 or 16.04 with Internet access
RedHawk Revision 7.3.2 for the Jetson TX1 optical media disk, or theRedHawk Revision 7.3.2 for the Jetson TX2/TX2i optical media disc,depending on your specific development board hardware

3. Installation
3.1.

Download JetPack on the host system

On an x86_64 host system running Ubuntu 14.04 or 16.04, download version 3.2.1 of the Jetson
Development Package (JetPack) from the NVIDIA website via this URL:
https://developer.nvidia.com/embedded/jetpack
Place the downloaded file named JetPack-L4T-3.2.1-linux-x64_b23.run into ajetpack-3.2.1 directory in the home directory of the current user. Note that logging in as theroot user is not required to run the JetPack script.

3.2.

Perform a full JetPack installation of the Jetson

Change into the jetpack-3.2.1 directory and run the JetPack tool as follows:$ chmod +x JetPack-L4T-3.2.1-linux-x64_b23.run$ ./JetPack-L4T-3.2.1-linux-x64_b23.runAt this point, you can generally follow the JetPack L4T instructions that are available on theNVIDIA website via this URL:
http://docs.nvidia.com/jetpack-l4t/index.html#developertools/mobile/jetpack/l4t/3.2.1/jetpack_l4t_main.htm

However, make sure to follow the directions listed below during the installation:
1. On the Select Development Environment screen, select the Jetson TX1, Jetson
TX2 or Jetson TX2i development environment option (depending on your actual
hardware) as shown in the following screenshot:2. Press Next to continue to the next screen and ensure that the JetPack L4T
Component Manager is configured to flash a Full installation on a Jetson TX1, Jetson
TX2 or Jetson TX2i as shown below before proceeding:

Note that if you are performing the JetPack installation process for the first time, JetPack will
download a large amount of software in order to perform the full installation.
Also, throughout the installation process you will be prompted for interactive input in the terminal
window that is spawned from the JetPack tool; make sure to pay attention to these prompts as
the release will pause until the instructions in the prompts are performed.
Complete all remaining steps in the installation process and then proceed to the next section inthis document to begin RedHawk product installation.

3.3.

Copy the RedHawk packages to the Jetson
NOTEThis section assumes you are using the RedHawk 7.3.2 for Jetson TX1 or the RedHawk 7.3.2
for Jetson TX2/TX2i optical media disc. Alternatively, if you wish to install RedHawk from thenetwork refer to Appendix B, “Install RedHawk from Concurrent Real-Time Repositories.”
Once installed continue with section 3.5 below to finalize the installation.

After JetPack has completed the Ubuntu installation on the Jetson, insert the RedHawk 7.3.2 forJetson TX1 or the RedHawk 7.3.2 for Jetson TX2/TX2i optical disc into the Ubuntu host’s opticaldrive and it should automatically mount under the /media/$USER directory (e.g.
/media/ubuntu/RedHawk 7.3.2 aarch64).
Change to the mounted directory and copy the files to the Jetson over the network, as illustrated
by the following example commands:$ cd /media/ubuntu/RedHawk 7.3.2 aarch64/Packages$ scp *.deb ubuntu@12.34.56.78:/tmp

NOTE
During the JetPack installation, two users are automatically created: ubuntu and nvidia.
The password for each user is the matching user name (e.g. login ubuntu, password ubuntu).
Replace 12.34.56.78 with the actual IP address of the Jetson. The RedHawk packages should
now be sitting in the /tmp directory on the Jetson.

3.4.

Install the RedHawk packages on the Jetson

To install the RedHawk packages, log into the Jetson (either via ssh or via the graphical console)and issue the following commands:$ cd /tmp$ sudo apt install ./ccur*.deb

Enter the password for the current user if the sudo command prompts for it.

NOTE
Several warnings may be displayed during package installation, including:•••

cryptsetup: WARNING: could not determine root device…
Warning; /sbin/fsck.rootfs doesn't exist, can't install to…
N: Can’t drop privileges for downloading as file…

You can safely ignore these warnings as they are not relevant
to RedHawk 7.3.2 on Jetson TX1, TX2 and TX2i embedded installations.

At this point all the RedHawk packages, including the RedHawk kernels, should have installedsuccessfully on the Jetson. However, an additional step in the next section is required before you
can boot into the RedHawk kernels.

Add RedHawk entries to the extlinux.conf file

3.5.

Perform the following steps on the Jetson to create boot entries for the RedHawk kernels:
1.

Create a backup of the /boot/extlinux/extlinux.conf file.
$ cd /boot/extlinux$ sudo cp extlinux.conf extlinux.bak

2.

Open the extlinux.conf file in your preferred editor. For example, if using vi:$ sudo vi extlinux.conf

3.

Duplicate all the primary kernel entry text lines to create a second identical entry
below the initial entry. For example:
TIMEOUT 30
DEFAULT primary
MENU TITLE p2771-0000 eMMC boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/ImageAPPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4
LABEL primary
MENU LABEL primary kernel
LINUX /boot/ImageAPPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4

4.

Customize the duplicated kernel entry to point to the desired RedHawk kernel. For
example, to create an entry on a Jetson TX2 for the RedHawk trace kernel:
LABEL redhawk-trace
MENU LABEL redhawk-trace kernel
LINUX /boot/Image-4.4.38-rt49-r28.2.1-RedHawk-7.3.2-trace
APPEND ...
 leave contents identical and unchanged5.

Add an INITRD line specifying the initrd.img image that is associated with theRedHawk kernel in the newly created RedHawk kernel entry. For example:
LABEL redhawk-trace
MENU LABEL redhawk-trace kernel
LINUX /boot/Image-4.4.38-rt49-r28.2.1-RedHawk-7.3.2-traceINITRD /boot/initrd.img-4.4.38-rt49-r28.2.1-RedHawk-7.3.2-trace
APPEND ...
 leave contents identical and unchanged

NOTERedHawk kernels will not boot without their associated INITRD lines.

NOTE
Make sure to use the correct file names for the LINUX and INITRD entries,
and be aware that the L4T software level used for the TX1 (r28.2) isdifferent than the L4T software level used for the TX2 and TX2i (r28.2.1).

6. Change the default kernel to the newly added RedHawk kernel by changing the DEFAULT
entry at the top of the file:
TIMEOUT 30
DEFAULT redhawk-trace

Note that if your Jetson has been set up with a serial console, you may choose to skip
this step and instead interactively decide which kernel you wish to boot each time thesystem restarts.

3.6.

Reboot to the RedHawk kernel

Finally, reboot the Jetson and it should now be running the selected RedHawk kernel. To verify
this, issue the following command:$ uname -r

On the Jetson TX1 you should see a line displayed like the following:
4.4.38-rt49-r28.2-RedHawk-7.3.2-trace

However, on the Jetson TX2 and TX2i you should see a line displayed like the following:
4.4.38-rt49-r28.2.1-RedHawk-7.3.2-trace

Please contact Concurrent technical support if you had any problems during this installation(support@ccur.com or 1-800-245-6453).

4. Known Issues
Special consideration should be given to the following areas.

4.1.

Denver cores impact system performance

The NVIDIA-designed Denver cores (core 1 and 2) can negatively impact the real-time
performance of the Jetson TX2 and TX2i. When enabled, these cores can occasionally add
hundreds of microseconds of latency to real-time operations. Their negative impact can beeliminated by disabling the Denver cores with the following cpu command:# cpu -d 1,2

Because of this real-time impact, the Denver cores are brought down by RedHawk at system
initialization time. If desired, the cores can be enabled again for non-real-time workloads byissuing the following cpu command:# cpu -u 1,2

See the cpu(1) man page for additional information.

4.2.

Lockdep warnings with debug kernels

The kernel code provided by NVIDIA has not been optimized for use with debug kernels, and thisis most evident when the kernel’s CONFIG_LOCKDEP_SUPPORT feature is enabled. Because
RedHawk debug kernels (debug and prt-debug) are built with this feature, lockdep
informational messages will occasionally appear in the system’s message journal. For example:

INFO: possible recursive locking detected...
INFO: lockdep is turned off
These messages are solely informational and they do not appear to cause any real-time or
behavioral problems with the system. Concurrent is working to address these warnings and theywill be eliminated in future versions of RedHawk.

4.3.

Warnings accessing /dev/mem

Attempting to directly access /dev/mem on the Jetson TX1, TX2 or TX2i is not permitted and will
result in errors output to the systems console. For example, invoking the dmidecode application
while a RedHawk kernel is running will output an error like the following:
Program dmidecode tried to access /dev/mem
Note that if the stock NVIDIA kernel is running, you may see hundreds of lines of SError
messages output to the console, similar to the following:
CPU4: SError detected, daif=140, spsr=0x20000000, mpidr=800001020
CPU4: SError detected, daif=140, spsr=0x40000145, mpidr=800001020
ROC:IOB Machine Check Error:
Address Type = Secure DRAM
Address = 0x0 (Unknown Device)...
These errors are only informational and can be ignored.

4.4.

Change to PAM Capability module directory

The PAM Capability module directory that is documented in some versions of the RedHawk
User’s Guide is incorrect for the Jetson TX1, TX2 and TX2i. The correct PAM Capability module
location for the Jetson TX1. TX2 and TX2i should be shown as:/lib/aarch64-linux-gnu/security/pam_capability.so
If you wish to use the PAM Capability feature with services in the /etc/pam.d directory, thenyou should refer to the PAM Capability module as follows:
session required /lib/aarch64-linux-gnu/security/pam_capability.so

4.5.

Additional steps required for the PRT Debug kernel

The following steps must be performed each time you wish to boot the PRT Debug kernel:
1. Reboot the board.
2. Press a key when Hit any key to stop autoboot appears on the console.
3. Issue the following commands at the U-boot shell prompt:
setenv ramdisk_addr_r 92800000
run bootcmd_mmc0
4. Select the PRT Debug kernel from the list of kernels to boot and press ENTER.
The PRT Debug kernel will now boot and the system will come up to the configured run level.

A. Serial Console Setup
Concurrent recommends setting up a serial console when using RedHawk on the Jetson TX1 andTX2 development boards. This appendix provides details and tips for connecting a serial console.

A.1.

Purchase a Raspberry Pi serial cableFirst, you will need to purchase a special cable that attaches to specific pins on the Jetson
motherboard to provide a USB serial connection suitable for a desktop PC. Concurrent
recommends using the following Raspberry Pi cable, but other similar products may also work:•Adafruit Industries 954 USB-to-TTL Serial Cable, Raspberry Pi
http://www.amazon.com/ADAFRUIT-INDUSTRIES-954-SERIAL-RASPBERRY/dp/B00DJUHGHI

A.2.

Connect the serial cable to Jetson and PC

Once you have the correct serial cable, follow the instructions in the video on this page to attachthe cable to either the Jetson TX1, TX2 or TX2i and then to a desktop PC:•Serial Console – NVIDIA Jetson TX1
http://jetsonhacks.com/2015/12/01/serial-console-nvidia-jetson-tx1/

Here is a brief summary of the important information of this video:•The header pins are marked J21 with an arrow pointing to pin 1. Each pin is numbered asshown in the following image:The serial cable’s white wired connector goes to pin 8, green wired connector goes to pin 10 andblack wired connector goes to pin 9. Note that the red wired connector is not used.
•The minicom settings should be configured as shown below:

B. Install RedHawk from Concurrent Real-Time Repositories
RedHawk can be installed over the network utilizing the Concurrent Real-Time software repositories.
This has the advantage that it will install the latest updates that have been released, however some
up-front setup is required to perform the installation; follow the steps below to complete this setup.

B.1.

Install Concurrent Real-Time Public Keys

Concurrent Real-Time signs its APT repositories with a GPG-generated DSA and ElGamal keypair. You need to install Concurrent Real-Time's public key so that the APT system can authorize
usage of the repositories.
You can download the ccur-public-keys file and import the key file as needed into APT's key ring.
You should import the key file before attempting to access software from Concurrent Real-Time'srepositories.
The following commands will download the public key and install it.
wget -q http://redhawk.concurrent-rt.com/network/ccur-public-keys
apt-key add ccur-public-keys
If you wish to check the authenticity of the public keys file you downloaded from Concurrent RealTime's web site, request the key fingerprints from Concurrent Software Support and comparethem to the fingerprints of the keys you downloaded.
You can obtain the fingerprints of the keys you downloaded with the following command:
gpg --with-fingerprint ccur-public-keys

B.2.

Install Repository Definition Files

Repository definition files tell the APT installation and update system how to access specificrepositories. The definition files must reside in the /etc/apt/sources.list.d/ directory andthe file name must end .list; e.g. /etc/apt/sources.list.d/ccur.list.
Use the following format for the repository definition of the RedHawk 7.3.2 for Jetson TX2
product:
deb [arch=arm64] http://redhawk.concurrent-rt.com/ubuntu/login/passwd/redhawk/tx2 7.3.2 core

For example, the following entry substitutes a fictional login and password:deb [arch=arm64] http://redhawk.concurrent-rt.com/ubuntu/LR12345/t0ps3cr3t/redhawk/tx2 7.3.2 core

Note that if the NightStar tools have been purchased for this machine, then you should also add arepository definition for the NightStar tools below the previously added line. For example:
deb [arch=arm64] http://redhawk.concurrent-rt.com/ubuntu/LR12345/t0ps3cr3t/nightstar 4.6 rt

Once the repository definition file is in place the repository setup is complete. Run the following
command as root to ensure that the software repositories have been added correctly:
sudo apt update
If you see errors or warnings produced that reference the newly added ccur.list file, thenverify that all the above steps have all been completed as documented.

B.3.

Install RedHawk Packages

Now that the setup is done, simply issue the following command to install all the latest RedHawk
7.3.2 packages (and NightStar 4.6 packages if purchased) onto the current system:
apt install 'ccur-*'Once this command completes the RedHawk packages are installed. Continue with Section 3.5,
“Add RedHawk entries to the extlinux.conf file” in order to finalize the RedHawk installation.

B.4.

SupportIf you need assistance, please contact the Concurrent Real-Time Software Support Center at ourtoll free number 1-800-245-6453. For calls outside the continental United States, the number is 1954-283-1822. The Software Support Center operates Monday through Friday from 8 a.m. to 5p.m., Eastern Standard Time.
You may also submit a request for assistance at any time by using the Concurrent Real-Time
web main site at http://concurrent-rt.com/support or by sending an email to support@concurrentrt.com.