[PATCH v2 06/32] bootstd: Introduce programmable boot

Tom Rini trini at konsulko.com
Fri Nov 17 18:17:46 CET 2023


On Wed, Nov 15, 2023 at 09:10:06PM -0700, Simon Glass wrote:

> At present bootstd requires CONFIG_CMDLINE to operate. Add a new
> 'programmable' boot which can be used when no command line is available.
> For now it does almost nothing, since most bootmeths require the
> command line.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
[snip]
> @@ -67,6 +68,14 @@ void main_loop(void)
>  
>  	autoboot_command(s);
>  
> +	if (IS_ENABLED(CONFIG_BOOTSTD_PROG)) {
> +		int ret;
> +
> +		ret = bootstd_prog_boot();
> +		printf("Standard boot failed (err=%dE)\n", ret);
> +	}
> +
>  	cli_loop();
> +
>  	panic("No CLI available");

I think this this brings in at least a 3rd option now, we should try and
condense things a little or clean it up maybe. We have common/autoboot.c
which is what will fire off menu_show() and drop things in to that menu
instead of the cmdline (but that does have cmdline as an option to run,
and I suspect that just exits gracefully from the cmd). With CMDLINE=n,
cli_loop prints we can't do anything and then panics, so we should also
maybe panic() in the case it bootstd_prog_boot fails rather than
continue?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231117/40552854/attachment.sig>


More information about the U-Boot mailing list