Skip to content
Snippets Groups Projects
Commit 348ca8ef authored by Troy Kisky's avatar Troy Kisky Committed by Stefano Babic
Browse files

imximage: fix size of image to load.


sbuf->st_size already includes sizeof(struct imx_header),
so remove extra addition.

Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
parent 8d8cc828
No related branches found
No related tags found
No related merge requests found
...@@ -221,8 +221,7 @@ static void set_imx_hdr_v1(struct imx_header *imxhdr, uint32_t dcd_len, ...@@ -221,8 +221,7 @@ static void set_imx_hdr_v1(struct imx_header *imxhdr, uint32_t dcd_len,
/* The external flash header must be at the end of the DCD table */ /* The external flash header must be at the end of the DCD table */
dcd_v1->addr_data[dcd_len].type = sbuf->st_size + dcd_v1->addr_data[dcd_len].type = sbuf->st_size +
imxhdr->flash_offset + imxhdr->flash_offset;
sizeof(struct imx_header);
/* Security feature are not supported */ /* Security feature are not supported */
fhdr_v1->app_code_csf = 0; fhdr_v1->app_code_csf = 0;
...@@ -253,8 +252,7 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len, ...@@ -253,8 +252,7 @@ static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len,
hdr_v2->boot_data.start = fhdr_v2->self - imxhdr->flash_offset; hdr_v2->boot_data.start = fhdr_v2->self - imxhdr->flash_offset;
hdr_v2->boot_data.size = sbuf->st_size + hdr_v2->boot_data.size = sbuf->st_size +
imxhdr->flash_offset + imxhdr->flash_offset;
sizeof(struct imx_header);
/* Security feature are not supported */ /* Security feature are not supported */
fhdr_v2->csf = 0; fhdr_v2->csf = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment