From: Chris Packham Date: Sun, 22 Feb 2015 22:25:20 +0000 (+1300) Subject: kwbimage: align v1 binary header to 4B X-Git-Tag: v2015.04-rc4~62^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c250ce0f570d89ef579827f8a2d98d1cbc4f1c2a;p=u-boot kwbimage: align v1 binary header to 4B According to the Armada-XP documentation the binary header format requires the header length to be aligned to 4B. Signed-off-by: Chris Packham Acked-by: Stefan Roese Acked-by: Prafulla Wadaskar --- diff --git a/tools/kwbimage.c b/tools/kwbimage.c index de5c80847e..9540e7eb84 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -498,6 +498,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, binhdrsz = sizeof(struct opt_hdr_v1) + (binarye->binary.nargs + 1) * sizeof(unsigned int) + s.st_size; + binhdrsz = ALIGN_SUP(binhdrsz, 32); hdr->headersz_lsb = binhdrsz & 0xFFFF; hdr->headersz_msb = (binhdrsz & 0xFFFF0000) >> 16;