- printf("Checking imxheader at 0x%08x\n", f_sdp->jmp_address);
- status = sdp_jump_imxheader((void *)f_sdp->jmp_address);
+ printf("Jumping to header at 0x%08x\n", sdp_func->jmp_address);
+ status = sdp_jump_imxheader(sdp_ptr(sdp_func->jmp_address));
+
+ /* If imx header fails, try some U-Boot specific headers */
+ if (status) {
+#ifdef CONFIG_SPL_BUILD
+ /* In SPL, allow jumps to U-Boot images */
+ struct spl_image_info spl_image = {};
+ spl_parse_image_header(&spl_image,
+ (struct image_header *)sdp_func->jmp_address);
+ jump_to_image_no_args(&spl_image);
+#else
+ /* In U-Boot, allow jumps to scripts */
+ source(sdp_func->jmp_address, "script@1");
+#endif
+ }