Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-10 Thread Jan Kiszka
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 ] [-k ] [-n ]

RE: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-10 Thread Roman Kopytin
cmdname); exit(EXIT_FAILURE); } Is it ok? -Original Message- From: Jan Kiszka Sent: Wednesday, November 10, 2021 10:22 PM To: Roman Kopytin ; u-boot@lists.denx.de Cc: Rasmus Villemoes Subject: Re: [PATCH 1/2] tools: add fdt_add_pubkey On 10.11.21 09:26, Roman Kopytin wrote: &g

Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-10 Thread Jan Kiszka
On 08.11.21 16:28, Roman Kopytin wrote: > Having to use the -K option to mkimage to populate U-Boot's .dtb with the > public key while signing the kernel FIT image is often a little > awkward. In particular, when using a meta-build system such as > bitbake/Yocto, having the tasks of the kernel and

Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-10 Thread Jan Kiszka
On 10.11.21 09:26, Roman Kopytin wrote: > Could you please provide good example with needed style for helper? > In tools I saw a lot of programs w/o help. > Have a look at binman to see this full-blown - not a completely fair comparison as it benefits from Python argparse. Jan -- Siemens AG, T

RE: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-10 Thread Roman Kopytin
Could you please provide good example with needed style for helper? In tools I saw a lot of programs w/o help. -Original Message- From: Jan Kiszka Sent: Wednesday, November 10, 2021 10:39 AM To: Roman Kopytin ; u-boot@lists.denx.de Cc: Rasmus Villemoes Subject: Re: [PATCH 1/2] tools

Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-09 Thread Jan Kiszka
[no top-posting please] On 10.11.21 08:03, Roman Kopytin wrote: > Hi, Simon > I have question about: > Some of these are not optional so should not have [] around them. > > As I see we have defaults for: > static const char *algo_name = "sha1,rsa2048"; /* -a */ > static const char *keydir = ".";

Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-09 Thread Jan Kiszka
On 08.11.21 16:28, Roman Kopytin wrote: > Having to use the -K option to mkimage to populate U-Boot's .dtb with the > public key while signing the kernel FIT image is often a little > awkward. In particular, when using a meta-build system such as > bitbake/Yocto, having the tasks of the kernel and

RE: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-09 Thread Roman Kopytin
* -n */ It means that we can skip it in command line. Should I need to remove [] from code for those parameters? -Original Message- From: Simon Glass Sent: Wednesday, November 10, 2021 3:58 AM To: Roman Kopytin Cc: u-boot@lists.denx.de; Rasmus Villemoes Subject: Re: [PATCH 1/2] tools

Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-09 Thread Jan Kiszka
On 08.11.21 16:28, Roman Kopytin wrote: > Having to use the -K option to mkimage to populate U-Boot's .dtb with the > public key while signing the kernel FIT image is often a little > awkward. In particular, when using a meta-build system such as > bitbake/Yocto, having the tasks of the kernel and

Re: [PATCH 1/2] tools: add fdt_add_pubkey

2021-11-09 Thread Simon Glass
Hi Roman, On Mon, 8 Nov 2021 at 08:29, Roman Kopytin wrote: > > Having to use the -K option to mkimage to populate U-Boot's .dtb with the > public key while signing the kernel FIT image is often a little > awkward. In particular, when using a meta-build system such as > bitbake/Yocto, having the