]> git.baikalelectronics.ru Git - uboot.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)
commit60a955dd2354e6168ee6409e8a835052fe62446c
treec8e0f3c0b8cb3ca85591dee064a438fb157050df
parent1c2d3f61b59397c0e742806e579b95e705991a5d
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