Choosing a Linux Distro for Connected Products

Published by Lalit Raju May 09, 2018

The operating system is a critical component of the connected product. It has a direct bearing on the capabilities of the system: from performing complex tasks in real-time to ensuring security, the OS is at the core of all functions. And choosing the OS involves making trade-offs across a large number of dimensions, with implementation options ranging from bare-metal (no OS at all!) to a full-fledged Linux distribution.

Linux is the most popular OS in embedded devices. According to IoT Developer Survey 2017, 81.5% of developer respondents use Linux over any other OS.

Screen Shot 2018-04-25 at 4.12.44 PM

And the community continues to grow. Year over year, Linux has grown as the operating system of choice for IoT devices (73.1% in 2016 and 81.5% in 2017).

There is no doubt Linux benefits from the strong developer community and from being “free,” but it is useful to break the Linux distributions down to understand this further.

Linux Distribution

A Linux distribution (or “distro”) includes not just the kernel but also related tools and (often) package management software that help use and maintain the distribution. Hundreds of distributions exist. So it is interesting that according to IoT Developer Survey 2017, the two most popular Linux distros for connected products are Raspbian and Ubuntu.

Screen Shot 2018-04-25 at 4.13.06 PM

Here’s a brief intro to some of the popular Linux distributions:

Raspbian

This OS no doubt owes its popularity to the extremely affordable and open Raspberry Pi development platform. It is a Debian-based distro with a robust package management system and a strong developer community. However, it’s not an RTOS; it is more of a general-purpose OS.

Ubuntu

This is another Debian-based distro with similar advantages. Ubuntu started as an OS for PCs but has also released Ubuntu Core to target the IoT space with a focus on security and the concept of snaps (tightly managed apps/packages) to simplify deployments.

Android

This OS needs no introduction thanks to its popularity for mobile devices. But the OS can also be adapted to suit connected products. Such use generally makes sense for devices with displays but it could just as easily be used for headless devices to simply take advantage of the robust platform.

Android Things

Things is different from Android. It evolved from Google’s Brillo project and is intended for (relatively) memory-constrained IoT devices. It’s main advantage is the Google ecosystem and the ability to leverage Android APIs and tools.

Yocto

Strictly speaking, the Yocto Project is not a distro. It provides a framework with which you can create your own! But it is quite popular in the developer community for that very reason - it allows you to create your own custom Linux build for your environment. This includes creating your own toolchain and even picking your own preferred package manager.

OpenWrt

OpenWrt started as an OS for routers but thanks to support for a wide range of connectivity and networking options and the ability to operate on fairly constrained embedded devices, it has become quite popular for connected products in general.

Selection Criteria

When choosing an OS, some considerations are understood well as they are immediately felt. Some examples:

  1. License and access to source code : a “free” OS reduces upfront costs on the project and an open source OS has many advantages, including easier customization (it is useful to note that an OS with a license cost may also come with full source code).
  2. Footprint : depending on the available memory (flash/RAM) on the connected product, the OS may be severely constrained - in such cases, having a lightweight OS may be the only option, or in any case, will help optimize available resources.
  3. Real-time behavior : simply put, this is a measure of how consistently the OS performs. Not every connected product needs a hard real-time OS - typical products do not need deterministic behavior. This characteristic is often conflated with responsiveness to the user. However, a properly designed system running a non-real-time OS is perfectly capable of being responsive to the user.
  4. Security : this is a wide-ranging area dealing with facets such as least privilege and secure storage. It is essential to choose an OS that allows for the appropriate level of protection and monitoring/detection for the product.
  5. Hardware support : this is fairly self-explanatory - the OS needs to be stable and efficient in supporting the hardware it runs on (including peripherals). Often connected products provide support for external connections (e.g. via USB) - this places greater demands on the OS.
However, some aspects tend to be overlooked as there is no immediate impact - these are felt much later in the development cycle. Here are three important things to keep in mind (but you often forget) when choosing an OS.
  1. Support : you are often on your own with “free” distros, which means you need to keep track of kernel updates, patches (e.g. the recent WiFi KRACK problem) and higher costs later in the lifecycle.
  2. Extensions (e.g. adding new functionality) : an OS with a strong package manager to deploy securely from the cloud makes this easier (e.g. Ubuntu core)
  3. Connectivity : many connected products are headless, which makes it difficult for the average user to bring online. Often connectivity is an after-thought. For example, an OS may not support simultaneous SoftAP and client modes, which results in a sub-optimal user experience.

At Cirrent, we work with a wide variety of companies that make all types of connected products. We have worked with most operating systems, including most Linux distributions, so we have been side by side with our customers as they've evaluated different distributions. Because of the breadth of distributions, we've built the Cirrent Agent to be compatible with all of the popular Linux distributions so companies can ZipKey enable their products independent of the OS or Linux distribution. You can learn more in our knowledge center or contact us for more information.

New Call-to-action

Comments