From 9b163d8c4e27137f4a51025f9cc52a132a697909 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 1 Sep 2015 13:46:35 +0200 Subject: [PATCH] kwbimage: Align payload size to 4 bytes The MVEBU BootROM does not allow non word aligned payloads. Signed-off-by: Stefan Roese Cc: Luka Perkov --- tools/kwbimage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/kwbimage.c b/tools/kwbimage.c index 5e62d08a80..d33f1b6974 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -681,6 +681,9 @@ static void kwbimage_set_header(void *ptr, struct stat *sbuf, int ifd, exit(EXIT_FAILURE); } + /* The MVEBU BootROM does not allow non word aligned payloads */ + sbuf->st_size = ALIGN_SUP(sbuf->st_size, 4); + version = image_get_version(); switch (version) { /* -- 2.39.5