aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass2023-11-18 14:05:19 -0700
committerTom Rini2023-12-13 11:51:24 -0500
commit1047b5340c1203f825c0a68b33997b787be0123e (patch)
treee631e2a3dc1cfccf6a9aa3c61873f5a5ee479dfc /common
parent984e6fedb54ee45002b8b7e2de916346a1aca26c (diff)
bootstd: Introduce programmatic boot
At present bootstd requires CONFIG_CMDLINE to operate. Add a new 'programmatic' 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>
Diffstat (limited to 'common')
-rw-r--r--common/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 7c70de2e59a..6dba6cba144 100644
--- a/common/main.c
+++ b/common/main.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <autoboot.h>
#include <bootstage.h>
+#include <bootstd.h>
#include <cli.h>
#include <command.h>
#include <console.h>
@@ -67,6 +68,16 @@ void main_loop(void)
autoboot_command(s);
+ /* if standard boot if enabled, assume that it will be able to boot */
+ if (IS_ENABLED(CONFIG_BOOTSTD_PROG)) {
+ int ret;
+
+ ret = bootstd_prog_boot();
+ printf("Standard boot failed (err=%dE)\n", ret);
+ panic("Failed to boot");
+ }
+
cli_loop();
+
panic("No CLI available");
}