From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Mon, 30 Apr 2018 11:06:40 +0200 Subject: [U-Boot] [PATCH] image: fit: Show signatures and hashes for configurations Message-ID: <20180430090640.16908-1-peron.clem@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de 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() Signed-off-by: Clément Péron --- common/image-fit.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/image-fit.c b/common/image-fit.c index 030a3e579f..16e7858254 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1590,6 +1590,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); @@ -1643,6 +1644,16 @@ void fit_conf_print(const void *fit, int noffset, const char *p) } printf("%s\n", uname); } + + /* Process all hash subnodes of the component configuration 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 configuration node */ + fit_image_print_verification_data(fit, noffset, p); + } + } } static int fit_image_select(const void *fit, int rd_noffset, int verify) -- 2.17.0