From: Stefan Roese Date: Tue, 1 Sep 2015 11:46:35 +0000 (+0200) Subject: kwbimage: Align payload size to 4 bytes X-Git-Tag: v2016.01-rc1~301^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9b163d8c4e27137f4a51025f9cc52a132a697909;p=u-boot 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 --- 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) { /*