]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwbimage: Simplify aligning and calculating checksum
authorPali Rohár <pali@kernel.org>
Fri, 23 Jul 2021 09:13:56 +0000 (11:13 +0200)
committerStefan Roese <sr@denx.de>
Sat, 31 Jul 2021 07:49:31 +0000 (09:49 +0200)
commit77bf89a1f0152d1536e76e9c4049f45e9254b856
tree5c990f43014f24707785a6e5e9a23c3378b1c3b6
parent797f765bb64d1c279ae27a8458efbffd73cd9b20
tools: kwbimage: Simplify aligning and calculating checksum

The return value of kwbimage_generate() is used for aligning the data
part of kwbimage. Use it for calculating proper 4 byte alignment as is
required by BootROM and also use it for allocating additional 4 bytes
for the 32-bit data checksum.

This simplifies the alignment code to be only at one place (in function
kwbimage_generate) and also simplifies setting checksum as it can be
directly updated in memory.

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>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
tools/kwbimage.c