Embedded Linux and secure updates
Your own Linux platform for your machine, under your own control.
Sound familiar?
- Every device in the field runs a slightly different software version.
- Updates go via a USB stick or a technician on site.
- There is no secure boot or signed update yet.
What we do
- Reproducible Yocto builds for your board
- Signed remote A/B updates with automatic rollback
- Secure boot and a protected boot chain, including bootloaders
- Containers and services on the device
- Monitoring of machines in the field
- Maintenance and updates throughout the product's life
$ rauc install machine-2.4.1.raucb 20% Verifying signature 40% Verifying signature done. 90% Copying image to rootfs.1 100% Installing done. Installing `machine-2.4.1.raucb` succeeded $ systemctl reboot … $ rauc status Booted from: rootfs.1 (B) x [rootfs.1] (/dev/mmcblk2p3, ext4, booted) boot status: good
What you get
- Yocto layers and build pipeline
- Update mechanism with signing
- Guide for your team
Technology
- Yocto
- Embedded Linux
- Secure boot
- Signed A/B updates (OTA)
- Docker
- Grafana
Related articles
A familiar situation
The board came with a BSP from the SoC vendor: a Yocto release a few years old, a kernel with vendor patches and a handful of layers nobody updates any more. The first series are at customers, but a kernel fix cannot reach the field without a site visit. And the build runs on one workstation nobody can reproduce.
Our founder built and maintained a Yocto image with signed A/B updates for industrial 3D printers, and has implemented secure boot. This is how we approach it.
Step 1: a build you can repeat
The same source always produces the same image:
- All layers (poky, the vendor BSP layer, meta-openembedded, your own layer) at pinned revisions, for example in a kas configuration.
- Your changes live in your own layer with
.bbappendfiles, not as edits to third-party layers. - Releases come from CI, not from a laptop.
- Source archives and the sstate cache are kept, so a build still works in three years when an upstream URL has gone.
Step 2: an upgrade path for the BSP
An old Yocto release no longer gets security fixes. We map how far the vendor layer has drifted from upstream, which patches you really need and which LTS release you can move to.
Step 3: updates that do not brick machines
For field updates we use an A/B scheme with RAUC or Mender. An update always goes to the rootfs partition that is not running.
- The update bundle is signed. The device checks the signature before writing anything.
- The bootloader keeps a boot count. If the new version fails to come up, it falls back to the old one.
- After boot, a health check confirms the machine really works, including the link to the controller. Only then is the new slot marked good.
Settings and data live on a separate data partition.
Step 4: a closed boot chain
Secure boot is a chain where each stage verifies the next. The SoC boot ROM verifies the signed bootloader, the bootloader verifies a signed FIT image with kernel and device tree, and the root filesystem is verified on read with dm-verity. That makes the rootfs read-only.
Closing the device for good means burning fuses, and that cannot be undone. We test the whole chain on open boards first and only close once updates, rollback and recovery are shown to work. Production keys are not in the repository or on a build agent but in a separate signing step, preferably backed by an HSM, with a plan for revoking keys. See Secure boot on embedded Linux.
Step 5: SBOM and CVEs from the same build
Yocto can produce an SPDX SBOM on every build (the create-spdx class) and use cve-check to compare package versions against known vulnerabilities. We keep the output per release, so for a new CVE you see which versions in the field are affected. You need this for the CRA, see SBOM and the CRA.
Pitfalls we see often
- Burning fuses before the recovery path is tested. A wrong key hash turns the board into scrap.
- An open U-Boot console or a writable bootloader environment, which lets someone bypass the chain.
- No downgrade protection, so an old, vulnerable but validly signed version can be installed again.
The CRA quick scan shows where your platform stands in 1 to 2 weeks.
Frequently asked questions
RAUC or Mender?
Both do signed A/B updates with rollback. RAUC is only the update client: you decide how bundles reach the device, for example through your own backend. Mender ships client and management server together.
Can we add secure boot to devices already in the field?
Partly. Signed updates and a verified kernel and rootfs can be rolled out through an update. Verification from the boot ROM needs fuses to be burned, and a mistake there cannot be recovered. Often we close new series fully and existing devices as far as is safe.
Do we need to move to a newer Yocto release?
Not always right away. But once your release no longer gets security fixes, every CVE becomes manual work.