]> git.baikalelectronics.ru Git - uboot.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>
Thu, 24 Jan 2019 09:03:42 +0000 (10:03 +0100)
commit21df0ef2939b7cd764a8a73cb9cfb797325c656e
tree5ac4e266203f224a2bcdc28c33eefb43ba25f77f
parent8ee2812c1801096a8d3253778a8bd1dbb3c4a0a3
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