]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/image-fit.c
Kconfig: Move CONFIG_FIT and related options to Kconfig
[people/ms/u-boot.git] / common / image-fit.c
index 28f7aa83ba4e6b60882227a2670a69c27c8d76ca..f3b8aacf3924f5d04c17678fe37987ec1bd0295c 100644 (file)
@@ -851,6 +851,11 @@ static int fit_image_hash_get_ignore(const void *fit, int noffset, int *ignore)
        return 0;
 }
 
+ulong fit_get_end(const void *fit)
+{
+       return map_to_sysmem((void *)(fit + fdt_totalsize(fit)));
+}
+
 /**
  * fit_set_timestamp - set node timestamp property
  * @fit: pointer to the FIT format image header
@@ -1030,6 +1035,13 @@ int fit_image_verify(const void *fit, int image_noffset)
                                        strlen(FIT_SIG_NODENAME))) {
                        ret = fit_image_check_sig(fit, noffset, data,
                                                        size, -1, &err_msg);
+
+                       /*
+                        * Show an indication on failure, but do not return
+                        * an error. Only keys marked 'required' can cause
+                        * an image validation failure. See the call to
+                        * fit_image_verify_required_sigs() above.
+                        */
                        if (ret)
                                puts("- ");
                        else
@@ -1089,8 +1101,9 @@ int fit_all_image_verify(const void *fit)
                         * Direct child node of the images parent node,
                         * i.e. component image node.
                         */
-                       printf("   Hash(es) for Image %u (%s): ", count++,
+                       printf("   Hash(es) for Image %u (%s): ", count,
                               fit_get_name(fit, noffset, NULL));
+                       count++;
 
                        if (!fit_image_verify(fit, noffset))
                                return 0;