From: Stefano Babic Date: Fri, 13 Sep 2019 16:53:03 +0000 (+0200) Subject: Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets" X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=70026345ed9131ef74b923f6b81196581235f127;p=u-boot.git Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets" This reverts commit 62a52f3f85bf33e286632e99f0d39b2c166af0c4. --- diff --git a/common/image.c b/common/image.c index 9badb915f4..179eef0bd2 100644 --- a/common/image.c +++ b/common/image.c @@ -61,8 +61,6 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, #endif /* !USE_HOSTCC*/ #include -#include -#include #ifndef CONFIG_SYS_BARGSIZE #define CONFIG_SYS_BARGSIZE 512 @@ -380,9 +378,9 @@ void image_print_contents(const void *ptr) } } else if (image_check_type(hdr, IH_TYPE_FIRMWARE_IVT)) { printf("HAB Blocks: 0x%08x 0x0000 0x%08x\n", - image_get_load(hdr) - image_get_header_size(), - (int)(image_get_size(hdr) + image_get_header_size() - + sizeof(flash_header_v2_t) - CONFIG_CSF_SIZE)); + image_get_load(hdr) - image_get_header_size(), + image_get_size(hdr) + image_get_header_size() + - 0x1FE0); } } diff --git a/tools/default_image.c b/tools/default_image.c index 7a26232779..4b7d1ed4a1 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -19,8 +19,6 @@ #include #include #include -#include -#include static image_header_t header; @@ -108,8 +106,7 @@ 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) - + CONFIG_CSF_SIZE - sizeof(flash_header_v2_t); + imagesize = sbuf->st_size - sizeof(image_header_t) + 0x1FE0; else imagesize = sbuf->st_size - sizeof(image_header_t);