mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
tools: imx8image: flatten container header only when creating container
If there is no CONTAINER entry, there is no need to flatten container header. Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -914,17 +914,19 @@ static int build_container(soc_type_t soc, uint32_t sector_size,
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: Image offset are not contained in the image */
|
if (container >= 0) {
|
||||||
tmp = flatten_container_header(&imx_header, container + 1, &size,
|
/* Note: Image offset are not contained in the image */
|
||||||
file_padding);
|
tmp = flatten_container_header(&imx_header, container + 1,
|
||||||
/* Write image header */
|
&size, file_padding);
|
||||||
if (write(ofd, tmp, size) != size) {
|
/* Write image header */
|
||||||
fprintf(stderr, "error writing image hdr\n");
|
if (write(ofd, tmp, size) != size) {
|
||||||
exit(EXIT_FAILURE);
|
fprintf(stderr, "error writing image hdr\n");
|
||||||
}
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Clean-up memory used by the headers */
|
/* Clean-up memory used by the headers */
|
||||||
free(tmp);
|
free(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* step through the image stack again this time copying
|
* step through the image stack again this time copying
|
||||||
|
Reference in New Issue
Block a user