Linux: The Operating System for Embedded Design

Fractal Realms series. Backdrop of fractal elements, grids and symbols on the subject of education, science and technology

Advances in processor performance, community innovation and support have propelled Linux to the position of the premier operating system in computers large and small. Now it is moving ever more strongly into the realm of embedded systems.

by Sanjay Challa, National Instruments

From its humble beginnings as a computer science project from the Finnish student Linus Torvalds in 1991, Linux has enjoyed remarkable growth. It has continued to gain market share across all computing platforms and today represents the majority share in many of these markets, including web servers, supercomputers and mobile devices. Embedded designers may be wondering how they can best benefit from this offering. After all, it is quite amazing that one operating system can successfully serve the needs of so many seemingly different applications – from the cloud to mobile and everything in between. Surely, Linux may have a lot to offer for embedded designers as well.

Given that the needs of a typical embedded design team vary considerably from the requirements for the next supercomputer, it is important to understand what Linux can do to alleviate the challenges typically encountered in embedded system design. This consideration is especially important with recent security vulnerabilities around open source software (for example, Heartbleed and Shellshock), which affected many Linux systems. Based on these recent events, embedded designers may question whether Linux is the right operating system to rely on for their next project.

The reality is that Linux is here to stay for the foreseeable future. In fact, it is poised better than ever for strong growth across many applications, especially embedded systems. From industrial automation to structural health monitoring, it can benefit a variety of embedded systems projects. Linux provides a common environment for design and serves as a broad technology platform for innovation. This means embedded designers no longer need to develop a custom operating system tailored for one application that requires specialized skills. Instead, organizations using Linux can access a larger talent pool of developers, more easily integrate with standard technologies and more readily access support. Relying on Linux enables embedded designers to focus on high-value tasks, such as investing time in the value differentiators of their offering, as opposed to spending effort starting completely from scratch.

As a technology platform, it certainly helps that Linux is available at no cost to embedded designers who have the time and access to the requisite talent necessary to customize and maintain an open source solution. Those lacking the time or expertise have the option of paying a vendor for an embedded Linux solution. Given the advancements in tooling and in build infrastructure with efforts like the Yocto Project and OpenEmbedded, it’s now easier than ever — and hence more common — for embedded design teams to pursue a self-maintained Linux solution. Regardless, in both scenarios, given that the source code is always made available, an embedded design team maintains the freedom to modify the distribution to better fit their design needs.

This flexibility is invaluable and makes it substantially easier to keep pace with evolving trends. The trade-offs between the DIY and the vendor-provided embedded Linux solutions aside, both options are more beneficial than a proprietary solution, which is inevitably less flexible and open and consequently slower to adapt to market trends. In a market typically characterized by large volumes of capable yet cost-optimized deployments, Linux is a very cost-compelling solution. Typical proprietary operating systems that serve the embedded market often include deployment costs that can severely hinder embedded designers from scaling their embedded solution.

In addition to price, another key challenge with proprietary operating systems is the lack of easy access to the source code. There is considerably more risk to a project or solution should an OS vendor go out of business, decide that they would like to work on a different set of features or invest in their software in a way that is counterproductive or tangential to an embedded designer’s application needs. Worse yet is being forced to scramble when a vendor decides that they will no longer support or maintain a proprietary operating system or when they look to coerce all users to upgrade to better manage the lifecycle of their offering.

Given that Linux is open source and community supported, it avoids many of the challenges associated with proprietary operating systems. For example, access to the source code offers a level of transparency unmatched by proprietary alternatives and is incredibly valuable given recent security vulnerabilities. The open source community has been swift and aggressive in pushing out patches to the recently identified vulnerabilities. In all likelihood, proprietary software suffers from just as many if not vastly more insidious vulnerabilities. Unfortunately these are seldom discovered or addressed, leaving systems vulnerable to zero-day attacks. While recent security issues may have marred the reputation of open source software in terms of security, per Linus’s Law the reality is that the community imposes much better oversight on open source software and can more quickly collaborate to fix an issue than the majority of proprietary OS vendors.

Despite the multitude of benefits, designers have traditionally had some skepticism about Linux as a technology platform for certain embedded systems. The biggest concerns are in regards to the size and performance of the operating system. Cost-optimized embedded solutions that need to run on minimal disk and memory are especially demanding on footprint and Linux is often considered to be ‘too large’. Similarly, for reliable closed-loop control systems, many have questioned whether Linux can provide the necessary real-time performance.

With technology advances and community efforts, these concerns are much less relevant. Technology advances in hardware coupled with community efforts such as uClinux make it possible for users to deploy Linux to substantially smaller form factor systems. As a prime example, Airbus’ Factory of the Future is architected around smart tools powered by NI’s System on Module (SOM) solution, which is a remarkably small hardware device that runs NI Linux Real-Time, an embedded Linux distribution (Figure 1). Traditionally, the subassembly of an airplane has been a manual process and includes roughly 400,000 points that need to be tightened down. Understandably, there is considerable risk to the production since a single location that is tightened down incorrectly could cost hundreds of thousands of dollars in the long run. Because of this risk, it is critical to improve the efficiency of the production process. The NI System on Module (SOM) solution, powered by Linux, is available in a small enough form factor to serve as the main computational core of a variety of factory tools required for aircraft assembly. This enables Airbus to envision a future where aircraft assembly is completed more efficiently and with higher quality.

RTC12 TCrTW NatInst Fig1

Figure 1. Typical aircraft assembly environment. Note that much of the assembly is done by hand, which is why there is a push to make the tools much more intelligent to improve production efficiency and quality.

Regarding the performance necessary for closed-loop control, PREEMPT_RT is a Linux community effort that is now the de facto standard for achieving real-time performance with Linux. In fact, coalitions such as the Open Source Automation Development Lab (OSADL) are looking to standardize industrial automation with PREEMPT_RT patched Linux. As another example, the NI Linux Real-Time distribution also makes use of PREEMPT_RT and the NI cRIO-9068 industrial controller that runs this RTOS is behind the high-precision pick and place machine produced by Master Machinery. With advances in hardware and with the software capabilities of Linux, it is now possible to build closed-loop real-time systems with Linux

(Figure 2).

RTC12 TCrTW NatInst Fig2

Figure 2. The new-generation pick and place machine uses 16 axles for the suction nozzle, substantially accelerating the suction of wafers. Consequently, the accuracy and response time for vision and motion processing in this closed-loop system becomes even more critical in ensuring proper performance. 

Looking forward, vendors are beginning to understand that they can truly empower end users by offering Linux on processor-based platforms or by providing Linux drivers for sensors and instruments. With a Linux based system, users have outstanding flexibility in configuring and customizing systems. What was previously a feature that needed to be completed by a vendor is now something that users can implement as needed for their particular application. As an example, users can decide whether to put their own web server or run small, embedded or distributed databases on a Linux-based SOM. From a security perspective, users can directly add a VPN and firewall or run SELinux to implement mandatory access control on their embedded system.

Furthermore, given that Linux is fueled by a tremendous amount of community-driven research, there is unique benefit to Linux systems in an Internet of Things age. As embedded devices become increasingly complex, connected and online, it is possible to rely on the package management provided by Linux to update deployed solutions with new applications and features. From innovations in the network stack to entirely new file systems such as Btrfs, it is now possible to benefit from the vast number of open source projects constantly pushing the limits with Linux. Alternatives to Linux typically innovate at a much slower pace and often lack the package management infrastructure that Linux offers, which leaves end users running behind in this increasingly connected world.

It is clear that Linux is well suited to continue expanding in a variety of markets, especially with embedded systems applications. Innovative vendors are already bringing Linux to their embedded offerings. As an example, NI offers a Linux-based Compact Vision System, SOM, and rugged industrial controller (Figure 3). Embedded systems designers can profit from the trend of more Linux-based hardware by building their proficiency in Linux and by looking to solutions powered by Linux. These types of solutions will be much easier to connect, update, customize and maintain than traditional custom or proprietary alternatives because Linux is the unquestionable leader in the realm of embedded operating systems.

(a)RTC12 TCrTW NatInst Fig3a(b)RTC12 TCrTW NatInst Fig3b (c)RTC12 TCrTW NatInst Fig3c

Figure 3. Pictured is NI’s Linux-based Compact Vision System (a), CompactRIO performance controller (b) and System on Module (c). 


National Instruments, Austin, TX. (512) 794-0100.