int images, ret;
int base_offset, hsize, align_len = ARCH_DMA_MINALIGN - 1;
int index = 0;
+ int firmware_node;
/*
* For FIT with external data, figure out where the external images
spl_fit_append_fdt(spl_image, info, sector, fit,
images, base_offset);
+ firmware_node = node;
/* Now check if there are more images for us to load */
for (; ; index++) {
uint8_t os_type = IH_OS_INVALID;
if (node < 0)
break;
+ /*
+ * if the firmware is also a loadable, skip it because
+ * it already has been loaded. This is typically the case with
+ * u-boot.img generated by mkimage.
+ */
+ if (firmware_node == node)
+ continue;
+
ret = spl_load_fit_image(info, sector, fit, base_offset, node,
&image_info);
if (ret < 0)