[U-Boot] [PATCH 1/7] kwbimage: Align payload size to 4 bytes

Stefan Roese sr at denx.de
Thu Sep 3 15:08:54 CEST 2015


The MVEBU BootROM does not allow non word aligned payloads.

Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Luka Perkov <luka.perkov at sartura.hr>
---
 tools/kwbimage.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index 3fa90d3..886682d 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -775,6 +775,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.5.1



More information about the U-Boot mailing list