summaryrefslogtreecommitdiff
path: root/common/bootm.c
diff options
context:
space:
mode:
authorKarl Apsite <karl.apsite@dornerworks.com>2015-05-21 09:52:48 -0400
committerTom Rini <trini@konsulko.com>2015-05-28 08:18:20 -0400
commit84a07dbfd8e916788d685a4227f9a4e770375ffd (patch)
tree544aa02e596f6125acf9e9745dc6c3ab43c76a62 /common/bootm.c
parentecf8cd653530acb0ed8217a1d80c93841ec2005e (diff)
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>
Diffstat (limited to 'common/bootm.c')
-rw-r--r--common/bootm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 6842029dfb4..07ae0f56ee6 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -240,6 +240,23 @@ static int bootm_find_fdt(int flag, int argc, char * const argv[])
}
#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 @@ int bootm_find_ramdisk_fdt(int flag, int argc, char * const argv[])
return 1;
#endif
+#if defined(CONFIG_FIT)
+ if (bootm_find_loadables(flag, argc, argv))
+ return 1;
+#endif
+
return 0;
}