因串口干扰容易造成直接进入uboot命令行,不启动kernel的问题
现排查解决
uboot/common/autoboot.c
输入./.进入uboot
static int __abortboot(int bootdelay)
{
int abort = 0;
unsigned long ts;
char c;
int abort_stage = 0;
#ifdef CONFIG_MENUPROMPT
printf(CONFIG_MENUPROMPT);
#else
printf("Hit any key to stop autoboot: %2d ", bootdelay);
#endif
/*
* Check if key already pressed
*/
if (tstc()) { /* we got a key press */
c = getc();
puts("\b\b\b 0");
if (!abort_stage && c == '.') abort_stage = 0x1;
}
while ((bootdelay > 0) && (!abort)) {
--bootdelay;
/* delay 1000 ms */
ts = get_timer(0);
do {
if (tstc()) { /* we got a key press */
c = getc();
if (!abort_stage && c == '.') abort_stage = 0x1;
else if (abort_stage == 1 && c == '/') abort_stage = 0x2;
else if (abort_stage == 2 && c == '.') {
bootdelay = 0; /* no more delay */
abort = 1;
break;
}
}
udelay(10000);
} while (!abort && get_timer(ts) < 1000);
printf("\b\b\b%2d ", bootdelay);
}
putc('\n');
return abort;
}