Question: Should I be concerned by the fact that Linux has a different file structure and file path notation when porting my LabVIEW Real-Time application over to a NI Linux Real-Time based target?
Answer: The vast majority of LabVIEW Real-Time code will function as-is between different operating systems despite any differences in file path notation or file system structure. The few differences worth noting are that:
Question: I used to rely on FTP to transfer files to and from my real-time target. I can’t seem to do that with NI Linux Real-Time based targets. How can I transfer files to and from my system?
Answer: By default the Recommended Software Set (RSS) installed from MAX will not install an FTP server on NI Linux Real-Time targets. If you want to continue using an open, unsecured FTP server, you will have to install it manually from the custom install list. Refer to How Do I Use FTP with My NI Linux Real-Time Target? for details. This is meant to be a security benefit as it removes the security hole of an open FTP server formerly present on existing cRIO systems. Also note that both WebDAV and SSH are good file transfer alternatives (which can be secured). It’s also possible to do SFTP over SSH. For more details, please refer to Using WebDAV to transfer files to your RT target.
Question: What distribution of Linux is shipping on NI hardware running NI Linux Real-Time?
Answer: A Linux distribution is comprised of a unique set number of libraries and utilities shipped with the Linux kernel. As such, NI Linux Real-Time is the distribution is tailored for our user’s needs; it is built using the OpenEmbedded framework, has Real-Time patches applied, and has customizations for better hardware integration with NI real-time hardware targets.
Question: What is the determinism of the Linux-RT operating system on a CompactRIO controller?
Answer: The custom distribution of Linux that NI has created includes real-time patches to make the system deterministic. In NI’s testing, the upper bound of jitter with NI Linux Real-Time on CompactRIO targets is on the same order of magnitude as other CompactRIO systems which run a VxWorks RTOS.
Beyond jitter, note that you will be able to see a substantial performance improvements in loop rates with the NI Linux Real-Time based cRIO-9068 over the cRIO-9024 and cRIO-9074 controllers and with the cRIO-903x controllers over the previous generation cRIO-9025. Additional benchmarking can be found at NI cRIO-9068: Performance and Throughput Benchmarks and NI CompactRIO Performance Controller: Performance and Throughput Benchmarks.
Question: I’d like to make use of the Linux ecosystem and install additional software to my NI Linux Real-Time target. What support can I expect from NI?
Answer: There are thousands of community sourced applications available through a variety of means for Linux-based operating systems. If a user is interested in leveraging this ecosystem there is an assumed minimum Linux proficiency required. Below are the guidelines we have in place for what NI will support for those looking to leverage the Linux ecosystem:
Question: If, for whatever reason, the NI Linux Real-Time operating system becomes corrupt or otherwise fails, can it be reinstalled?
Answer: If NI Linux Real-Time fails to boot or becomes corrupt in any other way in the normal operating mode (run mode), the system can be reformatted and reinstalled in about 5 minutes from MAX. In order to do this we have a completely separate Linux image called 'safe mode' that we automatically boot to if run mode is corrupted. We also use safe mode when MAX installs software to the target.
Question: What is the file system used as part of Linux-RT? Is it reliable?
Answer: NI's R&D staff investigated the different options for providing a robust file system and selected the Unsorted Block Image File System (UBIFS). To prove out this file system NI R&D has conducted stress testing, including testing on power loss corruption. UBIFS has undergone and passed the same rigorous testing that the robust filesystems on our VxWorks based targets did. On the CompactRIO-9068, the file system is on a NAND Flash device. Additionally, the Intel x86_x64 architecture-based targets use the ext4 journaling file system.
Question: Are there different thread priorities available from LabVIEW on NI Linux Real-Time targets compared to VxWorks or Phar Lap targets?
Answer: The differences in the priority scheme and scheduling on NI Linux Real-Time should have little impact on your existing real-time application. While there are changes to the scheduler between LinuxRT and VxWorks, moving from VxWorks based targets shouldn't cause any noticeable difference in the scheduling/thread prioritization.
Timed structure priorities and LV priorities work the same as before, except that any "normal" priority tasks (ex: normal priority VIs) are not handled with the real-time scheduler but are instead scheduled with Linux's default Completely Fair Scheduler (which should do a better job of scheduling normal priority work between LV and other non-LV threads).
Question: Will NI offer a tool for NI Linux Real-Time that is equivalent to the DLL checker for Pharlap?
Answer: First, it’s important to note that Linux systems do not and cannot use DLLs, and instead rely on “shared objects”, which have a “.so” extension. As Linux is an operating system built with open source principles, there already exist a number of tools such as ‘ldd’ which can help determine whether a given “.so” file will properly work on a Linux based system. NI currently has no plans to provide such a tool for NI Linux Real-Time given the tools that already exist.
Question: For the Xilinx Zynq SOC based targets, will there be any differences in the experience now that the RT Processor and FPGA share the same fabric?
Answer: Yes. For Zynq based products, when the real-time processor reboots, it will also reset the FPGA. Unlike previous generations of CompactRIO and Single-Board RIO, customers should be aware the the FPGA I/O will not be controlled on reboots. Additionally, when loading a new FPGA bitfile, a few of the peripherals will be interrupted as they are either instantiated or routed through the FPGA. This applies specifically to the second gigabit Ethernet port and to the serial ports.
Question: Is it possible to run the NI Linux Real-Time distribution (Operating System) on 3rd party hardware such as Raspberry Pi, BeagleBone Black, etc.? Does NI support this?
Answer: We created the NI Linux RT distribution to support National Instruments hardware, so while you can run it on other boards, it's probably a lot easier to use a Linux distribution meant for your board/consider applying the -rt patch https://rt.wiki.kernel.org/index.php/Main_Page to Linux yourself in order to run a real-time Linux distribution on 3rd party hardware. If you want to run NI Linux RT anyway, it's not supported through NI technical support but it is indeed possible to port our Linux to third party hardware; in fact, you can get our source from https://github.com/ni. You'll need to make whatever changes are appropriate for your board's processor architecture, peripheral set, and so on. Note that the LINX toolkit discussed below, does NOT run the NI Linux Real-Time distribution, instead it runs on the recomended, debian-based distributions for the BeagleBone Black and Raspberry Pi platforms.
Question: Can I run NI software like LabVIEW Real-Time (proprietary, licensed product) on an "original" Raspberry Pi?
Answer: No, because the Raspberry Pi uses an ARM with a different instruction set architecture than the one used on NI's current ARM boards (armv6 vs. armv7-a). See https://decibel.ni.com/content/message/83844#83844 and next question/answer.
Question: Can I run NI software like LabVIEW Real-Time (proprietary, licensed product) on other third party hardware with a compatible architecture (an armv7-a device like BeagleBone Black, Raspberry Pi 2, or a virtual machine, or an x64 desktop PC, etc.)?
Answer: We are not planning to support LabVIEW Real-Time on 3rd party hardware at this time. You must purchase a LabVIEW Real-Time deployment license for every non-NI hardware target. Please contact deborah.burke@ni.com or your local NI Field Sales Engineer if you decide to move forward porting to such hardware. Through the LINX toolkit you can deploy LabVIEW VIs to a BeagleBone Black or Raspberry Pi 2/3 for non-commercial use. The LINX toolkit is intended to be used by makers, hobbyists, and students. See this page for more information.
Question: What’s the preferred cross-compile toolchain for building C/C++ applications for NI Linux Real-Time targets?
Answer: We provide gcc toolchains that are tailored to NI Linux Real-Time targets. See this document for more information: Building C/C++ Applications for NI Linux Real-Time
Question: How can I add other software from the Linux community to my NI Linux Real-Time target?
Answer: You can use the opkg package manager to find and install other software to your NI Linux Real-Time target. You will need access to the internet for this to work.
For targets using the 2013 distribution only: Using opkg first requires enabling one or more Linux repositories. This can be done by editing all of the “.conf” files found at /etc/opkg and eliminating the leading “#” and space preceding the URL found in each of the “.conf” files. This process is documented in the first steps of the Tutorial: PostgreSQL with LabVIEW on the NI Linux Real-Time community.
You may find that when installing some software that you may get an error about the version of a dependency. Most commonly, you are likely to run into this error with the version of the libc package. There are two ways to address this problem. One is to force the new software package to use the version of libc6 that is available on NI Linux Real-Time. The other is to remove the flag on the libc6 package and allow it to be upgraded with the installation of the new software package. In either case you could end up with software validated against one version of libc6 using a different version. This is normally fine, but NI does not extensively test this configuration.
Question: How do I get Python installed on the a NI Linux Real-Time target?
Answer: This is an example of using the opkg package manager referenced above. In this case you would do:
opkg update
opkg install python
Question: How do I get GCC and other components of the GNU toolchain on my target?
Answer: The following is a compilation of the information within this thread: https://decibel.ni.com/content/message/65378
Note: you will need internet access for this process to work correctly, as opkg (the package manager within the Linux install on these targets) downloads the packages from an external site.
[2013 only] opkg flag ok libc6
[2013 only] opkg upgrade libc6
opkg install gcc gcc-symlinks
opkg install cpp cpp-symlinks
opkg install libc6-dev
opkg install binutils-symlinks
opkg install make
These packages and other common tools like Perl are also part of larger "packagegroups" that you can use as a convenient shortcut instead on recent versions of NI Linux RT, for example:
opkg install packagegroup-core-buildessential
Question: Where is the USB drive mounted when I plug it into my NI Linux Real-Time target?
Answer: The OS automaticly mounts any USB drive that is formatted for FAT32 (usually the default file system type, although not nessisarily) to /media/sda1. If the USB drive has more than one partition they will be mounted in /media/sda1, then /media/sda2, and so on. For compatibility with older NI targets it is also accessible at /u (then /v, etc.).
Executing umount /media/sda1 will cause all cached data to be written to it and unmount it. If you only want to flush the cache and not unmount the drive, you can execute the sync command.
Question: What feed URL should I use for `opkg`?
Answer: On the cRIO-9068 for LabVIEW 2014, you should use: