]> git.sur5r.net Git - u-boot/commitdiff
imximage: fix size of image to load.
authorTroy Kisky <troy.kisky@boundarydevices.com>
Wed, 3 Oct 2012 15:47:06 +0000 (15:47 +0000)
committerStefano Babic <sbabic@denx.de>
Sat, 20 Oct 2012 15:13:01 +0000 (17:13 +0200)
sbuf->st_size already includes sizeof(struct imx_header),
so remove extra addition.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
tools/imximage.c

index 3e9ee6ac5d20759f8270e884c690381ee6544e9a..7dbf36cf4f5e05dec28316894a5ec7bd3e58fe2f 100644 (file)
@@ -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 */
        dcd_v1->addr_data[dcd_len].type = sbuf->st_size +
-                               imxhdr->flash_offset +
-                               sizeof(struct imx_header);
+                               imxhdr->flash_offset;
 
        /* Security feature are not supported */
        fhdr_v1->app_code_csf = 0;
@@ -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.size = sbuf->st_size +
-                       imxhdr->flash_offset +
-                       sizeof(struct imx_header);
+                       imxhdr->flash_offset;
 
        /* Security feature are not supported */
        fhdr_v2->csf = 0;