]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwbimage: Fix generating of kwbimage v0 header checksum
authorPali Rohár <pali@kernel.org>
Mon, 9 Jan 2023 00:35:13 +0000 (01:35 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commitb7267d3755380950540c473f86147b8a79aa20a1
treead547b5044069a79b3bb8e4b346489673409825e
parente85dc2ed6b309055f24cb04230b7f9b848d8128c
tools: kwbimage: Fix generating of kwbimage v0 header checksum

Checksum for v0 image must be generated after filling all fields in the
main header. Otherwise it would be invalid.

Exactly same problem for v1 images was already fixed in the past in commit
9916b58b7b81 ("tools: kwbimage: Fix checksum calculation for v1 images").

Fixes: 994f545998bf ("tools: kwbimage: Properly set srcaddr in kwbimage v0")
Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwbimage.c