mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-28 22:21:49 +01:00
tools: kwboot: Fix inserting UART data checksum without -B option
Commit 7665ed2fa04e ("tools: kwboot: Fix parsing UART image without data
checksum") added fixup code to insert place for data checksum if UART image
does not have it. Together with option -B (change baudrate), kwboot
calculates this checksum. Without option -B, it inserts only place for
checksum but does not calculate it.
This commit fix above logic and calculate data checksum also when kwboot is
used without -B option.
Fixes: 7665ed2fa04e ("tools: kwboot: Fix parsing UART image without data checksum")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
848d9a5eaa
commit
2b7852c2aa
@ -2079,6 +2079,8 @@ kwboot_img_patch(void *img, size_t *size, int baudrate)
|
||||
goto err;
|
||||
}
|
||||
kwboot_img_grow_data_right(img, size, sizeof(uint32_t));
|
||||
/* Update the 32-bit data checksum */
|
||||
*kwboot_img_csum32_ptr(img) = kwboot_img_csum32(img);
|
||||
}
|
||||
|
||||
if (!kwboot_img_has_ddr_init(img) &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user