summaryrefslogtreecommitdiff
path: root/tools/imximage.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/imximage.c')
-rw-r--r--tools/imximage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/imximage.c b/tools/imximage.c
index 18dc051..faba238 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -568,6 +568,13 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
/* Parse dcd configuration file */
dcd_len = parse_cfg_file(imxhdr, params->imagename);
+ if (imximage_version == IMXIMAGE_V2) {
+ if (imximage_init_loadsize < imximage_ivt_offset +
+ sizeof(imx_header_v2_t))
+ imximage_init_loadsize = imximage_ivt_offset +
+ sizeof(imx_header_v2_t);
+ }
+
/* Set the imx header */
(*set_imx_hdr)(imxhdr, dcd_len, params->ep, imximage_ivt_offset);