#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY
>= 0)
# if defined(CONFIG_AUTOBOOT_KEYED)
static __inline__ int abortboot(int bootdelay)
{
....
}
# else
#ifdef CONFIG_MENUKEY
static int menukey = 0;
#endif
static __inline__ int abortboot(int bootdelay)
{
...
}
故可知# if
defined(CONFIG_AUTOBOOT_KEYED),则uboot上电自动加载kernel,
else#ifdef
CONFIG_MENUKEY,则等待bootdelay直到bootdelay=0再自动加载kernel。
like this:
U-Boot 1.1.6 (Nov 30 2012 - 00:23:11)
DRAM: 64 MB
Flash: 2 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 3