uboot启动流程分析之三

本文深入探讨UBoot如何通过main_loop()和fastapp_entry()引导内核启动。提供了一张概述基本方法调用关系的流程图,为后续详细讲解奠定基础。
摘要由CSDN通过智能技术生成

  上一篇已经分析到main_loop(),基本上board.c结束了,现在我们要进入fastapp_entry()以及main_loop(),去看看uboot到底是如何引导内核启动的。

下面一张图,是一张很简单的流程图,只列出了基本的方法调用关系,大家先有个印象,接下来细讲。



//product/main.c
int fastapp_entry(int argc, char *argv[])
{
 #ifdef HI_ANDROID_BOOT_SUPPORT
   <strong> Android_Main(); </strong>              //环境参数设置
#endif

#ifndef HI_ADVCA_SUPPORT
#ifdef HI_LOADER_SUPPORT
   <strong> Loader_Main();</strong>
#else
    HI_INFO_PRINT(HI_ID_SYS, "not support hisi loader!\n");
#endif
#endif

#ifdef HI_ADVCA_SUPPORT
	c51_loadCode();
#endif	

    return 0;
}

int Android_Main(void)      
{
	load_recovery();         //进入recovery模式
 #ifdef HI_ADVCA_SUPPORT
    if (-1 == CA_auth())
    {
        run_command("reset", 0);     //重启
    }
#endif
    return 0;
}

//设置recovery参数
void load_recovery(void)
{
	int ret = 0;
	int keycode = 0;

	if (!strcmp<strong>(boot_select()</strong>, "kernel"))
		
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值