]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: kwbimage: Refactor kwbimage header size determination
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:07:01 +0000 (23:07 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
commitfe2fd73d5557cc0bc6e671aa426ca1d53c4caee9
treec8e0f3c0b8cb3ca85591dee064a438fb157050df
parentacb0b38d6a2acd47cfef34ae002b3cd8be4fa16a
tools: kwbimage: Refactor kwbimage header size determination

Add functions kwbheader_size() and kwbheader_size_for_csum().

Refactor code determining header size to use these functions.

Refactor header checksum determining function.

Remove stuff that is not needed anymore.

This simplifies the code a little and fixes one instance of validating
header size meant for checksum instead of whole header size.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c
tools/kwbimage.h
tools/kwboot.c