Skip to content

Commit

Permalink
doc: mgmt: img_mgmt: Fix description of hash and sha
Browse files Browse the repository at this point in the history
Fixes an issue with the documentation whereby the wrong hash/sha
sections were described, also adds a link to upstream MCUboot
documentation for further information.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
  • Loading branch information
nordicjm authored and carlescufi committed Jan 17, 2023
1 parent 6425f0b commit 1d14e42
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions doc/services/device_mgmt/smp_groups/smp_group_1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,16 @@ where:
| "version" | string representing image version, as set with |
| | ``imgtool`` |
+-----------------------+---------------------------------------------------+
| "hash" | hash of an upload; this is used to identify |
| | an upload session, for example to allow mcumgr |
| | library to continue broken session. This must be |
| | a full sha256 of the whole image being uploaded, |
| | and is optionally used for image verification |
| "hash" | SHA256 hash of the image header and body. Note |
| | that this will not be the same as the SHA256 of |
| | the whole file, it is the field in the MCUboot |
| | TLV section that contains a hash of the data |
| | which is used for signature verification |
| | purposes. |
| | |
| | .. note:: |
| | See ``IMAGE_TLV_SHA256`` in the MCUboot image |
| | format documentation link below. |
+-----------------------+---------------------------------------------------+
| "bootable" | true if image has bootable flag set; |
| | this field does not have to be present if false |
Expand Down Expand Up @@ -189,6 +193,9 @@ where:
For more information on how does image/slots function, please refer to
the MCUBoot documentation
https://www.mcuboot.com/documentation/design/#image-slots
For information on MCUboot image format, please reset to the MCUboot
documentation https://docs.mcuboot.com/design.html#image-format


Set state of image request
==========================
Expand Down Expand Up @@ -280,10 +287,12 @@ where:
+-----------------------+---------------------------------------------------+
| "off" | offset of image chunk the request carries |
+-----------------------+---------------------------------------------------+
| "sha" | string identifying update session; it should only |
| | be present if "off" is zero; although name |
| | suggests it might be SHA, it can actually be any |
| | string |
| "sha" | SHA256 hash of an upload; this is used to |
| | identify an upload session, for example to allow |
| | MCUmgr to continue a broken session. This must be |
| | a full SHA256 of the whole image being uploaded, |
| | and is optionally used for image verification |
| | purposes. Should only be present if "off" is zero |
+-----------------------+---------------------------------------------------+
| "data" | optional image data |
+-----------------------+---------------------------------------------------+
Expand Down

0 comments on commit 1d14e42

Please sign in to comment.