mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 23:51:33 +00:00
tools: kwboot: Reserve enough space for patching kwbimage in memory
SPI image header and data parts do not have to be aligned to 128 byte xmodem block size. So reserve additional memory for aligning header part and additional memory for aligning data part. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
2ecca3d0d7
commit
5923ef686a
1 changed files with 3 additions and 1 deletions
|
@ -1672,8 +1672,10 @@ main(int argc, char **argv)
|
|||
else
|
||||
/* ensure we have enough space for baudrate change code */
|
||||
after_img_rsv += KWBOOT_BAUDRATE_BIN_HEADER_SZ +
|
||||
KWBOOT_XM_BLKSZ +
|
||||
sizeof(kwboot_pre_baud_code) +
|
||||
sizeof(kwboot_baud_code);
|
||||
sizeof(kwboot_baud_code) +
|
||||
KWBOOT_XM_BLKSZ;
|
||||
|
||||
if (imgpath) {
|
||||
img = kwboot_read_image(imgpath, &size, after_img_rsv);
|
||||
|
|
Loading…
Reference in a new issue