Skip to main content

Clea OS versus Yocto: How to Accelerate IoT Application Development

A practical demonstration with Raspberry Pi 4

The Internet of Things (IoT) encompasses a wide range of applications and products, from consumer smart TVs to building automation systems, cars, medical equipment, and remotely managed vending machines. For each of these applications, the open-source Yocto Project can be used to produce a minimal Linux image that runs on resource-constrained embedded systems without integrating unnecessary features of a full Linux distribution.

Nevertheless, IoT solutions still require some essential capabilities: device management, data collection infrastructure, and often the ability to run sophisticated user interfaces. While base Yocto offers a strong foundation for integrating these capabilities, doing so involves pulling separate data brokers, update managers, billing frameworks, and other features into a distribution. The complexity and expertise required to build custom Yocto distributions into a robust, commercially hardened solution can dramatically extend development time and therefore time-to-market.

Alternatively, SECO’s Clea OS provides an out-of-the-box embedded Linux solution that pre-integrates essential services and is agnostic to hardware, cloud service providers, and on-premises infrastructure. The modular Clea OS is optimized for DevOps and over-the-air (OTA) update environments. And its built-in security features like secure boot provide comprehensive cyber resiliency to keep devices safe from attack. There are two versions of Clea OS purpose-built for distinct and specific use cases within embedded and IoT production deployments:

  • Clea OS Things comprises the essentials for secure updates and reliable containerization on embedded devices.
  • Clea OS Embedded comes pre-configured with a complete toolset for testing and developing complex applications like human-machine interface (HMI) systems.

This article shows how Clea OS and its ecosystem streamline the build of right-sized production images and simplify connected deployments. The result is not just faster time-to-market. It’s also a clearer path to ensuring embedded and IoT devices can be reliably managed while providing high-level data insights that are easy to comprehend and act on. While Clea OS directly supports SECO hardware platforms, it can easily be utilized for non-SECO electronics as well.

How Clea OS leverages existing embedded Linux experience

The Yocto Project offers a powerful framework for building embedded Linux distributions that are tailored to specific application requirements. However, image customization comes with a steep learning curve that requires strong foundational knowledge of Linux, Git, and embedded systems in general.

Many embedded Linux developers may have some experience working with Yocto, and basic familiarity with its core concepts such as recipes, layers, and BitBake—the task execution engine that powers the Yocto build system. But this knowledge may be insufficient for developing advanced Yocto-based IoT applications within short timeframes.

This is where Clea OS can help accelerate development. Since Clea OS uses a modular framework with the Yocto Project as a base, developers can use the core principles, tools, and practices described in the Yocto Project reference manual to facilitate complex development without advanced Yocto experience. Moreover, the pre-configured, industrial-grade nature of Clea OS simplifies some of the most challenging aspects of IoT-aligned embedded Linux design by integrating the relevant aspects SECO's corresponding modules: Clea Astarte for data orchestration and Clea Edgehog for device management.

In this way, Clea OS adheres to an industry-standard methodology for embedded Linux development, rather than presenting engineers with an unfamiliar, proprietary system. By aligning with the modular, customizable Yocto framework, engineers using Clea OS gain the structural, performance, and support advantages of Yocto without having to start development from scratch.

Configuring the host for Clea OS

Before starting development for Clea OS, host systems require several essential packages to be installed, along with their related tools. They allow BitBake to execute the required compilation, patching, and file manipulation tasks to generate the Clea OS embedded Linux image:

  • Docker: Containerization platform in which the BitBake process is executed.
  • gawk: Text processing tool used to analyze build logs, configuration files, and other metadata generated during the build process.
  • wget: Network utility used to retrieve source code archives from the internet.
  • git: Used to fetch source code from Git repositories and apply patches.
  • diffstat: Patch analysis tool for reviewing and verifying changes applied by patches within the build process.
  • unzip: Extracts files from ZIP archives, such as those used for source code.
  • texinfo: Generates documentation such as help files or manuals from Texinfo source files included with other core packages.
  • gcc: GNU Compiler Collection that enables cross-compilation of C and C++ source code for the target hardware architecture.
  • build-essential: Debian/Ubuntu metapackage that installs some of the core Yocto build tools and utilities necessary for compiling software.
  • chrpath: Utility used by Yocto to ensure the compiled binaries on the target device look for their required shared libraries in the correct location.
  • socat: Establishes bi-directional data streams between two locations for debugging and other essential activities during development and testing.

Optional packages like Sphinx and LaTeX offer documentation generation and high-quality typesetting, respectively, to produce manuals, reference guides, and technical reports. This ensures development knowledge is not lost and that customized Yocto or Clea OS builds are well understood by future engineers tasked with maintaining Linux systems they did not build themselves.

The following demo shows how to set up a Clea OS build for a Raspberry Pi 4, a third-party, non-SECO platform. By using Docker and compatible OS images provided by SECO, the build process can be dramatically simplified, as essential packages like gawk, wget, git, diffstat, unzip, texinfo, and gcc are pre-installed within the Docker image.

Setting up the Clea OS build environment using Docker

The first step is to prepare a build directory in the home directory of the host system.

mkdir -p seco

Next, Docker must be set up for this build environment. To access Docker, git must first be configured with the user's name and email address.

git config --global user.name "<git_name>"
git config --global user.email "<git_email>"

Once this is done, a Docker user and Docker working directory can be prepared:

export docker_user="yoctouser"
export docker_workdir="workdir"

Now the Docker container can be run.

docker run --rm -it \
-v "${PWD}":/home/"${docker_user}"/"${docker_workdir}" \
-v "${HOME}"/.gitconfig:/home/"${docker_user}"/.gitconfig:ro \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "${HOME}"/.Xauthority:/home/"${docker_user}"/.Xauthority:rw \
-v /etc/ssl/certs/:/etc/ssl/certs/:ro \
--workdir=/home/"${docker_user}"/"${docker_workdir}" \
secodocker/clea-os-builder:latest --username="${docker_user}"

