]> git.baikalelectronics.ru Git - uboot.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)
commitbae25b7961daff869ac28e34ac2ad5e7135ee2d1
tree2a1c5054ba9524822329afc8276eb734828eef7b
parent3f83e69c34e46cfa9d70a89aef607ba8ff9c448a
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: 524291a06058 ("tools: kwbimage: Fix generation of SATA, SDIO and PCIe images")
Fixes: 994f545998bf ("tools: kwbimage: Properly set srcaddr in kwbimage v0")
Fixes: 727cc2256b87 ("tools: kwbimage: Validate data checksum of v1 images")
Fixes: cd7773ade104 ("kwbimage: Add support for extracting images via dumpimage tool")
Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwbimage.c