tools: kwboot: Fix patching of SPI/NOR XIP images
authorPali Rohár <pali@kernel.org>
Sat, 21 Jan 2023 11:59:20 +0000 (12:59 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commit7bfc15efa78483ccdf6254154b8145c4d3e49454
treee25d57068b87b0d2eafeea83adbbe8c86fcf20bb
parenta190667b111bd2731a8cef173c0e84e14fb14218
tools: kwboot: Fix patching of SPI/NOR XIP images

Marvell BootROM interprets execaddr of SPI/NOR XIP images as relative byte
offset from the from the beginning of the flash device. So if data image
offset and execute offset are not same then it is needed to adjust them
also in DDR RAM.

Fixes: f2c644e0b8bc ("tools: kwboot: Patch destination address to DDR area for SPI image")
Signed-off-by: Pali Rohár <pali@kernel.org>
tools/kwboot.c