- if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) {
- puts ("\n** Bad Header Checksum **\n");
- SHOW_BOOT_PROGRESS (-50);
+ cnt = image_get_image_size (hdr);
+ break;
+#if defined(CONFIG_FIT)
+ case IMAGE_FORMAT_FIT:
+ fit_hdr = (const void *)addr;
+ if (!fit_check_format (fit_hdr)) {
+ show_boot_progress (-140);
+ puts ("** Bad FIT image format\n");
+ return 1;
+ }
+ show_boot_progress (141);
+ puts ("Fit image detected...\n");
+
+ cnt = fit_get_size (fit_hdr);
+ break;
+#endif
+ default:
+ show_boot_progress (-49);
+ puts ("** Unknown image type\n");