common/autoboot.c CONFIG_AUTOBOOT
const char *bootdelay_process(void)
{
char *s;
int bootdelay;
#ifdef CONFIG_BOOTCOUNT_LIMIT
unsigned long bootcount = 0;
unsigned long bootlimit = 0;
#endif /* CONFIG_BOOTCOUNT_LIMIT */
#ifdef CONFIG_BOOTCOUNT_LIMIT
bootcount = bootcount_load();
bootcount++;
bootcount_store(bootcount);
setenv_ulong("bootcount", bootcount);
bootlimit = getenv_ulong("bootlimit", 10, 0);
#endif /* CONFIG_BOOTCOUNT_LIMIT */
s = getenv("bootdelay");
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
#ifdef CONFIG_OF_CONTROL
bootdelay = fdtdec_get_config_int(gd->fdt_blob, "bootdelay",
bootdelay);
#endif
debug("### main_loop entered: bootdelay=%d\n\n", bootdelay);
#if defined(CONFIG_MENU_SHOW)
bootdelay = menu_show(bootdelay);
#endif
bootretry_init_cmd_timeout();
#ifdef CONFIG_POST
if (gd->flags & GD_FLG_POSTFAIL) {
s = getenv("failbootcmd");
} else
#endif /* CONFIG_POST */
#ifdef CONFIG_BOOTCOUNT_LIMIT
if (bootlimit && (bootcount > bootlimit)) {
printf("Warning: Bootlimit (%u) exceeded. Using altbootcmd.\n",
(unsigned)bootlimit);
s = getenv("altbootcmd");
} else
#endif /* CONFIG_BOOTCOUNT_LIMIT */
s = getenv("bootcmd");
process_fdt_options(gd->fdt_blob);
stored_bootdelay = bootdelay;
return s;
}
uboot中main_loop下bootdelay_process实现
原创sunlei0625 ©著作权
文章标签 #endif #ifdef #if 文章分类 JavaScript 前端开发
-
【linux 系统移植④】uboot 进入 main_loop() 前
uboot 进入 main_loop() 前
linux 运维 服务器 #endif #ifdef -
【linux 系统移植⑤】uboot 进入main_loop() 后
uboot 进入main_loop()后
linux 运维 服务器 #define #endif -
Uboot启动分析--__main分析(2)
一切就绪后进入交互状态,cli_init->cli_loop循环读取cmdline中的启动参数,将其存入cons
嵌入式 uboot u-boot linux 设备树 -
Uboot启动分析--__main分析(1)
arch/arm/lib/crt0_64.S上一节start.S主要做了以下工作:reset初始化,save_boot_params(nxp定义)保存参数到大小256byte的sram中设置cpu状态:小端模式,MMU 、 i/d cache 都关闭,段定义;判断当前的异常等级并将中断向量的地址写到各个EL3/2/1对应的VBAR寄存器中;打开EA、FIQ、IRQ、NS四种中断;打开SIMD和FP浮点运算功能;配置cntfrq_el0 系统时钟计数器的频率。最后主核跳转_main,从核等
嵌入式 uboot u-boot #endif #ifdef