Difference between revisions of "Nvidia Jetson TX1 and TX2"

From ERIKA WIKI
Jump to: navigation, search
(ERIKA3 on Jailhouse)
Line 5: Line 5:
 
It has been also shown through a [https://www.youtube.com/watch?v=skIcAkXfNWQ&t=3s YouTube video].
 
It has been also shown through a [https://www.youtube.com/watch?v=skIcAkXfNWQ&t=3s YouTube video].
  
This section explains how to build and install Jailhouse on the TX1 target and how to create an ERIKA3 guest (AKA Jailhouse inmate).
+
This section explains how to build and install Jailhouse on the TX1 target and how to create an ERIKA3 guest (AKA Jailhouse inmate) running a simple application.
  
== Platform setup ==
+
The Eclipse-based RT-Druid tool (for generating the RTOS configuration) requires an x86 platform with a fair amount of resources (in terms of both processing and memory). This requirement, therefore, implies a cross-compilation of ERIKA3.
 +
Additionally, since the build process of ERIKA3 needs a compiled copy of Jailhouse which, in turn, needs a compiled copy of the Linux kernel, we suggest proceeding by '''cross-compiling all software components (i.e., Linux kernel, Jailhouse and ERIKA3 RTOS) on a host x86 machine'''.
 +
 
 +
== TX1 platform setup ==
  
 
Use [https://developer.nvidia.com/embedded/jetpack Nvidia Jetpack 3.1] to flash the Linux distribution by Nvidia onto the TX1 platform.
 
Use [https://developer.nvidia.com/embedded/jetpack Nvidia Jetpack 3.1] to flash the Linux distribution by Nvidia onto the TX1 platform.
Line 13: Line 16:
 
Note that the host machine and the platform must be connected through an OTG USB cable during flashing.
 
Note that the host machine and the platform must be connected through an OTG USB cable during flashing.
  
== Jailhouse support ==
+
== x86 host platform setup ==
 
 
 
 
The Rt-Druid tool (for generating the RTOS configuration) assumes a cross-compilation of ERIKA3.
 
Since the build process of ERIKA3 needs a compiled copy of Jailhouse which, in turn, needs a compiled copy of the Linux kernel, we suggest proceeding by '''cross-compiling all software components (i.e., Linux kernel, Jailhouse and ERIKA3 RTOS) on a host x86 machine'''.
 
  
On Ubuntu, the aarch64 cross-compiler can be installed by typing
+
A cross-compiler for aarch64 is needed. On Ubuntu (tested on version 16.04), this can be installed by typing
 
<pre>
 
<pre>
 
sudo apt install aarch64-linux-gnu-gcc  
 
sudo apt install aarch64-linux-gnu-gcc  
 
</pre>
 
</pre>
 +
 +
== Jailhouse cross-compiling ==
  
 
The [https://github.com/evidence/linux-jailhouse-tx1/blob/master/README.md README] available on the [https://github.com/evidence/linux-jailhouse-tx1 Jailhouse tree on our GitHub] explains how to cross-compile and install Jailhouse.
 
The [https://github.com/evidence/linux-jailhouse-tx1/blob/master/README.md README] available on the [https://github.com/evidence/linux-jailhouse-tx1 Jailhouse tree on our GitHub] explains how to cross-compile and install Jailhouse.
Line 32: Line 33:
  
 
Once Jailhouse has been successfully built, transferred and installed onto the TX1 platform, you have to set-up the RT-Druid development environment to compile the ERIKA3 RTOS.<br>
 
Once Jailhouse has been successfully built, transferred and installed onto the TX1 platform, you have to set-up the RT-Druid development environment to compile the ERIKA3 RTOS.<br>
Unfortunately, the Eclipse IDE requires an x86 platform with a fair amount of resources (in terms of both processing and memory).
 
  
 
Follow the next instructions for installing RT-Druid on the host platform used for cross-compiling:
 
Follow the next instructions for installing RT-Druid on the host platform used for cross-compiling:
Line 45: Line 45:
 
</pre>
 
</pre>
 
<li> Then, using the same shell, enter the extracted archive and run <pre>./eclipse</pre>
 
<li> Then, using the same shell, enter the extracted archive and run <pre>./eclipse</pre>
 +
</ol>
  
 
== Simple example ==
 
== Simple example ==

Revision as of 10:37, 13 March 2018

Introduction

The ERIKA3 RTOS can be run as a guest OS of the Jailhouse hypervisor on the Nvidia Tegra Jetson TX1 board.
Such support has been developed in the context of the HERCULES European project. It has been also shown through a YouTube video.

This section explains how to build and install Jailhouse on the TX1 target and how to create an ERIKA3 guest (AKA Jailhouse inmate) running a simple application.

The Eclipse-based RT-Druid tool (for generating the RTOS configuration) requires an x86 platform with a fair amount of resources (in terms of both processing and memory). This requirement, therefore, implies a cross-compilation of ERIKA3. Additionally, since the build process of ERIKA3 needs a compiled copy of Jailhouse which, in turn, needs a compiled copy of the Linux kernel, we suggest proceeding by cross-compiling all software components (i.e., Linux kernel, Jailhouse and ERIKA3 RTOS) on a host x86 machine.

TX1 platform setup

Use Nvidia Jetpack 3.1 to flash the Linux distribution by Nvidia onto the TX1 platform. JetPack is a tool that runs on an Ubuntu host machine and installs Linux on the TX1 platform. Note that the host machine and the platform must be connected through an OTG USB cable during flashing.

x86 host platform setup

A cross-compiler for aarch64 is needed. On Ubuntu (tested on version 16.04), this can be installed by typing

sudo apt install aarch64-linux-gnu-gcc 

Jailhouse cross-compiling

The README available on the Jailhouse tree on our GitHub explains how to cross-compile and install Jailhouse. It also provides information about serial port and static IP configuration. Note that the information is provided for the default Linux kernel by Nvidia (not Vanilla). You can refer to the original Jailhouse page in case you run a Vanilla Linux kernel.

RT-Druid set-up

Once Jailhouse has been successfully built, transferred and installed onto the TX1 platform, you have to set-up the RT-Druid development environment to compile the ERIKA3 RTOS.

Follow the next instructions for installing RT-Druid on the host platform used for cross-compiling:

  1. Download the RT-Druid package from the download section of the ERIKA3 website
  2. Extract the downloaded archive
  3. Open a shell and type
    export JAILHOUSE_VERSION=0.7
    export JAILHOUSE_DIR=/path/to/compiled/jailhouse
    export  JAILHOUSE_AARCH64_GCCPREFIX=aarch64-linux-gnu-
    
  4. Then, using the same shell, enter the extracted archive and run
    ./eclipse

Simple example

Work in progress...