summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorandy.hu <andy.hu@starfivetech.com>2023-09-07 05:53:09 +0300
committerandy.hu <andy.hu@starfivetech.com>2023-09-07 05:53:09 +0300
commit081aa0e676156437fe6326402936c4d1f07818c1 (patch)
tree7cbeaef211fa53f0b2baf63efcbc08f1d3d80cec /common/main.c
parent3e6f524ed4d35695de2318351aeab81f7171087c (diff)
parentfe15334eb1ad300a0b094c1ce9968c4ba4a200c6 (diff)
downloadu-boot-081aa0e676156437fe6326402936c4d1f07818c1.tar.xz
Merge branch 'CR_4615_add_fastboot_Xingyu.Wu' into 'jh7110-master'
CR_4615_add_fastboot_Xingyu.Wu See merge request sdk/u-boot!68
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/main.c b/common/main.c
index ae5bcdb32f..06312c87bf 100644
--- a/common/main.c
+++ b/common/main.c
@@ -39,6 +39,7 @@ static void run_preboot_environment_command(void)
/* We come here after U-Boot is initialised and ready to process commands */
void main_loop(void)
{
+ int ret = 1;
const char *s;
bootstage_mark_name(BOOTSTAGE_ID_MAIN_LOOP, "main_loop");
@@ -61,7 +62,13 @@ void main_loop(void)
if (cli_process_fdt(&s))
cli_secure_boot_cmd(s);
- autoboot_command(s);
+ if (IS_ENABLED(CONFIG_AUTO_FASTBOOT_STARFIVE)) {
+ ret = autofastboot_command();
+ s = bootdelay_process();
+ }
+
+ if (ret)
+ autoboot_command(s);
cli_loop();
panic("No CLI available");