Dual-Bank Over In-Place Delta: An ADR on Keeping ECUs Bootable When the Update Path Fails
This record decides one question: do ECUs on the next platform apply delta updates to an inactive flash bank, or do they patch the running image in place? We chose the inactive bank for every node that has to be able to roll back. We pay for that in flash on each one, and in return no failure, at any step, leaves an ECU without a verified, bootable image. The rejected option is cheaper and defensible, so we state it first, on its own terms.
The case for patching in place
In-place patching needs one image slot, a small recovery bootloader and a scratch area, and nothing more. Modern delta generators can be made in-place safe. They order copy operations so that no source block is overwritten before its last read. The bootloader then journals progress per 128 KiB erase sector, so after a power loss the patch resumes at the last committed sector instead of starting over. Uptane verification is unchanged, because the ECU still checks the reconstructed image against the hash and length in its Targets metadata before it marks the image bootable. On a platform full of low-end body and comfort controllers the saving is real. Our estimate is that dropping the second bank cuts the flash bill of materials on those nodes by roughly a third. It also removes bank-swap logic and the need to link images for two load addresses.
Where the rejected option breaks
The trouble is that the old image stops existing the moment the first sector is rewritten. The journal handles power loss well. It does nothing for the failure we actually fear: an image that passes cryptographic verification and then fails functionally, crashing in early init or losing its bus. The same goes for a delta base mismatch that only surfaces near the end of reconstruction. In both cases, recovering an in-place node means fetching a full previous image over the cellular link, through the Director repository, onto a primary ECU, and down the in-vehicle network to a bootloader. A dead modem, an unreachable backend or a primary that has rebooted is enough to leave that vehicle immobile, with four independent dependencies chained in series. With a second bank, the previous image stays on the ECU, already verified and already signed. A trial-boot counter in the bootloader reverts to it with no network, no backend and no other ECU involved. The UNECE regulations on cyber security and software update management expect the manufacturer to show the vehicle stays safe when an update fails. A local revert makes that argument hold for each ECU on its own. The in-place design forces us to argue it across the whole chain.
The rule we apply ECU by ECU is this: if a node cannot get back to a previously verified image without any network or other ECU taking part, it gets a second bank, and in-place patching is allowed only on nodes whose failure leaves the vehicle drivable and whose full prior image the primary already holds locally.
What would have flipped the decision
The answer changes if the primary ECU had guaranteed, independently powered storage holding the full prior image of every in-place node, plus a reflash window bounded to periods when the vehicle is parked anyway. Recovery would then stay inside the vehicle, and the cellular link and backend would drop out of the failure path. We do not have that today. The gateway's storage is shared with logging and map data, and nothing contractually reserves it. The chosen option has its own costs. Every delta now has to target whichever bank is inactive, so the Director must know which image sits in which bank on each ECU. Uptane's version manifests make that tractable, but they also make the Director's inventory a dependency for building deltas, though not for rollback. Our second estimate is that around a fifth of our ECU variants fall under the exemption. That makes the next decision whether to reserve gateway storage for their full images, or to accept that a bad update on those nodes means a workshop visit.
Technical FAQ: Does Uptane itself require a dual-bank layout?
No. Uptane specifies how metadata and images are verified and is deliberately agnostic about how an ECU installs them. Its guarantees cover what reaches the ECU and whether it is authentic, not whether the ECU can recover from an authentic image that turns out to be bad. Recovery is exactly the gap this decision covers.