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: NPali Rohár <pali@kernel.org> Reviewed-by: NMarek Behún <marek.behun@nic.cz> Reviewed-by: NStefan Roese <sr@denx.de> Reviewed-by: NChris Packham <judge.packham@gmail.com> Tested-by: NChris Packham <judge.packham@gmail.com>
Showing
想要评论请 注册 或 登录