From d562b57f2a21125bcfb7268099aa29dea6f005f2 Mon Sep 17 00:00:00 2001 From: "Chen.Zhao" Date: Tue, 18 Mar 2025 17:43:34 +0800 Subject: [PATCH] Force use ctrl l to entre uboot command line --- common/autoboot.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/autoboot.c b/common/autoboot.c index d54f1c431f..9c1edfb16e 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -216,9 +216,9 @@ static int __abortboot(int bootdelay) #ifdef CONFIG_MENUPROMPT printf(CONFIG_MENUPROMPT); #else - printf("Hit any key to stop autoboot: %2d ", bootdelay); + printf("Hit ctrl+l to stop autoboot: %2d ", bootdelay); #endif - +#if 0 /* * Check if key already pressed */ @@ -227,21 +227,21 @@ static int __abortboot(int bootdelay) puts("\b\b\b 0"); abort = 1; /* don't auto boot */ } - +#endif while ((bootdelay > 0) && (!abort)) { --bootdelay; /* delay 1000 ms */ ts = get_timer(0); do { if (tstc()) { /* we got a key press */ - abort = 1; /* don't auto boot */ - bootdelay = 0; /* no more delay */ + if(0x0c == getc()){ /* 0x0c is ctrl+l */ + abort = 1; /* don't auto boot */ + bootdelay = 0; /* no more delay */ # ifdef CONFIG_MENUKEY - menukey = getc(); -# else - (void) getc(); /* consume input */ + menukey = getc(); # endif - break; + break; + } } udelay(10000); } while (!abort && get_timer(ts) < 1000); -- 2.25.1