Skip to content

Commit c83ebbd

Browse files
committedOct 3, 2020
Enable delta update support
This adds the information needed to the fwup.conf to support delta updates. This is only one piece of delta update support. NervesHub can automatically generate and distribute delta updates so long as it has a copy of a device's firmware (a source firmware image) and the device is running a version of fwup (1.6.0 or later; this is in nerves_system_br 1.11.2/May 2020 and later) that supports delta updates.
1 parent 718e588 commit c83ebbd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎fwup.conf

+10-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ task upgrade.a {
224224
# commit them. That way if the user aborts midway, we
225225
# still are using the original firmware.
226226
on-resource zImage { fat_write(${BOOT_PART_OFFSET}, "zImage.a") }
227-
on-resource rootfs.img { raw_write(${ROOTFS_A_PART_OFFSET}) }
227+
on-resource rootfs.img {
228+
delta-source-raw-offset=${ROOTFS_B_PART_OFFSET}
229+
delta-source-raw-count=${ROOTFS_B_PART_COUNT}
230+
raw_write(${ROOTFS_A_PART_OFFSET})
231+
}
228232

229233
on-finish {
230234
# Update firmware metadata
@@ -275,7 +279,11 @@ task upgrade.b {
275279
}
276280

277281
on-resource zImage { fat_write(${BOOT_PART_OFFSET}, "zImage.b") }
278-
on-resource rootfs.img { raw_write(${ROOTFS_B_PART_OFFSET}) }
282+
on-resource rootfs.img {
283+
delta-source-raw-offset=${ROOTFS_A_PART_OFFSET}
284+
delta-source-raw-count=${ROOTFS_A_PART_COUNT}
285+
raw_write(${ROOTFS_B_PART_OFFSET})
286+
}
279287

280288
on-finish {
281289
# Update firmware metadata

0 commit comments

Comments
 (0)