From: Chris Packham Date: Mon, 23 Feb 2015 11:25:20 +1300 Subject: [U-Boot] [RFC PATCH v1] kwbimage: Align v1 binary header to 4B In-Reply-To: <1424643920-2237-1-git-send-email-judge.packham@gmail.com> References: <1424643920-2237-1-git-send-email-judge.packham@gmail.com> Message-ID: <1424643920-2237-2-git-send-email-judge.packham@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de According to the Armada-XP documentation the binary header format requires the header length to be aligned to 4B. Signed-off-by: Chris Packham --- tools/kwbimage.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index de5c808..9540e7e 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; -- 2.2.0.rc0