Electronicdesign 8985 Ubuntu Core Promo
Electronicdesign 8985 Ubuntu Core Promo
Electronicdesign 8985 Ubuntu Core Promo
Electronicdesign 8985 Ubuntu Core Promo
Electronicdesign 8985 Ubuntu Core Promo

Ubuntu Core 16 Enables Snappy IoT

Nov. 18, 2016
Ubuntu Core 16 targets embedded applications such as the Internet of Things with its compact, modular architecture.
1. Ubuntu Core is built around snaps that are modules with a defined interface for connecting to other snaps. For example, a MySQL database server could be a provider to an application that consumes data from a database.

Ubuntu Core 16 is now available. It is a tiny, transactional implementation of Ubuntu Linux that targets embedded applications such as the Internet of Things (IoT). It uses a new packaging system with modules called snaps that include metadata about their connectivity and interface requirements (Fig. 1).

A snap can have one or more interfaces that are either a plug or a slot providing connections between snaps. A snap exists as a read-only, immutable, compressed squashFS blob, while an instance also includes a private, writeable directory. Communication with the operating system services uses the interface mechanism. Snaps can be given access to other directories.  

Ubuntu Core is a more limited, compact Linux, but it includes features such as transactional over-the-air updates with full rollback support. This is key for all IoT aspects, from consumer to industrial IoT (IIoT).

Security is also part of the mix, using Ubuntu’s AppArmor support that matches that found on the standard version of Ubuntu Linux. The security system applies to snaps and their automatic connectivity and configuration. A snap is confined to its published interfaces. Much of this is done by restricting directory and file access very similar to how the Inferno operating system worked.

2. A snap file is a specially formatted compressed zip file that includes metadata in addition to code.

A nice thing about the open-source Ubuntu Core is that it is free. It can be distributed at no cost. There is also an app (snap) store that can be used to distribute applications to consumers, as well as for developers.

The snap file used for distribution is actually a specially formatted, compressed zip file (Fig. 2). This includes a metadata file that includes the interface and security information to put the snap into context within an Ubuntu Core system. Snaps can include native code, as well as interpreted code like Python, PHP, and even Bash scripts.

Ubuntu Core 16 matches the usual Ubuntu 16.04 LTS (long-term support) platform in terms of the base kernel (Fig. 3). The difference is in package isolation. For example, shared libraries cannot go across snap boundaries.

3. Ubuntu Core 16 shares the same kernel as Ubuntu 16.04, but the packaging system is different. (Click image to enlarge)

Public collections of snaps and their source can be found on GitHub. Ubuntu Core is available for download for a range of target platforms that include Raspberry Pi 2 and 3, Intel NUC and Joule, Samsung’s Artik, Qualcomm Snapdragon, BeagleBone, Gumstix, and more. Essentially the system needs an x86 or a ARMv7 or better processor. This fits most Cortex-A systems. 128 Mbytes of RAM is a good starting point, with about 4 Gbytes of non-volatile storage. A Raspberry Pi 2 Model B has a Cortex-A7, 1 Gbyte of RAM, and an microSD card slot.

It is even possible to run Ubuntu Core 16 on virtual machines like Linux’s KVM. Although Ubuntu Core targets small footprint IoT applications, it is an interesting alternative to containers as a thin OS for more modular systems.

Once a system is running Ubuntu Core, it can use its connectivity to maintain and update the system’s snap collection. Snaps are available for most IoT-related protocols like MQTT and links to many cloud-based IoT services.

Ubuntu Core has a lot of competition, such as Windows 10 IoT Core, embedded RTOSes, and various Linux incarnations like Tizen Linux. It has the advantage of familiar Ubuntu underpinnings and development tools and the snappy module system.

Sponsored Recommendations

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Power modules provide high-efficiency conversion between 400V and 800V systems for electric vehicles

March 18, 2024
Porsche, Hyundai and GMC all are converting 400 – 800V today in very different ways. Learn more about how power modules stack up to these discrete designs.

Bidirectional power for EVs: The practical and creative opportunities using power modules

March 18, 2024
Bidirectional power modules enable vehicle-to-grid energy flow and other imaginative power opportunities. Learn more about Vicor power modules for EVs

Article: Tesla commits to 48V automotive electrics

March 18, 2024
48V is soon to be the new 12V according to Tesla. Size and weight reduction and enhanced power efficiency are a few of the benefits.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!