Skip to content

Ship your first update

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.

What is a firmware artifact?

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.

Steps

  1. Build your firmware image

    Build a root filesystem image for your target. With Yocto:

    Terminal window
    # In your Yocto build environment
    bitbake soc-monitoring-image

    This produces an .ext4 image, typically at:

    tmp/deploy/images/<machine>/soc-monitoring-image-<machine>.ext4

    For 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.

  2. Package the image as a Mender artifact

    Use mender-artifact to wrap the image with the required metadata:

    Terminal window
    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.mender

    Flags:

    FlagValue
    --device-typeMust match the value in /etc/mender/device_type on the target device
    --artifact-nameA unique name for this release (recommend release-vX.Y.Z)
    --fileThe .ext4 root filesystem image
    --outputOutput filename (use .mender extension)
  3. 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:

    Terminal window
    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.

  4. Create a deployment

    In the console:

    1. Navigate to DeploymentsNew Deployment.
    2. Select your target device (or a device group).
    3. Select the artifact you just uploaded.
    4. Set the schedule to Now and click Deploy.

    Via the API:

    Terminal window
    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"]
    }'
  5. Watch the update

    The agent polls for deployments every 30 minutes by default. To trigger an immediate check:

    Terminal window
    ssh user@<device-ip> "sudo systemctl restart soc-ota-agent"

    In the console, the deployment status transitions through:

    queueddownloadinginstallingrebootingsuccess

    You can also tail the agent log on the device:

    Terminal window
    ssh user@<device-ip> "sudo journalctl -u soc-ota-agent -f"

    A successful update ends with:

    INFO: Committing update
    INFO: Update successfully installed

Where to go next

Concepts

Understand the device lifecycle, deployment model, and how artifacts and RBAC work.

Read the concepts →

Device Integration

Guides for integrating the OTA agent into Yocto-based Linux images and custom board configurations.

Device integration guides →