diff options
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 2 | ||||
-rw-r--r-- | common/image.c | 7 | ||||
-rw-r--r-- | tools/default_image.c | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index d44f74e474..f721eaf937 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -45,7 +45,7 @@ config SECURE_BOOT config CSF_SIZE hex "Maximum size for Command Sequence File (CSF) binary" - default 0x4000 + default 0x2060 help Define the maximum size for Command Sequence File (CSF) binary this information is used to define the image boot data. diff --git a/common/image.c b/common/image.c index 179eef0bd2..62ba6b3bfe 100644 --- a/common/image.c +++ b/common/image.c @@ -61,6 +61,7 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, #endif /* !USE_HOSTCC*/ #include <u-boot/crc.h> +#include <imximage.h> #ifndef CONFIG_SYS_BARGSIZE #define CONFIG_SYS_BARGSIZE 512 @@ -378,9 +379,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(), - image_get_size(hdr) + image_get_header_size() - - 0x1FE0); + image_get_load(hdr) - image_get_header_size(), + (int)(image_get_size(hdr) + image_get_header_size() + + sizeof(flash_header_v2_t) - 0x2060)); } } diff --git a/tools/default_image.c b/tools/default_image.c index 4b7d1ed4a1..f7990e28c0 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -19,6 +19,7 @@ #include <image.h> #include <tee/optee.h> #include <u-boot/crc.h> +#include <imximage.h> static image_header_t header; @@ -106,7 +107,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); |