add boot_get_loadables() to load listed images

Added a trimmed down instance of boot_get_<thing>() to satisfy the
minimum requierments of the added feature.  The function follows the
normal patterns set by other boot_get<thing>'s, which should make it a
bit easier to combine them all together into one boot_get_image()
function in a later refactor.

Documentation for the new function can be found in source:
  include/image.h

Signed-off-by: Karl Apsite <Karl.Apsite@dornerworks.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/common/bootm.c b/common/bootm.c
index 6842029..07ae0f5 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -240,6 +240,23 @@
 }
 #endif
 
+#if defined(CONFIG_FIT)
+static int bootm_find_loadables(int flag, int argc, char * const argv[])
+{
+	int ret;
+
+	/* find all of the loadables */
+	ret = boot_get_loadable(argc, argv, &images, IH_ARCH_DEFAULT,
+			       NULL, NULL);
+	if (ret) {
+		printf("Loadable(s) is corrupt or invalid\n");
+		return 1;
+	}
+
+	return 0;
+}
+#endif
+
 int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[])
 {
 	if (bootm_find_ramdisk(flag, argc, argv))
@@ -250,6 +267,11 @@
 		return 1;
 #endif
 
+#if defined(CONFIG_FIT)
+	if (bootm_find_loadables(flag, argc, argv))
+		return 1;
+#endif
+
 	return 0;
 }