You can install RTXI on any Linux distribution you like. Keep in mind that the installation scripts we use work for Ubuntu and Debian. Your distribution may name or organize packages differently, so you'll have to account for that on your own. Below are download links for generic Ubuntu GNOME live CDs.
You can use whatever DVD burner is available on your operating system. If you want a live USB, you may need additional software. For different operating systems, check out:
Boot into the live CD. When prompted, start the installation process. There are no special considerations to be made at this step. Installers are generally intuitive, but if you have issues, there is a plethora of information online for how to install various Linux distributions. You can find help for installing Ubuntu GNOME here.
When the installation is finished, reboot and log into your system. Be sure to remove the live media, or you might boot back into the live CD.
Note: You may have to edit your BIOS settings to let you boot from media other than your hard drive. When cold-booting your computer, hit the necessary keys, usually
F4, and open the menu. From the menu, look for your boot options. There you can manually override the boot order of devices on your system. If you're booting from a DVD or USB, look for your DVD drive or USB label, respectively, and set them to be first in your boot order. Save you changes and exit your BIOS menu.
Open a terminal. You can use the applications menu or enter the
CTRL+ALT+t shortcut. From the terminal, install the git package. Git is a version control system that can synchronize files over many machines. We use it for developing RTXI source code, which is hosted on GitHub.
Once git is installed, use it to download the RTXI source code and access the source code for v2.3.
Tip: The above code will download the source files to wherever you are in your filesystem. If you are within your own user directory, then the source files will only be accessible to your account, not anyone else's. To download the source code in a central location that all users can access, consider:
Note: Don't do this if you have a user named "rtxi". Rename the RTXI folder you cloned to something else.
Install the dependencies for RTXI and for installing the real-time (RT) kernel. Assuming you are in the cloned RTXI directory, run:
The script will run for a while, updating your current packages and installing ones needed later.
From the same directory, run:
The script will download the sources for the Linux kernel and the Xenomai patch. Before the kernel starts compiling, you will be prompted to edit the kernel config flags. A UI will pop up that looks as follows:
This is the config menu that allows you to edit what you want compiled into the kernel. For optimal performance, edit the following options:
Enable ANALOGY drivers.
SPACE on all the drivers to have them built into the kernel. A "*" beside the field means that the drivers are set properly. Note that "M" means that the drivers will be built as kernel modules, not built into the kernel itself. "*" is the desired setting here, not "M".
ESC to get back to the top menu from where you started. Be careful to not exit the configuration menu.
Select your processor type and disable multicore features.
Select the option that corresponds to your processor type. If unsure of what processor you have, open another terminal run:
This will display the CPU information needed to correctly select your configuration. Most newish computers with Intel processors usually have an i3, i5, or i7. For them, select
Core 2/newer Xeon.
Note: For 32-bit systems,
Enable -fstack-protector buffer overflow detection should also be disabled
Disable power management options.
To disable drivers, move the cursor to the item and hit
SPACE until the field the left is blank.
Disable memory management options.
Disable COMEDI drivers and enable USB support.
Once all the flags have been set properly, exit to the top menu. Hit
ESC again and choose
to save the configuration and compile the kernel. Compilation, depending on your system, can take 10 minutes to a few hours. You are free to leave the system. The
install_rt_kernel.sh script will compile the kernel and install it automatically. When the script terminates successfully, reboot the system.
From the boot menu, select the "Advanced" option from the GRUB bootloader to open up a submenu that lists all the available kernels. The real-time kernel will be named
3.8.13-xenomai-2.6.3. Select it and boot the system.
Install RTXI with the
install_rtxi.sh script. Navigate back to your
rtxi/scripts/ directory and rum:
Give your password when prompted. The script will also prompt you for an installation mode.
If you want real-time performance, enter "1" to use Xenomai and wait for RTXI to be installed. When the installation script terminates, RTXI is ready for you to use. To start RTXI, run:
By default, a clean installation of RTXI only contains system modules. To use custom modules, you will need to download and install them separately. All RTXI modules are available on our GitHub repository. You can view all our modules and instructions for installing them on our modules page.
Note: If you are currently using older distributions, like Ubuntu 10.04 and Debian 7, the following instructions will fail because RTXI depends on newer versions of the boost libraries and gcc, which aren't available. Though you can compile these dependencies from source, we recommend you use a newer LTS distro, like Ubuntu 14.04. Incompatibilities with older distros will only increase with time, especially as they exceed their support lifespan.
If you haven't already cloned our GitHub repo, run the following in the terminal.
If you already have a clone of the repository, go to it and run:
install_dependencies.sh script to download dependencies. The script is maintained for Ubuntu 14.04. If you are using a different or outdated distribution, like Ubuntu 10.04, you will have to look for differently-named packages. For old operating systems, some of these packages may no longer exist, and if that's the case, we strongly encourage you to upgrade.
Run the installation script, also in the
You will be prompted to select a configuration: 1 for Xenomai (real-time) or 2 for POSIX (non-real-time). Soon, RTXI will be compiled and installed. When finished, you can run v2.3 with:
Note: This will not work if you are running an RTAI-patched kernel. To compile RTXI v2.3 for RTAI kernels, see our relevant information on the FAQs section of the documentation page or the full documentation for configuration options.
All available modules in v1.4 came packaged with RTXI. For v2.3 onwards, modules are split into separate GitHub repositories. Customization also is on a per-module basis. Also, for v1.x, RTXI used the Qt3 framework to build the UI. For v2.3, we moved to Qt4, and with v2.1, we moved to Qt5.
What this means for you is that at this point, you've installed RTXI v2.3, but you need to recompile your modules to use updated dependencies. If you are using the DefaultGUI framework, this may be as simple as recompiling your code, but if you added custom Qt elements, you may need to port your code to reflect changes in Qt.
All modules on the modules page are up-to-date for v2.3. See the following documentation on porting to old Qt code to Qt5.
The final step of any RTXI installation is to benchmark RTXI and the real-time kernel it uses. Tests center around the built-in xenomai latency test and the RT benchmarking module within RTXI. An explanation of what exactly the tests measure is available in our documentation.
If you used the live CDs, run:
If you did a custom installation, go to the base of the RTXI directory you cloned from GitHub and run:
This script will test kernel latencies at rate of 20 kHz while under stress. The test lasts 10 minutes. If at any point you need to stop the test, you can kill the process by entering
CTRL+c in the terminal running the stress test. Then, run
pkill stress. If you forget to use
pkill, the system will stop measuring latencies, but it will still be under stress. Depending on your system, you may experience lag in your desktop during the test. Keep in mind that the stress test is designed to assess real-time performance under worst-case conditions. If your system performs well under heavy load, you can be reassured that it will perform well during your experiments.
Once completed, the script will provide the data necessary for you to generate a latencies histogram for your system.
For systems with discrete graphics cards and somewhat recent processors, latencies should consistently remain on average below 2-3 μs. Worst case latencies may get as high as 10-15 μs, but keep in mind that these spikes occur often once or twice over the 10 minute duration of the stress test, which at 20 kHz constitutes 12 million cycles. Compare your performance to what is available on our stats and benchmarks page and let us know if your performance is problematic.
RT performance during experiments can be monitored and recorded through the RT Benchmarks module. Record the RT Benchmarks module in RTXI using the Data Recorder module. RT Benchmarks displays runtime statistics for your system, such as the computation time, real-time period, and jitter. For those unfamiliar with the terms, here are brief definitions:
To record the RT Benchmarks module:
Note: You can change the frequency for your measurements via the System Control Panel. Just open the module, change the value for "Frequency," and hit "Apply" to save your changes.
Note: If you set the frequency high or record for a long time, the size of the generated files can become unwieldy. Make liberal use of the downsampling functionality in the Data Recorder.