What is embedded Linux? Part I
Edoardo Barbieri
on 24 November 2021
Tags: Embedded , Embedded Devices , Embedded Linux , Internet of things , IoT
“Hello everybody out there using minix –
I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones. […] It is NOT portable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that’s all I have :-(.” [1]
The above is an excerpt from Linus Torvalds’ original announcement of what came to be known worldwide as the Linux operating system (OS), dated August 1991. In hindsight, it is inconceivably modest now that we are in a much better position to appreciate the full revolutionary extent of his post. Today, more than 96.4% of the top 1 million server applications run on Linux [2]. Across public clouds, 90% of the workloads use Linux as their OS, with Ubuntu being the most popular Linux distro [3], [4]. Despite debuting as a general-purpose operating system (GPOS) for x86-based hardware, Linux moved beyond web servers and has seen widespread adoption for embedded systems ever since.
This two-part blog series aims to provide the reader with a broad overview of topics spanning the world of Linux, embedded systems and the Internet of Things (IoT) in general. In part I of this blog series, we’ll start by taking a look at the embedded ecosystem, followed by an explanation of Linux’s role in it, and will conclude by explaining the rationale behind the OS growing popularity in embedded systems. In part II, we’ll focus on the most pressing challenges facing enterprises today within the embedded space. Let’s get started.
The embedded landscape
Although appearing in multiple shapes and forms, an embedded system typically performs a dedicated function, is resource-constrained and comprises a processing engine. At the risk of over-simplifying matters, we can delineate three broad categories regarding the size of an embedded Linux system: [5]
- Small-sized systems, comprising a low-powered CPU with at least 2 MB of read-only memory (ROM) and 4 MB of random-access memory (RAM).
- Medium-sized systems, with around 32 MB of ROM, 64 MB of RAM and a medium-powered CPU.
- Large-sized embedded systems, with powerful CPUs and a larger memory footprint.
Spanning virtually all categories of consumer spending — from automotive to home energy management — Linux’s presence in embedded systems is ubiquitous.
This, however, has not always been the case, as progress in semiconductor technology has substantially helped spur Linux’s adoption in the embedded world. Several reasons account for such growth. Among those, flash memory prices have decreased over time, providing the necessary mass storage for the Linux filesystem [7]. Similarly, low-power small-footprint System on a Chip (SoC) hardware is increasingly becoming the developer’s premier processor choice. As a consequence, virtually every embedded system is capable of running Linux – and does!
What is embedded Linux?
We’re now in a better position to look at the opening question, “What is embedded Linux?”
There are three levels at which we can attempt an answer:
- The system
- The kernel (i.e., the core of the OS)
- The distro
The system
Intuitively, an embedded Linux system simply denotes an embedded system running on the Linux kernel. Let us focus on the remaining two pieces.
The Linux kernel
Linus never shipped an “embedded version” of the Linux kernel. As an embedded developer, you may not require a tailored kernel for your system and might rely on an official release instead. However, it is often the case that you may need a kernel configured to support your custom hardware, as the kernel build configuration found in an embedded device usually varies from the one in a server or workstation.
The distro (or distribution)
The third perspective to consider is that of a distribution. Here, “distribution” is an umbrella term usually comprising software packages, services and a development framework on top of the OS itself. Ubuntu Core, the flavour of Ubuntu for embedded devices, is an example of an embedded Linux distro.
Embedded Linux vs RTOS
Why use embedded Linux?
The next question that arises is, what makes Linux the perfect candidate for an embedded system? From scalability to developer support and tooling, there are myriad reasons why this is true. An in-depth discussion for each requires its own book. Here, we’ll limit ourselves to mentioning a few prominent ones:
- Hardware support
- Networking
- Modularity
- Commercial support
Hardware support
Linux runs on 32 and 64-bit ARM, x86, MIPS, and PowerPC architectures. Whereas a 32-bit processor is capable of storing 232 (one bit is either a 0 or a 1, hence there are 2 possible combinations) values, a 64-bit processor can store more memory addresses. Processors below 32-bit aren’t capable of running Linux, ruling out traditional embedded systems. For a more in-depth discussion on hardware support, you can check the rich ecosystem of platforms for Ubuntu Core here.
Networking
We’re all well aware that networking capabilities are expected out-of-the-box in most consumer products. Fortunately, Linux supports a rich stack of networking protocols. Whether your embedded Linux project requires WiFi, mobile broadband (WWAN) or Ethernet connectivity, system network services like NetworkManager are supported on Linux. You can easily install NetworkManager on Ubuntu Core by following this guide.
Modularity
The third reason behind Linux’s prevalence in embedded systems is its modularity. With several software packages coming together to form a Linux OS stack, developers can customize it for any purpose. For instance, customisation options for Ubuntu Core include configuration for both hardware and software, and specific kernels.
Commercial support
Another crucial but sometimes overlooked consideration for choosing Linux for your embedded systems is the availability of commercial support.
Freely available, community-maintained build systems such as Yocto and Buildroot enable developers to create custom Linux distros for most hardware architectures. Unfortunately, the various challenges that community projects do not address are bound to surface when shipping embedded Linux in production. This gap is, however, readily filled by embedded Linux vendors who provide enterprise-grade support and expertise, substantially reducing time to market.
It’s not only expensive for an enterprise to provide its own set of fixes, security patches, and hardware testing – it’s also distracting from its core business. Luckily, the kernel experts at Canonical, the commercial sponsor of Ubuntu, are here to help. Canonical’s team builds, patches and maintains Ubuntu Core for embedded devices.
If you’re interested, a focussed discussion on the benefits and disadvantages awaiting embedded developers when rolling their own Linux distro versus relying on a commercially supported solution is available in this webinar or this whitepaper.
Conclusion
By now, the readers should feel familiar with the role played by Linux within the embedded landscape. In part I of this two-part blog series we saw how Linux, with its well-established presence among servers and clouds, is rapidly becoming the de-facto OS for the embedded world. There are obvious reasons to choose Linux for an embedded system, from hardware and networking protocol support to its extensive configurability and modularity. You can gain an appreciation of how Ubuntu Core, the embedded flavour of the most widely deployed server operating system on the Internet [8], is setting new standards for embedded Linux by browsing through its datasheet.
In part II of this blog series, we’ll argue how developers must pay close attention to the issues of security and updatability if they are to reap the benefits of the explosive IoT growth. See you there.
Further reading
Why is Linux the OS of choice for embedded systems? Check out the official guide to Linux for embedded applications in whitepaper or webinar form.
Interested in a detailed comparison of Yocto and Ubuntu Core? Watch the Yocto or Ubuntu Core for your embedded Linux project? webinar.
Learn how Ubuntu Core, snaps and Snapcraft create a platform for secure, open-source embedded Linux development and deployment.
Do you have a question, feedback, or news worth sharing? Join the conversation on IoT Discourse to discuss everything related to the Internet of Things and tightly connected, embedded devices.
IoT as a service
Bring an IoT device to market fast. Focus on your apps, we handle the rest. Canonical offers hardware bring up, app integration, knowledge transfer and engineering support to get your first device to market. App store and security updates guaranteed.
IoT app store
Build a platform ecosystem for connected devices to unlock new avenues for revenue generation. Get a secure, hosted and managed multi-tenant app store for your IoT devices.
Newsletter signup
Related posts
Canonical launches Ubuntu Core 24
Immutable Ubuntu Core delivers a new factory installation system for IoT device makers, GPU support for AIoT and device management integrations with Landscape...
Advantech RSB-3810, a new Single Board Computer powered by MediaTek Genio 1200, is now certified on Ubuntu 22.04 LTS
Discover this new hardware solution designed for IoT and edge applications Canonical has partnered with MediaTek to optimise Ubuntu for IoT innovations and...
EdgeIQ and Ubuntu Core; bringing security and scalability to device management
Today, EdgeIQ and Canonical announced the release of the EdgeIQ Coda snap and official support of Ubuntu Core on the EdgeIQ Symphony platform. EdgeIQ Symphony...