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:
- Build system compares base version (currently deployed) with target version (new release)
- Generates rdiff binary patches for changed partitions
- Packages patches into signed
.swuarchive - 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:
Artifacts stored at:
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:
Step 3: Generate Delta Package¶
Generate delta between versions:
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*.swufiles are copied; setARTIFACTS_PATTERNSin 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