diff mbox series

[meta-swupdate] README: Update Image Hashing section

Message ID 20210927183626.10508-1-colin.mcallister@garmin.com
State Changes Requested
Headers show
Series [meta-swupdate] README: Update Image Hashing section | expand

Commit Message

McAllister, Colin Sept. 27, 2021, 6:36 p.m. UTC
Image hashing section was moved after auto versions as the section now
describes using hashes for the sha256 field as well as the versions
field.  Additional information about using the hash for the version was
added as well.

Signed-off-by: Colin McAllister <colin.mcallister@garmin.com>
---
 README | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/README b/README
index 99e7d72..094c75e 100644
--- a/README
+++ b/README
@@ -19,12 +19,6 @@  To insert the values of BitBake variables into the update file, pre- and postfix
 the names with "@@". For example, to automatically set the version tag, use the
 line `version = "@@DISTRO_VERSION@@";` in your sw-description file.
 
-Image hashing
--------------
-
-During creation of the update file, occurrences of @IMAGE (where IMAGE is an
-image filename) are replaced with the sha256 hash of the image.
-
 BitBake auto versions
 ---------------------
 
@@ -43,6 +37,25 @@  To insert the value of a variable from BitBake's package-data-file different to
 or
 `@SWU_AUTO_VERSION:<package-name>@<package-data-variable>`
 
+Image hashing
+-------------
+
+During creation of the update file, occurrences of @IMAGE (where IMAGE is an
+image filename) are replaced with the sha256 hash of the image.
+
+The sha256 hash of an image is used with the sha256 key associated with an image
+to verify that the image contained in the archive was not corrupted.
+
+Additionally, the sha256 hash placeholder can be used in place of the version.
+This allows for an image to be installed only if the current image's hash does
+not match the hash of the image contained within the update.
+
+NOTE: Reproducable builds are not guaranteed with Yocto and an image's checksum
+may differ between builds even if no changes were made.
+
+The sha256 placeholder can be used as the value for both the sha256 and the
+version keys.
+
 SWU image signing
 -----------------