Mender Guide¶
Mender is an open-source OTA update manager for embedded Linux, providing secure, reliable, and flexible update mechanisms. It supports seamless over-the-air rollouts, simplified local provisioning, and both self-hosted and cloud-hosted server options. Key features include:
- A/B atomic updates & rollback: Switch between two rootfs partitions and automatically revert to the last known-good image on failure.
- Local updates: Install artifacts manually via USB stick, SD card or command-line interface for offline or on-site provisioning.
- Self-hosted: Deploy and manage updates on your own infrastructure for full control over scheduling, security and integrations.
- Mender Hosted: Cloud-managed SaaS offering with built-in scalability, monitoring and simplified device grouping.
For more information, see the Mender website and the Technical documentation.
Mender Integration with VAR-SOM-MX8M-PLUS¶
This reference guide shows how to integrate Mender on the VAR-SOM-MX8M-PLUS platform. It covers three common update workflows:
- Build: Create a Mender-enabled disk image that can be flashed directly to eMMC.
- Serverless updates: Copy the update artifact to the board over an Ethernet link and apply it locally.
- Server-based update: Upload the artifact to a self-hosted Mender server and trigger a remote update.
Note: This example is provided for demonstration only. It omits or disables certain security features—such as TLS authentication, image signing, and verification, to simplify the walkthrough. Before deploying in production, review and harden all configurations to meet your product’s security requirements.
Building Mender Image and Artifacts¶
This guide assumes the user is familiar with how to Build Yocto from source code.
First, add meta-mender-core and meta-mender-demo to conf/bblayers.conf:
bitbake-layers add-layer ../sources/meta-mender/meta-mender-core
bitbake-layers add-layer ../sources/meta-mender/meta-mender-demo
Next, build your image:
This will generate the following files:
# Partitioned image to be flashed directly to eMMC:
tmp/deploy/images/imx8mp-var-dart/fsl-image-gui-imx8mp-var-dart.sdimg
# Artifact for updating an image that's already flashed to eMMC:
tmp/deploy/images/imx8mp-var-dart/fsl-image-gui-imx8mp-var-dart.mender
Flash a Mender Image¶
Mender creates a partitioned image that must be written directly to the eMMC. Booting from an SD card is not supported unless you modify the hardcoded values in imx8mp-var-dart.conf.
One common method to flash the image is via USB OTG using UMS (USB Mass Storage Gadget).
Steps:
-
Connect the USB OTG port on the Variscite Evaluation Kit (EVK) to a Linux host computer using a USB cable.
-
On the target device, in U-Boot, start UMS:
-
On the host computer, a disk unit will be mounted. Unmount the respective disk unit with:
-
On the host computer, flash the image using
bmaptool. This is preferred overddbecause it is faster and verifies blocks:
Replace /dev/sdX with the device node that appears when the board is in UMS mode (e.g., /dev/sdb). Be careful to select the correct device to avoid overwriting your host system.
Deploy a Mender Artifact Locally¶
Once the Mender-enabled image is booted on the target device, you can deploy a .mender artifact directly from your development machine without a Mender server.
Steps:
- Copy the artifact from the host to the target over SSH:
Replace TARGET_IP_ADDR with the actual IP address of the target device.
-
On the target device, install the update:
-
Reboot the device to apply the update:
-
After reboot, commit the update to make it permanent:
If the update is not committed, the system will automatically roll back to the previous version on the next reboot.
Deploy a Mender Artifact using a self hosted server¶
Configuring the self hosted server¶
Mender provides a hosted server to manage deployments. For more information, see: https://hosted.mender.io/ui/
Mender also providers a docker container to self host your own server. For more information, see: https://docs.mender.io/server-installation/evaluation-with-docker-compose
Clone the mender-server repository which contains everything that is need to start the demo server:
Change directory to the cloned repository:
Set the MENDER_IMAGE_TAG environment variable (defines which Mender Server version to start, read by XYZ in command below):
Start the demo server:
Once the server is running, you can create the admin user:
MENDER_USERNAME=[email protected]
MENDER_PASSWORD=PleaseReplaceWithASecurePassword
docker compose run --name create-user useradm create-user --username "$MENDER_USERNAME" --password "$MENDER_PASSWORD"
Open the browser and visit https://localhost to log in using the credentials configured in the above snippet.
Adding a new device to the server¶
Configure your image to use the demo server by setting MENDER_DEMO_HOST_IP_ADDRESS in variscite-mender.inc
After programming a VAR-SOM-MX8M-PLUS with the updated image, it will try to authenticate with the server and appear under the 'pending devices' list:
Uploading new Mender Releases¶
After installing the original mender image, new images can be built, uploaded to the server, and deployed to the device.
First, change MENDER_ARTIFACT_NAME in variscite-mender.inc to give your image a new name.
Then, rebuild the image:
And, upload tmp/deploy/images/imx8mp-var-dart/fsl-image-gui-imx8mp-var-dart.mender to the RELEASES tab:
Deploying a new Mender Release¶
Releases are deployed to devices using the DEPLOYMENTS tab. Configure the release by selecting the devices, the release, and when to run the deployment:
The status of the deployment can be monitored by selecting the deployment in the DEPLOYMENTS tab.


