mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user