Skip to content

Delta Update Generation

Generating incremental (rdiff-based) update packages that contain only binary differences between versions.


Table of Contents


Overview

Delta updates reduce bandwidth and build time by packaging only the binary differences between two versions rather than complete images.

How it works:

  1. Build system compares base version (currently deployed) with target version (new release)
  2. Generates rdiff binary patches for changed partitions
  3. Packages patches into signed .swu archive
  4. Device applies patches to reconstruct new images from existing ones

Workflow

Step 1: Build Base Version

Build and preserve artifacts for the base version. Edit BUILD_VERSION in your kas configuration file before building:

local_conf_header:
  buildinfo: |-
    BUILD_VERSION = "0.1.0"
kas build kas/tolomeo-qemux86-64_tolomeo-prod_image-prod.yml

Artifacts stored at:

artifacts/tolomeo-qemux86-64/image-prod/0.1.0/

Critical: Base version artifacts must be preserved for future delta generation.


Step 2: Build Target Version

Update BUILD_VERSION in the kas configuration file to the new version, then build:

local_conf_header:
  buildinfo: |-
    BUILD_VERSION = "0.2.0"
kas build kas/tolomeo-qemux86-64_tolomeo-prod_image-prod.yml

Step 3: Generate Delta Package

Generate delta between versions:

VERSION_FROM=0.1.0 VERSION_TO=0.2.0 kas build kas/tolomeo-qemux86-64_imgen-update-delta.yml

Result:

artifacts/tolomeo-qemux86-64/image-prod/0.2.0/updates/from_0.1.0/
├── build-info.txt
├── delta-info.json
├── delta-update-0.1.0-to-0.2.0.swu
├── rootfs.delta
├── rootfs.delta.gz
└── rootfs.signature

Note: Artifact collection is handled by artifacts_collector_delta. By default only *.swu files are copied; set ARTIFACTS_PATTERNS in the delta recipe to include additional files. See Build Artifact Collection.


Important Considerations

Artifact Preservation

  • Always retain previous version artifacts for delta generation
  • Delta updates require both source and target artifacts to be available
  • Missing base artifacts = impossible to generate delta

Version Consistency

  • Both versions must use:
  • Same Yocto configuration
  • Same machine target
  • Compatible partition layouts

Partition Requirements

  • Partitions receiving delta updates must be read-only
  • Any modification to base partition will break delta application
  • This is enforced by A/B update strategy