summaryrefslogtreecommitdiffstats
path: root/common/image-fit.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/image-fit.c
parentecf8cd653530acb0ed8217a1d80c93841ec2005e (diff)
downloadblackbird-obmc-uboot-84a07dbfd8e916788d685a4227f9a4e770375ffd.tar.gz
blackbird-obmc-uboot-84a07dbfd8e916788d685a4227f9a4e770375ffd.zip
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/image-fit.c')
-rw-r--r--common/image-fit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/common/image-fit.c b/common/image-fit.c
index fc9ea1f1b2..4bd8feaf3b 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1544,6 +1544,8 @@ static const char *fit_get_image_type_property(int type)
return FIT_RAMDISK_PROP;
case IH_TYPE_X86_SETUP:
return FIT_SETUP_PROP;
+ case IH_TYPE_LOADABLE:
+ return FIT_LOADABLE_PROP;
}
return "unknown";
@@ -1661,7 +1663,13 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
os_ok = image_type == IH_TYPE_FLATDT ||
fit_image_check_os(fit, noffset, IH_OS_LINUX) ||
fit_image_check_os(fit, noffset, IH_OS_OPENRTOS);
- if (!type_ok || !os_ok) {
+
+ /*
+ * If either of the checks fail, we should report an error, but
+ * if the image type is coming from the "loadables" field, we
+ * don't care what it is
+ */
+ if ((!type_ok || !os_ok) && image_type != IH_TYPE_LOADABLE) {
fit_image_get_os(fit, noffset, &os);
printf("No %s %s %s Image\n",
genimg_get_os_name(os),
OpenPOWER on IntegriCloud