[PATCH 3/4] startup: fix autoboot_state in case of abort

Marco Felsch m.felsch at pengutronix.de
Wed Mar 13 12:56:05 PDT 2024


Currently do_autoboot_countdown() always returns AUTOBOOT_BOOT if no
interactive console was found which is wrong if global_autoboot_state
was set to AUTOBOOT_ABORT. Fix this by checking the
global_autoboot_state as well.

Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
---
 common/startup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/startup.c b/common/startup.c
index bbba72f89255..d7f7b5163e87 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -174,7 +174,8 @@ enum autoboot_state do_autoboot_countdown(void)
 	if (autoboot_state != AUTOBOOT_UNKNOWN)
 		return autoboot_state;
 
-	if (!console_get_first_active()) {
+	if (!console_get_first_active() &&
+	    global_autoboot_state != AUTOBOOT_ABORT) {
 		printf("\nNon-interactive console, booting system\n");
 		return autoboot_state = AUTOBOOT_BOOT;
 	}
-- 
2.39.2




More information about the barebox mailing list