[new uImage] Fix autoscr command used with new uImage format
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
index 5163d57..1a37b90 100644
--- a/common/cmd_autoscript.c
+++ b/common/cmd_autoscript.c
@@ -100,6 +100,13 @@
puts ("Empty Script\n");
return 1;
}
+
+ /*
+ * scripts are just multi-image files with one component, seek
+ * past the zero-terminated sequence of image lengths to get
+ * to the actual image data
+ */
+ while (*data++);
break;
#if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
@@ -155,8 +162,6 @@
return 1;
}
- while (*data++);
-
/* make sure cmd is null terminated */
memmove (cmd, (char *)data, len);
*(cmd + len) = 0;