终于到了最后的函数了
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX /* 没定义 */
sandbox_main_loop_init();
#endif
/* main_loop() can return to retry autoboot, if so just run it again */
for (;;)
main_loop();
return 0;
}
1.1、main_loop
void main_loop(void)
{
const char *s;
/* bootstage_mark_name函数调用了show_boot_progress,利用它显示启动进程(progress),
7 此处为空函数 */
bootstage_mark_name(BOOTSTAGE_ID_MAIN_LOOP, "main_loop");
#ifdef CONFIG_VERSION_VARIABLE /* 没定义 */
setenv("ver", version_string); /* set version variable */
#endif /* CONFIG_VERSION_VARIABLE */
/* cli_init用来初始化hush shell使用的一些变量。 */
cli_init();
/* 函数从环境变量中获取"preboot"的定义,*/
/* 该变量包含了一