Concepts
Understand the device lifecycle, deployment model, and how artifacts and RBAC work.
Once a device is registered and online, you can push firmware to it in three steps: build a .mender artifact, upload it to the console, and create a deployment targeting your device. This page walks through each step.
A .mender artifact is a signed package that contains a complete root filesystem image plus metadata (device type, artifact name, version). The OTA agent on the device reads the metadata to confirm the artifact is intended for its device type, then writes the filesystem to the inactive root partition.
You build artifacts with the mender-artifact CLI tool, which you can install from releases.mender.io.
Build your firmware image
Build a root filesystem image for your target. With Yocto:
# In your Yocto build environmentbitbake soc-monitoring-imageThis produces an .ext4 image, typically at:
tmp/deploy/images/<machine>/soc-monitoring-image-<machine>.ext4For a quick test with a pre-existing image, any .ext4 filesystem image will work — the agent writes it block-by-block to the inactive partition.
Package the image as a Mender artifact
Use mender-artifact to wrap the image with the required metadata:
mender-artifact write rootfs-image \ --device-type radxa-cm5-io \ --artifact-name release-v1.0.0 \ --file soc-monitoring-image.ext4 \ --output firmware-v1.0.0.menderFlags:
| Flag | Value |
|---|---|
--device-type | Must match the value in /etc/mender/device_type on the target device |
--artifact-name | A unique name for this release (recommend release-vX.Y.Z) |
--file | The .ext4 root filesystem image |
--output | Output filename (use .mender extension) |
Upload the artifact to OTA-Pulse
In the console, navigate to Firmware and click Upload Firmware. Select the .mender file, enter the version string, and click Upload.
Alternatively, upload via the API with curl:
curl -X POST http://localhost:8000/api/firmware/upload \ -H "X-API-Key: smk_your_admin_api_key" \ -F "file=@firmware-v1.0.0.mender" \ -F "version=1.0.0"The upload endpoint stores the artifact and makes it available for deployment.
Create a deployment
In the console:
Via the API:
curl -X POST http://localhost:8000/api/deployments \ -H "Content-Type: application/json" \ -H "X-API-Key: smk_your_admin_api_key" \ -d '{ "artifact_name": "release-v1.0.0", "device_ids": ["your-device-uuid"] }'Watch the update
The agent polls for deployments every 30 minutes by default. To trigger an immediate check:
ssh user@<device-ip> "sudo systemctl restart soc-ota-agent"In the console, the deployment status transitions through:
queued → downloading → installing → rebooting → success
You can also tail the agent log on the device:
ssh user@<device-ip> "sudo journalctl -u soc-ota-agent -f"A successful update ends with:
INFO: Committing updateINFO: Update successfully installedConcepts
Understand the device lifecycle, deployment model, and how artifacts and RBAC work.
Device Integration
Guides for integrating the OTA agent into Yocto-based Linux images and custom board configurations.