Table of Contents

CIP Software updates architecture

This document describes the requirements and a non-detailed architecture for CIP software updates

Requirements

These requirements were extracted from a survey conducted among CIP members and by investigating popular update software.

[*] means “essential requirements”

  1. Functionality requirements
    1. Ability to update the kernel, rootfs, and applications [*]
    2. Ability to update the bootloader
    3. Easy to customize the update steps [*]
    4. Whitelist: update only these files/folders
    5. Blacklist: update everything except these files/folders
  2. Portability requirements
    1. Independent of the image build system [*]
    2. Independent of the underlying filesystems [*]
    3. Minimize client program dependencies [*]
    4. Provide an interface to interact with bootloaders [*]
  3. Update media requirements
    1. Ability to update from a network server [*]
    2. Ability to update from local media: USB, microSD, LAN [*]
  4. Resource requirements
    1. Minimize network bandwidth usage [*]
    2. Minimize storage overhead on the client [*]
    3. Keep downtime below a few minutes [*]
    4. Minimize CPU utilization peaks
    5. Minimize storage costs on the server [*]
  5. Security requirements
    1. Signed updates (authentication, integrity) [*]
    2. Encrypted communication [*]
    3. Ability to run on OP-TEE
    4. Ability to update encrypted filesystems
    5. Ability to update block devices using dm-verity
    6. Device authentication
  6. Fail-safety requirements
    1. Reliable against power loss (atomic updates) [*]
    2. Ability to roll back to a previous working image [*]
    3. Ability to do a factory reset (rollback to initial version)
    4. Ability to wipe a partition (only clear data)
  7. Network server requirements
    1. Ability to search and get information from devices
    2. Ability to see the update status [*]
    3. Ability to select what devices to update
    4. Ability to scale to millions of devices

Non-detailed architecture

The architecture is composed of multiple components that work together to implement the updating system. The build tool is used to create the operating system image, and it may also provide information about the way the system is partitioned and the filesystem format. The server is in charge of storing different versions of the operating system images for each device, and delivering those images to the devices in an efficient and secure way. The client is in charge of applying updates and interact with the bootloader and the server. We will use a typical A/B update architecture because it is stable, fail*safe, and has support on most available tools. Below we show the main roles realized by each component and possible open*source candidates to satisfy them.