]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: kwbimage: Fix generating, verifying and extracting SATA kwbimage
authorPali Rohár <pali@kernel.org>
Sat, 21 Jan 2023 12:34:55 +0000 (13:34 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commit954c94aaccf825d0142b3a36ff65f46721f4c733
tree2a1c5054ba9524822329afc8276eb734828eef7b
parenteb2c8f3805082955a95485911962b2baa8ab54ce
tools: kwbimage: Fix generating, verifying and extracting SATA kwbimage

Despite the official specification, Marvell BootROM does not interpret
srcaddr from SATA image as number of sectors the beginning of the hard
drive, but as number of sectors relative to the main header.

The main header is stored at absolute sector number 1. So do not add or
subtract it when calculating with relative offsets to the main header.

Fixes: 501a54a29cc2 ("tools: kwbimage: Fix generation of SATA, SDIO and PCIe images")
Fixes: 5c61710c9880 ("tools: kwbimage: Properly set srcaddr in kwbimage v0")
Fixes: e0c243c398a7 ("tools: kwbimage: Validate data checksum of v1 images")
Fixes: aa6943ca3122 ("kwbimage: Add support for extracting images via dumpimage tool")
Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwbimage.c