Embedded Software - VisionFive - Mender - Yocto - Part 4 a screenshot of a computer

VisionFive - Mender - Yocto

Part 4 - Create an artifact for Mender

artifact for Mender

Create an artifact for Mender

We are using the Yocto Kirkstone branch for development. We assume that you already have a working development environment installed and set up your environment as described in VisionFive - Mender - Yocto - Part 1, VisionFive - Mender - Yocto - Part 2 and in VisionFive - Mender - Yocto - Part 3.

Mender artifact

Mender uses artifacts to package the software updates for delivery to devices. Depending on which version of Mender server you use, you have more or fewer features. An overview of the Mender versions and features are shown at Comparison of Mender features.

As we are using an open-source Mender server, we can only create a complete filesystem artifact, e.g. the full rootfs is in the artifact.

Yocto create an artifact

Every time you bitbake the complete Linux image

bitbake vision-five-image-mender

you get an artifact. In the same directory where you find the .sdimg file, you also find a .mender file. This is the created artifact. For testing, you can add a new program (e.g., nano as text editor) or, if already installed, remove it.

Important

Each artifact must have a unique release name. So, you must change the variable 'MENDER_ARTIFACT_NAME' in your local.conf file. E.g. you can use 'name' + 'sequential numbering' + 'date'

Upload artifact to Mender server

Login to your Mender server, go to 'Releases', and click on the Upload button. Choose your .mender file and upload it. The Mender server recognizes the 'MENDER_ARTIFACT_NAME' automatically.

Deploy release

If the artifact was uploaded, you could immediately click on the 'CREATE DEPLOYMENT WITH THIS RELEASE' button to create a deployment. Select a device group and click 'NEXT'. Then click 'CREATE' and the deployment is created.

Rollout

Depending on the polling intervals defined in the Mender client, the Mender client on the device begins to download the artifact and installs it in the non-active root partition.

After that, a reboot was initialized and - if successful - committed to the server.

If the installation/reboot was unsuccessful, the device boots from the rootfs partition, which is used before the artifact download.

Login to the device and test the changes you are made.

Copyright License

Copyright © 2022 Interelectronix e.K.
This Project source code is licensed under the GPL-3.0 license.

Embedded Software - VisionFive - Mender - Yocto a screenshot of a computer
Part 1 - Basic setup of the Yocto environment

Part 1 of a series of articles, how to set up a Yocto environment to create a Yocto Linux with the integration of a Mender client.

Embedded Software - VisionFive - Mender - Yocto a screenshot of a computer
Part 2 - Basic setup to include Mender

Part 2 of a series of articles, how to set up a Yocto environment to create a Yocto Linux with the integration of a Mender client.

Embedded Software - VisionFive - Mender - Yocto a screenshot of a computer
Part 3 - u-boot configuration for Mender

Part 3 of a series of articles, how to set up a Yocto environment to create a Yocto Linux with the integration of a Mender client.