+ time = imagetool_get_source_date(params, sbuf->st_mtime);
+ ep = params->ep;
+ addr = params->addr;
+
+ if (params->type == IH_TYPE_FIRMWARE_IVT)
+ /* Add size of CSF minus IVT */
+ imagesize = sbuf->st_size - sizeof(image_header_t) + 0x1FE0;
+ else
+ imagesize = sbuf->st_size - sizeof(image_header_t);
+
+ if (params->os == IH_OS_TEE) {
+ addr = optee_image_get_load_addr(hdr);
+ ep = optee_image_get_entry_point(hdr);
+ }
+