The OS, a means to run device applications and functionalities
When creating a new embedded system or device, you need to ensure that your product delivers all the benefits you envision for your customers. These benefits stem from two main components: hardware and application. The hardware provides sensors, capabilities, and features—like a coffee machine that brews coffee. Meanwhile, the embedded application brings functionalities, customization, and management of the hardware features.
Ultimately, the operating system is just a means to an end. For instance, consider a coffee machine and a highway control system. We could provide countless examples, even those without screens, such as gateway applications that process protocols from industrial buses and transmit them to other subsystems or cloud systems.
The core value of your system lies in the application. Today, we will explore how to deploy, package, and choose the right technology for your embedded application. Let’s begin with a few definitions.
What does it mean to deploy an app?
When you have your source code, you need to create a bundle that builds a binary version of your system. This built version, called ‘package’, must then be sent to your embedded operating system.
Deploying an application is not just about one application with one binary; it is also about managing all the dependencies. You need to deploy a complete package to run your embedded application on your operating system. The process is more complex because there are various contexts in which you might want to deploy your application, and each context requires a different approach.
1 - Deploying an app in development & debugging
For example, during development, you want to deploy easily without constraints. You need the ability to remotely debug the system with direct control from your development laptop to your target device.
2 - Deploying an application for test & QA
In the test and qualification phase, you need an environment where you can easily update your system, retrieve logs, and gather debug information. This environment should closely resemble the production environment.
3 - Deploying an embedded application for production
When it comes to production, there are two main scenarios: manufacturing and updates.
- For manufacturing, you need to flash your system, ensuring it is robust, secure, and closed.
- For updates, you need a different packaging approach to support system migration and compatibility with the current online system.
There are many ways to package and manage the deployment of your system. Now, let’s explore how you can achieve this.
How to deploy an application on a Yocto-based system?
We will focus on Yocto, a trusted tool in the embedded world. Many device manufacturers indeed rely on Yocto for building their Linux operating systems due to its high level of customization and ability to limit the number of components. To know more about Yocto, consult this comprehensive guide.
To build or not to build in Yocto?
Pros: Why you should build your application in Yocto
Yocto is an excellent dependency manager. It brings in the components you need and builds the entire system with a consistent model, ensuring a clean and reliable result.
One of the significant advantages of Yocto is its support for multi-configuration management. If you have the same business application and hardware but different options for your product range, Yocto handles this efficiently. It takes the package and configuration, generating a fully integrated package for your system.
Cons: The disadvantages of using Yocto for building your app
Yocto is not always compliant with application development team needs. Application development teams often want to add new components or third-party libraries, which can be challenging to integrate into Yocto. This lack of flexibility means that application teams may not have the necessary Yocto knowledge to make these modifications. This can become problematic when new components are needed.
As a result, embedded application teams often prefer using Debian or Ubuntu with package managers like apt-get install. However, while this approach is useful for application development, it can lead to large images with many vulnerabilities.
That is why you may need different approaches in regard of the context: development, QA, or production.
The simpler ways to build an embedded application with Yocto
Yocto can enumerate all the meta-layers of your system, including those for the kernel and other Linux components. You can create your own meta-layers with recipes to build your custom application.
The system will automatically clone the source code of your application, build the application binary in the proper context with the right architecture and compiler, and integrate all of this into a package.
In a nutshell, Yocto acts as a package manager, integrating everything into your system.
Toolchain, SDK, and third-party libraries
To simplify application development and building, you can use Yocto to generate a dedicated image that includes all the necessary libraries and compilers. This toolchain can be used on an external laptop for cross-compilation, transforming the application source code into a binary that can be manually deployed for development purposes.
If you need an extra component that is not integrated into Yocto, you will need to add a new package to your toolchain. This new package will generate a toolchain that the application team can use to implement new features. This process can be complex because it requires generating a new toolchain whenever you need a new package. Alternatively, you can integrate new packages directly into your application, keeping your toolchain unchanged. This approach is simpler but offers less control over what happens inside your system. Considering the importance of both approaches, the applicative team could initially utilize their own third-party solutions while planning dedicated integration time to incorporate this directly into Yocto for production readiness.
Further considerations: containers, update manager, automation
There are various approaches you can use for building your system. While we have discussed deploying an application binary onto an embedded system, it is essential to consider the possibilities for integrating your package and ensuring quality.
Containers
One key consideration is the communication of your application. Traditionally, binaries were placed inside Yocto and run as standard applications. However, modern embedded systems can now easily implement containerized applications, a method previously reserved for servers and PCs. Technologies like Docker, RunC and Systemd-nspawn offer added value and some trade-offs.
Be cautious with containers. They offer benefits like isolation, but only if they are used correctly. Properly isolating different components is crucial. If you map the graphical interface, network interface, and all drivers into your containers, you will not achieve much isolation. Use containers for the right reasons, with proper organization and configuration. Simply enabling everything will not add security value.
Update managers
You might consider using containers for packaging and deploying updates, but in embedded systems, this is not common. Instead, updates are often deployed at the partition or file level. Frameworks and technologies like SWUpdate, RAUC or Mender, which are popular in the embedded world, can help you update your system at the appropriate level. These tools offer new ways to package and send updates.
Automation
Lastly, let’s talk about automation. We have discussed building Yocto and your app, but it is crucial to adopt a DevOps approach with maximum automation. Automation adds significant value by allowing you to reproduce your system, launch tests, and ensure quality. A good DevOps process will enhance the quality of your system.
At The Embedded Kit, we use tools dedicated to test automation, like Pluma, and we trust GitLab for our development. While we recommend GitLab to our customers, it is not mandatory. The key is to use technology that fits your needs.
When developing your system, consider the different environments and how a proper development setup can speed up your progress and enhance cybersecurity. Your environment is key. Do not rely on just one method. Consider various tools for production and embedded application development like Qt, Slint, or Flutter.
At The Embedded Kit, we provide technology that simplifies bringing an operating system based on Yocto to your hardware. We integrate various frameworks for embedded application development to fit your specific needs and technology choices.




