Generate a Delta Update¶
This guide covers generating incremental (rdiff-based) update packages that contain only binary differences between versions.
Prerequisites¶
- Signing keys already generated and configured; see Generate a Signed Update Package
- The artifacts of the base version, preserved: a delta needs both the source and the target artifacts
- Both versions built with the same Yocto configuration, the same machine target and compatible partition layouts
- Read-only partitions on the device for the ones receiving delta updates: any modification of the base partition breaks delta application, and the A/B update strategy enforces this
Step 1 — Build the base version¶
Set BUILD_VERSION in the buildinfo block of your kas configuration file before building:
local_conf_header:
buildinfo: |-
FIRMWARE_NAME = "TVD-embedded-firmware"
BUILD_VERSION = "0.1.0"
SECURITY_PATCH_LEVEL = "26.09"
The artifacts are stored at:
Warning
Preserve the base version artifacts: the delta package cannot be generated without them.
Step 2 — Build the target version¶
Set BUILD_VERSION in the kas configuration file to the new version, then build:
local_conf_header:
buildinfo: |-
FIRMWARE_NAME = "TVD-embedded-firmware"
BUILD_VERSION = "0.2.0"
SECURITY_PATCH_LEVEL = "26.09"
Step 3 — Generate the delta package¶
Generate the delta between the two versions:
The package is collected under:
artifacts/tolomeo-qemux86-64/image-prod/0.2.0/updates/from_0.1.0/
├── build-info.txt
└── imgen-update-delta-tolomeo-qemux86-64.rootfs.swu
Note
The artifacts_collector_delta class copies the files that ARTIFACTS_PATTERNS selects; the delta recipe selects
only the .swu package. See Artifacts Collection.
See also
- Generate a Signed Update Package — the full package a delta derives from
- Update Mechanism — SWUpdate configuration and image formats
- Artifacts Collection — where delta artifacts are collected