]> git.ipfire.org Git - thirdparty/u-boot.git/commit
tools: zynqmpimage: round up partition size
authorMichael Tretter <m.tretter@pengutronix.de>
Mon, 3 Dec 2018 15:37:53 +0000 (16:37 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 28 Jan 2019 07:36:34 +0000 (08:36 +0100)
commit4af5e44fc526837493d565c4dc2e910b0e2fcb4b
tree105525574ba3664bb3252407a6e783d60fc67d4c
parenteff2b14ffaf4aff5017e5ef6b1fd3f8133b86781
tools: zynqmpimage: round up partition size

The FSBL copies "Total Partition Word Length" * 4 bytes from the boot.bin,
which implies that the partition size is 4 byte aligned. When writing the
partition, mkimage calculates "Total Partition Word Length" by dividing
the size by 4. This implicitly cuts unaligned bytes at the end of the
added binary.

Instead of rounding down, the size must be round up to 4 bytes and the
binary padded accordingly.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tools/zynqmpbif.c