cmd: image_info: Add checking of default FIT config
PATCH RESEND 1/1 cmd: image_info: Add checking of default FIT config
This patch adds a check for the default FIT config to iminfo. Once applied any signing of the config will show a pass fail similar to rsa+/rsa-.
Output looks like this:
Hash(es) for Image 0 (kernel at 1): sha1+
Hash(es) for Image 1 (fdt at imx7s-warp.dtb): sha1+ Hash(es) for Image 2 (ramdisk at 1): sha1+
Hash(es) for Image 3 (bootscr): sha1+
Hash for default configuration: sha1,rsa2048:mbl-fit-rot-key+
--- cmd/bootm.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
cmd/bootm.c +17 -0
@@ -244,6 +244,9 @@ static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])static int image_info (ulong addr) { +#if defined(CONFIG_FIT ) +int cfg_noffset; +#endif void *hdr = (void *)addr;printf ("\n## Checking Image at %08lx ...\n" , addr);
@@ -294,6 +297,20 @@ static int image_info(ulong addr) return 1; } + cfg_noffset =fit_conf_get_node (hdr,NULL ); +if (!cfg_noffset) { +printf ("Could not find configuration node: %s\n" , +fdt_strerror (cfg_noffset)); +return 1 ; + } + +puts (" Hash for default configuration: " ); +if (fit_config_verify (hdr, cfg_noffset)) { +puts ("Unable to verify default fit config\n" ); +return 1 ; + } +puts ("\n" ); +return 0 ;#endif default :
Signature · 1 line
2.20.1
Tom Rini
NAKPATCH RESEND 1/1 cmd: image_info: Add checking of default FIT config
Quoted 11 lines · Bryan O'Donoghue
This patch adds a check for the default FIT config to iminfo. Once applied any signing of the config will show a pass fail similar to rsa+/rsa-.
Output looks like this:
Hash(es) for Image 0 (kernel at 1): sha1+
Hash(es) for Image 1 (fdt at imx7s-warp.dtb): sha1+ Hash(es) for Image 2 (ramdisk at 1): sha1+
Hash(es) for Image 3 (bootscr): sha1+
Hash for default configuration: sha1,rsa2048:mbl-fit-rot-key+
Quoted 5 lines
Signed-off-by Bryan O'Donoghue <[email protected]>Cc Jun Nie <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>Reviewed-by Simon Glass <[email protected]>
NAK, this blows up a ton of boards with Linksprite_pcDuino and pine_h64 being two examples. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190422/55657e38/attachment.sig>