From 4f6104270146c76fcaf46e951f84cdc1612a04b7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 13 Jun 2013 15:10:06 -0700 Subject: mkimage: Add -c option to specify a comment for key signing When signing an image, it is useful to add some details about which tool or person is authorising the signing. Add a comment field which can take care of miscellaneous requirements. Signed-off-by: Simon Glass Reviewed-by: Marek Vasut --- tools/mkimage.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/mkimage.c') diff --git a/tools/mkimage.c b/tools/mkimage.c index e2b82d0c5c3..b3b45a47a3f 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -183,6 +183,11 @@ main (int argc, char **argv) genimg_get_arch_id (*++argv)) < 0) usage (); goto NXTARG; + case 'c': + if (--argc <= 0) + usage(); + params.comment = *++argv; + goto NXTARG; case 'C': if ((--argc <= 0) || (params.comp = @@ -640,9 +645,10 @@ usage () fprintf(stderr, " -D => set options for device tree compiler\n" " -f => input filename for FIT source\n"); #ifdef CONFIG_FIT_SIGNATURE - fprintf(stderr, "Signing / verified boot options: [-k keydir] [-K dtb]\n" + fprintf(stderr, "Signing / verified boot options: [-k keydir] [-K dtb] [ -c ]\n" " -k => set directory containing private keys\n" " -K => write public keys to this .dtb file\n" + " -c => add comment in signature node\n" " -F => re-sign existing FIT image\n"); #else fprintf(stderr, "Signing / verified boot not supported (CONFIG_FIT_SIGNATURE undefined)\n"); -- cgit v1.2.3