Yocto – CI

Overview

The Yocto  framework is a powerful tool used to generate a Linux image tailored for execution on the SoC system. Each Yocto build process results in the creation of an additional Software Development Kit (SDK). This SDK is essential for cross-development, allowing developers to create and test software in a different environment than the one it will ultimately run on.

Among the significant changes recently introduced are the upgrade to the Kirkstone Yocto release, and the implementation of a Continuous Integration/Continuous Deployment (CI/CD) pipeline.

The gitlab runner that is requried to run the pipeline was hosted on an external server. To enable the CI again the following steps are required: Install gitlab runner on the server, install docker on the server, allow the docker system to build new images and push it to an external registry.

Workflow

The previous image depicts the basic workflow with the Yocto framework and the project’s CI/CD pipeline.
  1. Update the Yocto recipes to include the new changes to the Linux image, and push the configuration to the GitLab server.
  2. GitLab only starts the GitLab Runner for changes on the main branch; for all other branches, the runner needs to be started manually.
  3. The GitLab Runner builds the SDK and the Linux image inside a Docker container, which can also be used for local builds.
  4. The GitLab Runner stores the image on the GitLab server and creates a new Docker container containing the SDK for cross-development.
  5. The developer uses the SDK Docker container for local driver and application development.