aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2021-08-16 11:48:41 +0800
committerStefano Babic <sbabic@denx.de>2021-10-07 17:45:00 +0200
commitc7b871111b59a6840f617ae0003b8f66b4f7cf37 (patch)
tree5db5daebecd3e2ff915cd26686027d50ef40cd43
parent9cab87f184bc7689fba1c856c3c8af0c7b4566ed (diff)
downloadu-boot-c7b871111b59a6840f617ae0003b8f66b4f7cf37.zip
u-boot-c7b871111b59a6840f617ae0003b8f66b4f7cf37.tar.gz
u-boot-c7b871111b59a6840f617ae0003b8f66b4f7cf37.tar.bz2
tools: imx8mimage: not abort when mmap fail
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>
-rw-r--r--tools/imx8mimage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c
index 11e40cc..4eed683 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);
}