浏览代码

kwbimage: Align payload size to 4 bytes

The MVEBU BootROM does not allow non word aligned payloads.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Stefan Roese 9 年之前
父节点
当前提交
9b163d8c4e
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      tools/kwbimage.c

+ 3 - 0
tools/kwbimage.c

@@ -681,6 +681,9 @@ static void kwbimage_set_header(void *ptr, struct stat *sbuf, int ifd,
 		exit(EXIT_FAILURE);
 		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();
 	version = image_get_version();
 	switch (version) {
 	switch (version) {
 		/*
 		/*