X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tools%2Fdefault_image.c;h=e164c0c27d1a757e32e0c877d2abbfed787f3ca4;hb=7f44c7e281ef228d60625f5acdcbe68a847256bd;hp=4b7d1ed4a1a5247d72a1f73c65466c2daac486e9;hpb=70026345ed9131ef74b923f6b81196581235f127;p=oweals%2Fu-boot.git diff --git a/tools/default_image.c b/tools/default_image.c index 4b7d1ed4a1..e164c0c27d 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -15,10 +15,12 @@ #include "imagetool.h" #include "mkimage.h" +#include #include #include #include +#include static image_header_t header; @@ -106,7 +108,9 @@ static void image_set_header(void *ptr, struct stat *sbuf, int ifd, if (params->type == IH_TYPE_FIRMWARE_IVT) /* Add size of CSF minus IVT */ - imagesize = sbuf->st_size - sizeof(image_header_t) + 0x1FE0; + imagesize = sbuf->st_size - sizeof(image_header_t) + + 0x2060 - sizeof(flash_header_v2_t); + else imagesize = sbuf->st_size - sizeof(image_header_t);