About This Manual
This manual describes the following:
- Installing XRT on the following systems:
- Obtaining and applying a license
- Testing an installation
The method used to install XRT differs depending on the system that you are using. Where possible, XRT is delivered using the standard packaging system for a distribution; if this is not possible, standard compressed TAR or ZIP files are used.
IOTech recommends that all installations are done as root. The installation instructions in this document, with the exception of the Debian-based installation instructions, provide the commands for installations done as root.
The following table shows which systems and architectures support XRT, and provides a direct link to the appropriate installation instructions:
|Debian 10, 11||Yes||Yes||Yes||Link|
|Alpine Linux 3.14, 3.15||Yes||Yes||Yes||Link|
|Ubuntu 20.04, 18.04||Yes||Yes||Yes||Link|
The core XRT framework requires support for the standard C library and Portable Operating System Interface (POSIX) API. This means that it can be ported to any real-time operating system (RTOS) that supports these features.
Some individual XRT components may have more restrictive API requirements and, therefore, not all XRT component modules are supported on all platforms.
IOTech provides dependent libraries as packages on all supported platforms. The dependencies are managed by the package manager, when possible. If this behavior is not supported, instructions for installing the dependencies manually are included in the relevant section of this document.
Install on Debian-based Systems
This method uses deb packages to install XRT. It is used for all systems that are based on the Debian packaging mechanism such as Debian and Ubuntu. To install XRT using .deb packages, complete the following steps:
Install required installation packages:
sudo apt-get install lsb-release apt-transport-https curl gnupg
Add the key for the IOTech repository:
curl -fsSL https://iotech.jfrog.io/artifactory/api/gpg/key/public | sudo apt-key add -
Register the IOTech repository:
echo "deb https://iotech.jfrog.io/iotech/debian-release $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/iotech.list
sudo apt-get update
sudo apt-get install iotech-xrt-2.0
Install on RPM-based Systems
RPM-based systems, such as Fedora and SUSE, do not all use the same package management system or support the same packages. This means that the installation instructions for RPM-based systems are specific to the system. You can install XRT on the following RPM-based systems:
- Fedora 35. For installation instructions, see "Install on Fedora 35"
- OpenSUSE Leap 15.3. For installation instructions, see "Install on OpenSUSE Leap 15.3"
- Photon 4.0. For installation instructions, see "Install on Photon 4.0"
Install on Fedora 35
To install XRT on Fedora 35 as root, complete the following steps:
Add the IOTech repository
cat > /etc/yum.repos.d/iotech.repo << "EOF" [iotech] name=IOTech Repository (Non-OSS) baseurl=https://iotech.jfrog.io/iotech/rpm-fedora-35-release/ enabled=1 gpgcheck=0 EOF
Update YUM repositories
yum install iotech-xrt-2.0
Install on OpenSUSE Leap 15.3
To install XRT on OpenSUSE Leap 15.3 as root, complete the following steps:
Add the IOTech repository
zypper addrepo --name "IOTech Repository (Non-OSS)" https://iotech.jfrog.io/artifactory/rpm-opensuse-15.3-release repo-iotech-non-oss
Update Zypper repositories
zypper --gpg-auto-import-keys refresh repo-iotech-non-oss
zypper install iotech-xrt-2.0
Install on Photon 4.0
To install XRT on Photon 4.0 as root, complete the following steps:
Add the IOTech repository
cat > /etc/yum.repos.d/iotech.repo << "EOF" [iotech] name=IOTech Repository (Non-OSS) baseurl=https://iotech.jfrog.io/iotech/rpm-photon-40-release/ enabled=1 gpgcheck=1 EOF
Update TDNF repositories
tdnf install iotech-xrt-2.0
Install on Alpine Linux Systems
To install XRT on Alpine Linux Systems as root, complete the following steps:
Install the IOTech repository key:
wget https://iotech.jfrog.io/artifactory/api/security/keypair/public/repositories/alpine-release -O /etc/apk/keys/alpine.dev.rsa.pub
Add the IOTech repository:
echo "https://iotech.jfrog.io/artifactory/alpine-release/v3.15/main" >> /etc/apk/repositories apk update
If not using Alpine 3.15, replace v3.15 in this command with the correct version.
apk add iotech-xrt-2.0
Install on ClearLinux Systems
As ClearLinux is a rolling distribution, please contact IOTech for build and versioning requirements.
Install for Zephyr RTOS
Zephyr projects are built for a specific target platform, architecture and set of features. This means that each project requires a custom build.
IOTech can support evaluation builds for QEMU, ACRN, and the ARM NXP FRDM-K64F board. For further information contact IOTech Support.
Install for Azure Sphere
XRT is supported on micro-controllers running Microsoft Azure Sphere.
Azure Sphere applications are cross-compiled on either Ubuntu or Windows hosts, so XRT for Azure Sphere must also be installed on the development host.
As all XRT Azure Sphere applications must be compiled on the development host, there is not a separate development package. The currently supported development hosts are Ubuntu 20.04 and Windows 10.
For further information on building, deploying and integrating XRT with the Azure Cloud, refer to the XRT for Azure Sphere Guide.
Install on Ubuntu Development Host
To install XRT Azure Sphere, complete the following steps:
Install the Azure Sphere SDK. For further information on installing the Azure Sphere SDK on Ubuntu, refer to the Linux installation quickstart section of the Azure Sphere documentation
Install the packages, using the following command:
apt-get install lsb-release apt-transport-https curl gnupg
Add the key for the IOTech repository, using the following command:
curl -fsSL https://iotech.jfrog.io/artifactory/api/gpg/key/public | apt-key add -
Register the IOTech repository:
echo "deb https://iotech.jfrog.io/iotech/debian-release $(lsb_release - cs) main" | tee -a /etc/apt/sources.list.d/iotech.list
Update the repositories:
apt-get install iotech-xrt-azsphere
Install on Windows 10 Development Host
To install XRT Azure Sphere, as root, complete the following steps:
Install the Azure Sphere SDK. For further information on installing the Azure SDK on Windows 10, refer to the Windows installation quickstart section of the Azure Sphere documentation
Download the XRT .zip package from the IOTech repository:
curl -L -O https://iotech.jfrog.io/artifactory/windows-release/azuresphere-12/iotech-xrt-dev-azuresphere12-latest.zip
Open Windows File Explorer
Select the downloaded .zip package and extract the files to the following location:
C:\Program Files (x86)\Microsoft Azure Sphere SDK\Sysroots\12
You must obtain a license for XRT before you can use or test any XRT component, as XRT checks for licensing permission before instantiating any component.
If running XRT on Microsoft Azure Sphere, you do not need to obtain a license for XRT.
To obtain an XRT license, which is a file called Xrt_license.lic , contact IoT Support.
When you have obtained the XRT license file you must ensure that XRT can locate the license in one of the following ways:
Set the XRT_LICENSE_FILE environment variable to the absolute path to the license file, using the following command, where <path> is the full path to your license file:
Copy the license file to the config directory used in your test and rename the file from Xrt_license.lic to license.json.
Place the license file in the default installation location; that is, the /opt/iotech/xrt directory. Rename the file from Xrt_license.lic to license.json
Before testing an installation, do the following:
Copy the examples from the distribution
If using the iotech-xrt-dev package and you have modified the example, build the example
Obtain and install the license, as described previously.
As different systems install packages in different locations, you might need to update the env.sh file, which sets environment variables including PATH and LD_LIBRARY_PATH. If using the iotech-xrt-dev package, you might also need to update the Makefile.defs file to deal with variant library names or header inclusion paths. You can then test an installation. For example, you could test an installation as follows:
Load the env.sh file, using the following command:
Copy the examples to a temporary directory, using the following command:
cp -R /opt/iotech/xrt/examples .
Navigate to the temporary directory, using the following command:
If using the iotech-xrt-dev package, build the examples using the following command:
Navigate to the example you want to run, for example, for the Container example:
Run the XRT application, using the following command, where
provides the location of the config folder and [<time_in_seconds>] allows you to define the time for which XRT is to run in seconds if required:
xrt <config> [<time_in_seconds>]
The [<time_in_seconds>] parameter is optional. If not set, XRT runs until stopped manually.
For example, to use the container component configuration and run the test for five seconds, the commands are as follows:
xrt config 5
The provided configuration data expects the test to be run from the location in which the config directory is available.