X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fimage-fit.c;h=28f7aa83ba4e6b60882227a2670a69c27c8d76ca;hb=909a1ab2f05a53b2e5a0c604a88c06adc8b4929c;hp=fc9ea1f1b243bb4234d48b7b3e678616af28f67f;hpb=ecf8cd653530acb0ed8217a1d80c93841ec2005e;p=u-boot diff --git a/common/image-fit.c b/common/image-fit.c index fc9ea1f1b2..28f7aa83ba 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1464,10 +1464,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p) /* Print out all of the specified loadables */ for (loadables_index = 0; - !fdt_get_string_index(fit, noffset, + fdt_get_string_index(fit, noffset, FIT_LOADABLE_PROP, loadables_index, - (const char **)&uname) > 0; + (const char **)&uname) == 0; loadables_index++) { if (loadables_index == 0) { @@ -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),