[PATCH 1/2] tools: add fdt_add_pubkey

Jan Kiszka jan.kiszka at siemens.com
Thu Nov 11 08:18:38 CET 2021


On 11.11.21 06:26, Roman Kopytin wrote:
> Thanks, I found example in fdtgrep.
> What do you think about function like:
> 
> static void print_usage(const char *msg)
> {
> 	if (msg != NULL)
> 		fprintf(stderr, "Error: %s\n", msg);
> 	fprintf(stderr, "Usage: %s [-a <algo>] [-k <keydir>] [-n <keyname>] [-r <conf|image>] <fdt blob>\n"
> 		"Options:\n"
> 
> 		"\t-a <algo>       Cryptographic algorithm. Optional parameter, default: sha1,rsa2048\n"
> 		"\t-k <keydir>     Directory with public key. Optional parameter, default: .\n"
> 		"\t-n <keyname>    Public key name. Optional parameter, default: key\n"
> 		"\t-r <conf|image> Required: If present this indicates that the key must be verified for the image / configuration to be considered valid\n"

Maybe reorder to "configuration / image" (or reorder to "<image|conf>").

> 		"\t<fdt blob>      FDT blob file for adding of the public key. Required parameter.\n",
> 		cmdname);
> 	exit(EXIT_FAILURE);
> }
> 
> 
> Is it ok?

Yes, looks good to me.

I'm still looking for a way to overcome -a, though...

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


More information about the U-Boot mailing list