bootdelay

有两种配置方法

bootdelay=3

#define CONFIG_BOOTDELAY 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
void (void)
{

s = bootdelay_process();
s = getenv("bootdelay");
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
stored_bootdelay = bootdelay;

autoboot_command(s);
// 延迟指定时间
abortboot(stored_bootdelay);
while ((bootdelay > 0) && (!abort)) {
--bootdelay;
/* delay 1000 ms */
ts = get_timer(0);
do {
udelay(10000); // 从这个代码来看,这个延时时间是1s
} while (!abort && get_timer(ts) < 1000);

printf("bbb%2d ", bootdelay);
}

// 启动
s = getenv("bootcmd");
run_command_list(s, -1, 0);
}