Why it exists
An over-the-air (OTA) update must survive more than a lost download. Power can disappear during flashing. A correctly signed image can fail to start. Software can boot successfully yet fail to communicate with another electronic control unit (ECU).
For a vehicle, recovery must be designed before installation begins. A brake controller cannot depend on a workshop visit as its only response to every interrupted update. A central computer should avoid keeping the vehicle unavailable while it writes a large operating-system image.
Installation strategy determines what remains usable during the update, when the new software takes control and what happens if it fails.
What it is
Single-bank installation replaces the application in its existing flash area. The ECU normally enters its bootloader, stops the application and writes the replacement. The vehicle is generally unavailable for normal use during this flashing window when the affected controller provides a required function.
A/B installation keeps an active image and a separate candidate image. The updater writes the inactive location, verifies it and requests a switch at the next permitted start. The previous image remains available until the candidate passes its acceptance checks.
| Strategy | During installation | Storage implication | Recovery |
|---|---|---|---|
| Single bank | Application normally stopped | One application area, plus bootloader and any staging space | Protected recovery loader resumes or repeats flashing |
| A/B | Active software may continue running | Space for active and candidate images, plus metadata and working space | Boot manager can select the previous valid image |
Delta packages describe changes from a particular installed image to a target image. They reduce download size when the images share enough content. They do not remove the need to reconstruct, store and verify the target.
Rollback returns to an earlier working release after a failed activation. Fallback is broader: it can select another bootable slot or a dedicated recovery environment. Neither means that any old software is acceptable.
How it works
The updater first checks whether the package targets the correct hardware and software configuration. Authenticated metadata identifies the target image, its dependencies and, for a delta, the required base image.
Packages may be compressed to reduce transfer size and encrypted to protect confidentiality. Compression adds decompression work and buffer requirements. Encryption requires managed keys and an authenticated processing design. Encryption alone does not establish that an authorized publisher supplied the software.
A delta installer verifies the exact base image, applies the patch and checks the reconstructed result. Patching the active image directly can destroy the recovery advantage of A/B. Prefer reconstruction in the inactive slot or another protected destination.
Background installation and activation are separate operations; activation waits for suitable vehicle conditions.
Before activation, verify the complete candidate against authenticated expectations, including its integrity, authenticity and compatibility. Secure boot then enforces the boot-time trust policy. A valid signature proves authorization, not functional correctness.
The boot manager records a pending trial using power-loss-safe metadata. If the candidate repeatedly fails to boot or never confirms health, it selects a permitted fallback. Health confirmation should cover required services and communication, not merely reaching the application entry point.
On a microcontroller unit (MCU), A/B may use dual-bank internal flash. Check the actual read-while-write restrictions: separate banks do not automatically guarantee uninterrupted execution. Interrupt handlers, shared flash resources and bank mapping can constrain background programming. Some devices support bank swapping; others need bootloader-controlled image selection or relocation.
On a high-performance computer (HPC), A/B commonly uses storage partitions for Linux or QNX system images. Coordinate the kernel, root filesystem and associated configuration as a compatible release. Containers can stage a new application image and switch service versions, but do not by themselves protect the host operating system or persistent application data.
Anti-rollback, or downgrade protection, rejects software below a permitted security version. A protected monotonic counter or equivalent trusted state enforces that floor. Security versions need not change with every application release. Define when the floor advances: raising it before trial acceptance can make the previous slot ineligible. If policy requires immediate advancement, provide a recovery image that meets the new floor.
When to use it — and when not
Use A/B when availability, unattended recovery and predictable activation justify the extra storage. It suits central computers and controllers with sufficient flash and suitable programming behavior.
Use single-bank installation when memory is constrained and a planned service interruption is acceptable. Keep a protected recovery path that works even when the application is incomplete.
Use deltas when download cost or connectivity makes smaller transfers valuable. Prefer full images when installed versions vary widely, reconstruction resources are scarce or patch complexity outweighs transfer savings.
Background installation does not authorize activation while driving. Activation conditions depend on the affected functions and the vehicle’s coordinated update plan.
Best practices
- Budget the whole storage path. Include candidate images, download staging, decompression buffers, patch workspace, metadata and recovery software.
- Make persistent state power-loss safe. Test interruptions during erase, programming, slot selection and health confirmation.
- Define meaningful acceptance checks. Include watchdog behavior, required communication and essential services; provide a bounded trial and recovery policy.
- Plan data compatibility. Use reversible migrations or defer irreversible changes until acceptance. Preserve data needed by the fallback release.
- Coordinate dependent controllers. A working local rollback can still create an incompatible vehicle configuration.
- Keep a full-package recovery option. A delta may become unusable because its required base image is missing or damaged.
- Test security and recovery together. Confirm that version-counter changes, key changes and fallback selection produce the intended result.
Common pitfalls
- Assuming A/B guarantees continuous service. Flash stalls, restarts and dependency changes can still interrupt functions.
- Treating a downloaded package as an installed release. Track download, installation, activation and health confirmation separately.
- Verifying only the patch. The reconstructed target must also match authenticated expectations.
- Overwriting the previous slot too early. Keep it until the acceptance policy permits reuse.
- Ignoring shared data during rollback. An older executable may fail against a newly migrated database.
- Confusing recovery with unrestricted downgrade. Fallback must obey the security floor while preserving a usable recovery route.
- Assuming every failure causes rollback. Corrupt boot metadata, damaged shared storage or a broken recovery loader can defeat both slots.