mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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>
This commit is contained in:
parent
9cab87f184
commit
c7b871111b
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue