Contents

A/B updates, delta packages and rollback

Prepare new software beside the running version, verify it before switching, and keep a controlled recovery path if activation fails.

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.

Example A/B activation
Receive packageCheck authenticated metadata and compatibility
Prepare inactive slotDecrypt, decompress and reconstruct as required
Verify candidateCheck complete target image before activation
Request trial startPersist pending selection safely
Check healthConfirm startup and required functions
Confirm or recoverAccept candidate or select permitted fallback

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.

What it means for your discipline

  • Software update & OTA Core

    Defines package formats, installation conditions, activation rules and recovery paths; tracks whether each vehicle has installed and confirmed the intended release.

  • Base software Partial

    Implements bootloader slot selection, interrupted-flash recovery and persistent boot status on microcontrollers; checks the flash controller's programming constraints.

  • HPC & application software Partial

    Defines startup health checks and keeps persistent data compatible with fallback; integrates operating-system images and container services into a consistent release.

  • Hardware & silicon Partial

    Budgets flash capacity for active and candidate images, staging and recovery; verifies whether execution can continue while another flash bank is programmed.

  • Cybersecurity Partial

    Defines package authentication, decryption and protected version counters; checks that recovery cannot bypass downgrade protection.

  • Functional safety Partial

    Defines safe activation conditions and the vehicle functions that must remain available during installation, trial startup and recovery.

No direct stake: E/E architecture · Networks & communication · Diagnostics & lifecycle

Where it sits in the software stack

Generic layered software of a central HPC (application processor with hypervisor, plus a safety island) and of a classic MCU-based ECU (AUTOSAR Classic). Highlighted modules matter for this topic. Click any module to open its page.

HPC · application processor (MPU) and safety island (MCU)
  • OTA client · UCM — Reconstructs and verifies the candidate image in an inactive slot, coordinates activation, and records acceptance or recovery.
  • Secure boot chain · TEE — Selects trial and fallback images, verifies boot authenticity, and enforces the permitted security version floor.
  • Linux — Starts the candidate system image and supports health confirmation before the update is accepted.
MCU-based ECU · AUTOSAR Classic
  • Flash bootloader · secure boot — Verifies candidate images, persists trial selection safely, and selects an allowed fallback after failed startup.
  • Microcontroller · HSM — Flash capacity, bank mapping and read-while-write restrictions determine whether A/B installation can run alongside the active application.
  • Application layer — Checks required functions after startup and keeps persistent application data compatible with permitted fallback releases.
  • Memory · crypto · WdgM — Stores update acceptance and recovery state persistently so interrupted activation does not leave ambiguous status.