
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@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?