[U-Boot] image: Display FIT signature for configs

Message ID 20180413091145.22619-1-peron.clem@gmail.com
State New
Delegated to: Tom Rini
Headers show
Series
  • [U-Boot] image: Display FIT signature for configs
Related show

Commit Message

Clément Péron April 13, 2018, 9:11 a.m.
The signature/hash information are displayed for images but nor for
configurations.

Add subnodes printing in fit_conf_print() like it's done in fit_image_print()
---
 common/image-fit.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch

diff --git a/common/image-fit.c b/common/image-fit.c
index 4b03390454..b87f4420fa 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1589,6 +1589,7 @@  void fit_conf_print(const void *fit, int noffset, const char *p)
 	const char *uname;
 	int ret;
 	int fdt_index, loadables_index;
+	int ndepth;
 
 	/* Mandatory properties */
 	ret = fit_get_desc(fit, noffset, &desc);
@@ -1638,6 +1639,16 @@  void fit_conf_print(const void *fit, int noffset, const char *p)
 		}
 		printf("%s\n", uname);
 	}
+
+	/* Process all hash subnodes of the component image node */
+	for (ndepth = 0, noffset = fdt_next_node(fit, noffset, &ndepth);
+	     (noffset >= 0) && (ndepth > 0);
+	     noffset = fdt_next_node(fit, noffset, &ndepth)) {
+		if (ndepth == 1) {
+			/* Direct child node of the component image node */
+			fit_image_print_verification_data(fit, noffset, p);
+		}
+	}
 }
 
 static int fit_image_select(const void *fit, int rd_noffset, int verify)