tools: kwboot: Fix parsing SDIO kwbimage
authorPali Rohár <pali@kernel.org>
Sun, 8 Jan 2023 12:20:20 +0000 (13:20 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commit8562a1c6a4572550f752d4deca95d9efdd9b5265
tree4cdde6d7fe7fe935c3e196b97f744f32ed24b061
parent14b866e6d650645881cac041db64f67158ced24e
tools: kwboot: Fix parsing SDIO kwbimage

Despite the official specification, Marvell BootROM does not interpret
srcaddr from SDIO image as offset in number of sectors (like for SATA
image), but as offset in bytes (like for all other images except SATA).

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

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