Next, return to the earlier build directory as the system is ready to connect with repositories that contain the Clea OS build assets.

mkdir -p seco/clea-os
cd seco/clea-os

Retrieve a Clea OS image from SECO’s repository using repo—a tool built on top of git that simplifies the management of multiple repositories within the Docker environment. For this demo, the manifest repository of a Clea OS build based on Yocto Project 5.0 Long Term Support (LTS) is initialized. The specific release is tagged by using its codename, in this case Scarthgap. (See note below)

repo init -u https://git.seco.com/clea-os/seco-manifest.git -b scarthgap

Selecting N allows you to continue with the build process. Now download the complete Clea OS source code from the relevant repositories:

repo sync -j$(nproc) --fetch-submodules --no-clone-bundle

Preparing a custom Clea OS image for Raspberry Pi 4

The system is ready for building a Clea OS image for Raspberry Pi 4. First, it is important to review and confirm that the desired Raspberry Pi 4 Clea OS image is on the list of images that can be built using the assets retrieved from the repositories. This list can be viewed by running:

. ./seco-setup.sh -l

If synced correctly, this list will contain three Clea OS images for Raspberry Pi 4: • raspberrypi4_64_clea-os • raspberrypi4_64_clea-os_embedded • raspberrypi4_64_clea-os_things

In this case raspberrypi4_64_clea-os refers to a Raspberry-Pi-specific base version of Clea OS that launches Clea Portal on boot to display a ready-to-use web-based graphical user interface (GUI). Set up this version by running:

. ./seco-setup.sh -d raspberrypi4_64_clea-os
. ./seco-setup.sh -c

At this point, developers are prompted to accept a “synaptics-killswitch” license, since the Raspberry Pi build makes use of a Synaptics software library. Once accepted, running Yocto’s bitbake command will cross-compile and package the complete Clea OS image.

bitbake seco-clea-os-image

Editor’s note: Clea OS GitLab groups further support development through a wide set of repositories hosted on SECO Developer Center.

This image can now be flashed onto an SD card for booting up the Clea OS image on the Raspberry Pi 4. Writing to the SD card can be done by using the command:

sudo bmaptool copy --bmap build_rpi4_64/tmp/deploy/images/raspberrypi4-64/seco-clea-os-image-raspberrypi4-64.rootfs-20260327110702.wic.bmap \ build_rpi4_64/tmp/deploy/images/raspberrypi4-64/seco-clea-os-image-raspberrypi4-64.rootfs-20260327110702.wic.bz2 /dev/sdX

Since raspberrypi4_64_clea-os was chosen, this should boot straight into Clea OS for shell login, which is by default root for the user and an empty password.

Advantages of Clea OS beyond base Yocto

The demo above illustrates the ease of Clea OS implementation when compared to building a custom Yocto image from scratch. By using pre-validated manifests, developers are not burdened with manually layering and resolving dependencies between each software component, such as those from Raspberry Pi and Yocto Scarthgap. The task is essentially a managed synchronization of existing assets. Plus, the preconfigured nature of Clea OS removes the need to write custom recipes for update triggers, security certificates, or cloud communication, which could take weeks of configuration for even a senior developer.

By pre-integrating essential services like fleet management and data orchestration through Clea Edgehog and Clea Astarte respectively, Clea OS offers a streamlined design approach that reduces development time for embedded Linux distributions while meeting all the requirements of modern IoT applications.

In short, SECO’s full-featured Clea OS allows developers to focus on building leading-edge application logic instead of spending countless hours plumbing multiple under-the-hood services together simply to get products IoT ready.

For developers interested in learning more, SECO provides extensive documentation on its Developer Center and dedicated Clea website. Visit these resources to evaluate Clea OS today and accelerate your path to connected, intelligent deployments.

Note: The repo tool may ask developers to test colorized output. However, agreeing to this may result in the following error as the .gitconfig file was previously set to read-only (:ro):

Traceback (most recent call last):
File "/home/yoctouser/workdir/.repo/repo/main.py", line 868, in
<module>
_Main(sys.argv[1:])
File "/home/yoctouser/workdir/.repo/repo/main.py", line 844, in _Main
result = repo._Run(name, gopts, argv) or 0
File "/home/yoctouser/workdir/.repo/repo/main.py", line 292, in _Run
result = run()
File "/home/yoctouser/workdir/.repo/repo/main.py", line 273, in
<lambda>
lambda: self._RunLong(name, gopts, argv, git_trace2_event_log) or 0
File "/home/yoctouser/workdir/.repo/repo/main.py", line 436, in
_RunLong
execute_command()
File "/home/yoctouser/workdir/.repo/repo/main.py", line 402, in
execute_command
execute_command_helper()
File "/home/yoctouser/workdir/.repo/repo/main.py", line 368, in
execute_command_helper
result = cmd.Execute(copts, cargs)
File "/home/yoctouser/workdir/.repo/repo/subcmds/init.py", line 408,
in Execute
self._ConfigureColor()
File "/home/yoctouser/workdir/.repo/repo/subcmds/init.py", line 274,
in _ConfigureColor
gc.SetString("color.ui", "auto")
File "/home/yoctouser/workdir/.repo/repo/git_config.py", line 289, in
SetString
self._do("--replace-all", name, value)
File "/home/yoctouser/workdir/.repo/repo/git_config.py", line 441, in
_do
raise GitError(f"git config {str(args)}: {p.stderr}")
error.GitError: git config ('--replace-all', 'color.ui', 'auto'):
error: could not write config file /home/yoctouser/.gitconfig: Device
or resource busy