Firmware Update Strategies
Safely updating embedded devices in the field. A/B partitioning, rollback strategies, and secure firmware delivery explained.
Safely updating embedded devices in the field. A/B partitioning, rollback strategies, and secure firmware delivery explained.
The cardinal rule: A device must always be able to recover to a working state. If an update fails, the device should boot the previous firmware, not become a brick.
The most reliable approach uses two firmware partitions. The device boots from partition A while updates are written to partition B. After a successful update, the device switches to partition B. If the new firmware fails, it can fall back to partition A.
An alternative for storage-constrained devices. A small recovery partition contains minimal firmware that can download and flash the main firmware.
Firmware updates are an attack vector. Without security, attackers can install malicious firmware. Essential security measures:
All firmware images are cryptographically signed. The bootloader verifies signatures before accepting updates. Only firmware signed with your private key will be installed.
Each stage of boot verifies the next. ROM bootloader verifies first-stage bootloader, which verifies second-stage, which verifies firmware. If any stage fails verification, boot stops.
Encrypt firmware images to prevent reverse engineering and protect intellectual property. Each device decrypts using its unique key.
Downloads should use TLS. Certificate pinning prevents man-in-the-middle attacks. Verify server identity before downloading.
Don't push updates to all devices at once. Roll out to a small percentage first, monitor for problems, then gradually expand. If issues appear, stop the rollout before affecting the entire fleet.
Target specific devices for early updates - internal test devices, cooperative customers, or devices with telemetry enabled. Learn from canaries before broad deployment.
Group devices by hardware revision, configuration, or customer. Update groups independently, applying updates only to compatible devices.
Know what's happening during updates. Track:
High failure rates indicate problems with the update or with specific device populations. Investigate before continuing rollout.
Reliable firmware updates require multiple layers: resilient update mechanisms (A/B partitioning), security (code signing, secure boot), and operational controls (staged rollout, monitoring). The goal is zero bricked devices - every device should recover from any failure.
Design update capability from the start. Retrofitting reliable updates into a device designed without them is difficult. The extra storage and bootloader complexity is worth it when you have thousands of devices in the field.
Ask the author
Ask it here and it comes straight to the founder. No sales call, no obligation, and a real answer even if the answer is that you do not need us.
Kasun Wijayamanna
Founder, replies within one business day
Tell us what you're working on. We'll come back with a practical recommendation and clear next steps.
Built here. Your data stays here.
Thanks for reaching out. We will get back to you within one business day.
See what else we do