summaryrefslogtreecommitdiff
path: root/lib/string.c
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-09-24 23:07:03 +0200
committerStefan Roese <sr@denx.de>2021-10-01 11:07:13 +0200
commit04ced0296e66ff0fbeafbbf2e94d2441237f49c8 (patch)
treef9ce26ee309bb4579618536c2cfa0e080eef9f91 /lib/string.c
parent8010f4ffc5832abba3090fc9b619701eb04deba3 (diff)
tools: kwboot: Round up header size to 128 B when patching
The beginning of image data must be sent in a separate xmodem block; the block must not contain end of header with the beginning of data. Therefore we need to ensure that the image header size is a multiple of xmodem block size (which is 128 B). Read the file into a malloc()ed buffer of enough size instead of mmap()ing it. (If we are going to move the data, most of the pages will be dirty anyway.) Then move the payload if header size needs to be increased. Signed-off-by: Pali Rohár <pali@kernel.org> [ refactored ] Signed-off-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions