]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Fix parsing SATA kwbimage
authorPali Rohár <pali@kernel.org>
Sat, 21 Jan 2023 12:45:36 +0000 (13:45 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commit017364c536ace031f4443855391d85d2cbe3f7af
tree8f8d16327944cf5afe5e15bb0a3291a08663404b
parentbae25b7961daff869ac28e34ac2ad5e7135ee2d1
tools: kwboot: Fix parsing 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.

To parse SATA kwbimage in the same way as Marvell BootROM, it is needed to
interpret srcaddr as relative offset to the main header. This change fixes
loading of SATA images via kwboot over UART.

Fixes: 90084caf87f8 ("tools: kwboot: Patch source address in image header")
Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwboot.c