Embedded Linux project: Yocto or Ubuntu Core? [Part III]
Edoardo Barbieri
on 27 April 2022
Tags: Embedded , Embedded Linux , IoT , Ubuntu Core
Welcome to the third chapter of this four-part series on Yocto vs Ubuntu Core.
We have already gone a long way on the journey to choosing the right OS for your embedded Linux project. Part I covered the main characteristics of Yocto, and Part II assessed the advantages brought about by Ubuntu Core. If you missed the first two chapters, don’t worry: we will recap the major learnings below, before delving into the commercial vs roll-your-own embedded Linux distro debate. Alternatively, head over to Part I and Part II now for a more extensive treatment of the pros and cons of using Yocto or Ubuntu Core for your embedded Linux project. If you are ready for it, jump ahead to Part IV for the ultimate, direct comparison between the two solutions.
Let us jump straight in with a short review of Yocto and Ubuntu Core, followed by some major considerations behind buying vs building your own embedded Linux distro.
Yocto for your embedded Linux project
Yocto provides developers with a root filesystem image, a kernel, a bootloader, and a compatible toolchain for their embedded Linux project. It is flexible enough to create a custom distribution from scratch with complete control over compiling and building the customised, embedded Linux system.
By keeping configuration information in multiple parts, building for variants of the same board only requires minor edits to recipes and layers. However, developers may need to gather a few layers before commencing a build, as, for instance, the local configuration dictates how to perform the build, the machine configuration prescribes the architecture and hardware features, and the image recipe describes the packages to pre-install.
As a downside of the extreme flexibility for a wide range of boards, Yocto exposes lots of complexity to the end-user. The learning curve is inevitably challenging and often cited as a blocker to getting started with Yocto when working on an embedded Linux project.
Ubuntu Core for your embedded Linux project
Ubuntu Core is an Ubuntu flavour with a minimal footprint and a simple, stacked architecture. It automatically confines applications for enhanced security, protecting the end-user applications and data.
With a significantly reduced attack surface, Ubuntu Core is tamper resistant and hardened against corruption. It is easy to deploy and manage, allowing developers to run their workloads consistently across a wide range of hardware for their embedded Linux projects. Ubuntu Core is built from snaps, a secure, confined, dependency-free, cross-platform Linux packaging format. When updating a snap application, Ubuntu Core backups all the data before the update and rolls back if the update fails, ensuring the system is never in an incomplete state. By leveraging a store to add and remove applications, developers can deploy the latest software automatically via worry-free updates.
Unlike other embedded Linux, Canonical supports devices running Ubuntu Core for up to 10 years, delivering security patches and bug fixes so that your embedded Linux project is always up-to-date.
Buy vs Build for your embedded Linux project
As stated, Yocto is a popular open-source collaboration initiative that helps developers create custom Linux-based systems. As a freely available, community-maintained build system, Yocto has greatly helped spearhead the adoption of Linux for embedded devices. Furthermore, by lowering the barrier to entry for developers wishing to build their custom Linux distro from scratch, Yocto benefits from wide popularity.
There are, however, challenges not addressed by community-maintained projects, bound to surface when shipping embedded Linux projects in production. Commercial embedded Linux vendors try to fill this gap by providing enterprise-grade support and expertise, substantially reducing time to market. The choice comes down to building your own embedded Linux distro via a community-maintained build system like Yocto or relying on a production-grade distribution like Ubuntu Core supported by a commercial entity like Canonical over several years.
Having set the stage, let’s now tackle the embedded Linux: make or buy? debate, which will inform the subsequent, direct comparison between Yocto and Ubuntu Core in Part IV. Should you roll your solution or rely on a commercially-supported embedded Linux distro? Keep reading to find out.
Commercial support for your embedded Linux project
An often overlooked consideration when choosing the OS for an embedded Linux project is the availability of professional support.
Ongoing vulnerabilities and recent exploits force developers to think more diligently about community-maintained projects and the open-source landscape. Whereas developers should constantly be scanning for vulnerabilities, enterprises can’t be dependent on the individuals.
A constant stream of reliable security updates with a practice well-tested in production environments is necessary rather than blind reliance on individual contributors. A community-maintained project, layer, or BSP does not guarantee protection for an enterprise: having a service-level agreement with a commercial partner is often a safer approach.
In a community-driven open source project, individual maintainers often handle security after the fact, whereas enterprises with a reputation for reliability and trust back the development of a vendor-driven project like Ubuntu Core.
The product roadmap for your embedded Linux project
Depending on the scope of your embedded Linux project, a more tactical approach to development is worthy of consideration.
Paid engineering work on an embedded Linux OS results in a professional and long-term sustainable approach to handling performance issues, fixing bugs, coherently evolving the software, and taking into account the priorities of several stakeholders. By following a product-centric view when prioritizing development and features, developers benefit from a stable reliance on a long-term product roadmap when working on their embedded Linux project.
On the other hand, the contributors of a community-led piece of work may just be solving their specific use case or pain point.
Often, developers with a clear vision and the necessary knowledge to turn that vision into reality initiate successful open-source projects. They usually begin with few expectations, eventually exceeding the maintainer capacity with increased adoption. The success of these open-source projects or contributions depends on its leadership, usually by the founders but sometimes in a more institutional way, as with Ubuntu.
The contributors of a community-led open-source project may not be interested in the bigger picture and overall architecture, leading to legacy layers in Yocto, unmaintained BSPs, and poor testing resulting in critical vulnerabilities and technical debts. A lack of clear leadership and long-term thinking thus results in an unstable and unreliable product roadmap.
Consequently, the choice of proceeding with a collaboration project like Yocto or an enterprise-grade solution like Ubuntu Core comes down to the scope of your embedded Linux project.
Final considerations for your embedded Linux project
Let us recap the above considerations. Yocto enables most developers to create a custom distribution for their embedded Linux project. However, enterprises running embedded Linux in production and at scale have requirements not addressed by a community-maintained build system.
Device manufacturers face the dilemma of rolling out their own Linux distribution or using a commercially supported solution. Embedded Linux vendors aim to close that gap by providing expertise, enablement, and support. Furthermore, an enterprise-grade, commercially-supported solution like Ubuntu Core is free to use just like Yocto: anyone can bring an idea to life. Developers can download it on any Raspberry Pi, x86 board, or virtual machine to start prototyping today, as well as leveraging thousands of apps in the Snap Store to create a smart appliance in a couple of minutes.
It is now time for a direct comparison between Yocto and Ubuntu Core. In the final chapter of the series, we will thoroughly confront them across a broad range of aspects, from board bring-up and maintenance to security, updates, and commercially-supported embedded Kubernetes.
Head over to Part IV now for the ultimate, 1:1 assessment between Yocto and Ubuntu Core for your embedded Linux project.
Further reading for your embedded Linux project
Want to go back to the basics? Find out what is embedded Linux.
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 hearing a detailed comparison of Yocto and Ubuntu Core? Watch the latest webinar on-demand here or download our Yocto vs Ubuntu Core CTO’s comparison guide
Yocto Project and all related marks and logos are trademarks of The Linux Foundation. This presentation is not, in any way, endorsed by the Yocto Project or The Linux Foundation.
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
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...
Space pioneers: Lonestar gears up to create a data centre on the Moon
Why establish a data centre on the Moon? Find out in our blog.
A look into Ubuntu Core 24: Your first Linux-powered Matter device
Welcome to this blog series which explores innovative uses of Ubuntu Core. Throughout this series, Canonical’s Engineers will show what you can build with...