All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] tools: imx8mimage: not abort when mmap fail
@ 2021-08-16  3:48 Peng Fan (OSS)
  2021-08-16  3:48 ` [PATCH 2/7] imx: imx8mq_evk: switch to binman Peng Fan (OSS)
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Peng Fan (OSS) @ 2021-08-16  3:48 UTC (permalink / raw)
  To: sbabic, festevam; +Cc: u-boot, uboot-imx, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

When creating flash.bin, the hdmi firmware might not be
copied to U-Boot source tree. Then mkimage will fail.
However we are switching to binman, binman will show the
message if the file not there, and create empty file per
i.MX8MQ binman node. So we not fail mkimage here othersize
CI will fail if hdmi firmware not copied here.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 tools/imx8mimage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c
index 11e40ccd94..4eed683396 100644
--- a/tools/imx8mimage.c
+++ b/tools/imx8mimage.c
@@ -271,7 +271,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset,
 	if (ptr == MAP_FAILED) {
 		fprintf(stderr, "Can't read %s: %s\n",
 			datafile, strerror(errno));
-		exit(EXIT_FAILURE);
+		goto err_mmap;
 	}
 
 	size = sbuf.st_size - datafile_offset;
@@ -311,6 +311,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset,
 	}
 
 	munmap((void *)ptr, sbuf.st_size);
+err_mmap:
 	close(dfd);
 }
 
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-20 12:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16  3:48 [PATCH 1/7] tools: imx8mimage: not abort when mmap fail Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 2/7] imx: imx8mq_evk: switch to binman Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 3/7] imx: imx8mq_phanbell: " Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 4/7] imx: pico-imx8mq: switch to use binman Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 5/7] imx: makefile: drop the use of imx8mimage.sh Peng Fan (OSS)
2021-08-19 10:32   ` Frieder Schrempf
2021-08-20 13:45     ` Marcel Ziswiler
2021-10-20 12:20   ` sbabic
2021-08-16  3:48 ` [PATCH 6/7] imx: imx8mq use common imximage.cfg Peng Fan (OSS)
2021-08-16  3:48 ` [PATCH 7/7] doc: imx8mq_evk: update doc after using binman Peng Fan (OSS)
2021-10-20 12:20 ` [PATCH 1/7] tools: imx8mimage: not abort when mmap fail sbabic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.