Skip to content
Snippets Groups Projects
Commit 03ea24b2 authored by Ye.Li's avatar Ye.Li Committed by Stefano Babic
Browse files

imximage: Fix imximage IVT bug for EIM-NOR boot


The load region size of EIM-NOR are defined to 0. For this case,
the parameter "imximage_init_loadsize" must be calculated.
The imximage tool implements the calculation in the "imximage_generate"
function, but the following function "imximage_set_header" resets the value
and not calculate. This bug cause some fields of IVT head are not
correct, for example the boot_data and DCD overlay the application area.

Signed-off-by: default avatarYe.Li <B37916@freescale.com>
parent 4aa7ac30
No related branches found
No related tags found
No related merge requests found
...@@ -568,6 +568,13 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd, ...@@ -568,6 +568,13 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
/* Parse dcd configuration file */ /* Parse dcd configuration file */
dcd_len = parse_cfg_file(imxhdr, params->imagename); 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 the imx header */
(*set_imx_hdr)(imxhdr, dcd_len, params->ep, imximage_ivt_offset); (*set_imx_hdr)(imxhdr, dcd_len, params->ep, imximage_ivt_offset);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment