[PATCH 1/3] cmd: bdinfo: provide long help with all options

Michal Simek michal.simek at amd.com
Thu Dec 18 09:48:59 CET 2025



On 12/17/25 17:23, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz at cherry.de>
> 
> Document the bdinfo -a, -e and -m options in the long help, but only
> when they can be used. The string concatenation is a bit odd with two
> newlines, but it does render properly once in U-Boot CLI.
> 
> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
> ---
>   cmd/bdinfo.c | 16 +++++++++++++++-
>   1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
> index 09fe8067642..f36c6123ca7 100644
> --- a/cmd/bdinfo.c
> +++ b/cmd/bdinfo.c
> @@ -212,5 +212,19 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
>   U_BOOT_CMD(
>   	bdinfo,	2,	1,	do_bdinfo,
>   	"print Board Info structure",
> -	""
> +// Long help prepended with command's name, and `bdinfo` is a valid command
> +	"\n"
> +#if CONFIG_IS_ENABLED(GETOPT)
> +	"bdinfo -a\n"
> +#endif
> +	"  - print all Board Info structure"
> +#if CONFIG_IS_ENABLED(GETOPT)
> +	"\n"
> +#if IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)
> +	"bdinfo -e\n"
> +	"  - print Board Info related to network\n"
> +#endif
> +	"bdinfo -m\n"
> +	"  - print Board Info related to DRAM"
> +#endif
>   );
> 

Tested-by: Michal Simek <michal.simek at amd.com>

Thanks,
Michal


More information about the U-Boot mailing list