• 一、主要是start.S 里面的 board_init_f 以及 board_init_r 函数分析,MLO与 u-boot.omg 的区别就在这里

  • 二、 MLO 加载完毕,他会重新回到 start.S 重新开始

  • 三、 board_init_f 函数的实现在 arch/arm/lib/board.c 里面

    264 void board_init_f(ulong bootflag)265 {   266     bd_t *bd;267     init_fnc_t **init_fnc_ptr;268     gd_t *id;269     ulong addr, addr_sp;270     271 272     /* Pointer is writable since we allocated a register for it */273     gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07);274     /* compiler optimization barrier needed for GCC >= 3.4 */275     __asm__ __volatile__("": : :"memory");276     277     memset((void *)gd, 0, sizeof(gd_t));278 279     gd->mon_len = _bss_end_ofs;280     // 这里有一个函数指针数组,里面包含很多初始化281     for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {282         if ((*init_fnc_ptr)() != 0) {283             hang ();284         }285     }// ... ...412     gd->bd->bi_baudrate = gd->baudrate;413     /* Ram ist board specific, so move it to board code ... */414     dram_init_banksize();415     display_dram_config();  /* and display it */416 417     gd->relocaddr = addr;418     gd->start_addr_sp = addr_sp;419     gd->reloc_off = addr - _TEXT_BASE;420     debug("relocation Offset is: %08lx\n", gd->reloc_off);421     memcpy(id, (void *)gd, sizeof(gd_t));422 423     relocate_code(addr_sp, id, addr);   // 最后回到 start.S  然后又到了 board_init_r424 425     /* NOTREACHED - relocate_code() does not return */426 }
  • 接上函数指针数组 init_sequence

    235 init_fnc_t *init_sequence[] = {236 #if defined(CONFIG_ARCH_CPU_INIT)237     arch_cpu_init,      /* basic arch cpu dependent setup */238 #endif239 #if defined(CONFIG_BOARD_EARLY_INIT_F)240     board_early_init_f,241 #endif242     timer_init,     /* initialize timer */243 #ifdef CONFIG_FSL_ESDHC244     get_clocks,245 #endif246     env_init,       /* initialize environment */247     init_baudrate,      /* initialze baudrate settings */248     serial_init,        /* serial communications setup */249     console_init_f,     /* stage 1 init of console */250     display_banner,     /* say that we are here */251 #if defined(CONFIG_DISPLAY_CPUINFO)252     print_cpuinfo,      /* display cpu info (and speed) */253 #endif254 #if defined(CONFIG_DISPLAY_BOARDINFO)255     checkboard,     /* display board info */256 #endif257 #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)258     init_func_i2c,259 #endif260     dram_init,      /* configure available RAM banks */261     NULL,262 };
  • 三、board_init_r 也在 arch/arm/lib/board.c

    443 void board_init_r(gd_t *id, ulong dest_addr)444 {445     char *s;446     bd_t *bd;447     ulong malloc_start;448 #if !defined(CONFIG_SYS_NO_FLASH)449     ulong flash_size;450 #endif451 452 453     gd = id;454     bd = gd->bd;455 456     gd->flags |= GD_FLG_RELOC;  /* tell others: relocation done */457 458     monitor_flash_len = _end_ofs;459 460     /* Enable caches */461     enable_caches();462 463     debug("monitor flash len: %08lX\n", monitor_flash_len);464     board_init();   /* Setup chipselects */465 466 #ifdef CONFIG_SERIAL_MULTI467     serial_initialize();468 469 #endif81     /* The Malloc area is immediately below the monitor copy in DRAM */482     malloc_start = dest_addr - TOTAL_MALLOC_LEN;483     mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);484 485     stdio_init();   /* get the devices list going. */486 487     puts("zengjf :\n");523 #if defined(CONFIG_CMD_NAND)524     puts("NAND :  ");525     nand_init();        /* go init the NAND */526 #endif// ... ... 531 532 #ifdef CONFIG_GENERIC_MMC533        puts("MMC:   ");534        mmc_initialize(bd);535 #endif// .. ...559 560     console_init_r();   /* fully init console as a device */561     566 #if defined(CONFIG_MISC_INIT_R)567     /* miscellaneous platform dependent initialisations */    568     misc_init_r();569 #endif// ... ...649     for (;;) {650         main_loop();651     }652 653     /* NOTREACHED - no way out of command loop except booting */654 }
  • u-boot 加载 kernel 参考:

    http://www.cnblogs.com/chenfulin5/p/6937334.html

  • MLO 的流程参考:

    http://www.cnblogs.com/chenfulin5/p/8398399.html

u-boot2011.09 u-boot.img 的流程跟踪相关推荐

  1. springboot 自动装配_Spring Boot 自动装配流程

    Spring Boot 自动装配流程 本文以 mybatis-spring-boot-starter 为例简单分析 Spring Boot 的自动装配流程. Spring Boot 发现自动配置类 这 ...

  2. Spring Boot的启动流程

    文章目录 Spring Boot Spring Boot概念 Spring Boot的启动流程 1. 构造SpringApplection的实例 2. 调用实例的run方法 Spring Boot启动 ...

  3. I.MX6 Linux Qt 启动流程跟踪

    /*************************************************************************** I.MX6 Linux Qt 启动流程跟踪* ...

  4. activiti流程跟踪图简单详解

    我用的是spring+springmvc+mybatis,前端使用的是jsp ===========前台jsp中的写法========== <img  id="imgObj" ...

  5. Buildroot 打包文件系统流程跟踪

    /********************************************************************************** Buildroot 打包文件系统 ...

  6. Spring Boot项目开发流程

    1. 开发流程(以处理登录为例) 正常的项目开发流程大致是: - 先整理出当前项目涉及的数据的类型   - 例如:电商类包含用户.商品.购物车.订单等 - 再列举各种数据类型涉及的数据操作   - 例 ...

  7. Spring Boot项目启动流程

    概述 用过Spring Boot的应该都知道,在项目启动入口的主类main()方法里,一句简简单单的 SpringApplication.run( ... ); 便开启了项目的启动运行之路. 本文我们 ...

  8. Spring Boot 集成SnakerFlow流程引擎,简介、功能列表、详细解读、扩展点分析

    文章目录 简介 功能列表 流程定义 任务参与者 参与者设置 动态添加.删除参与者 组支持 详细解读 Spring Boot集成 表定义 表详细说明: 字段详细说明: 常见操作 常规API 综合查询 模 ...

  9. SpringBoot学习之路:09.Spring Boot中添加Filter应用

    2019独角兽企业重金招聘Python工程师标准>>> 上篇文章中说了SpringBoot中是如何使用servlet的,本文将讲解在SpringBoot中对过滤器Filter的实现 ...

最新文章

  1. python中匿名函数的作用_Python 中的匿名函数,你会用吗
  2. python3.x与python2.x的区别汇总
  3. ReadWriteLock
  4. 关于c++深拷贝与浅拷贝
  5. 计算机视觉领域最全汇总(第1部分)
  6. .Net(C#)用正则表达式清除HTML标签(包括script和style),保留纯本文(UEdit中编写的内容上传到数据库)...
  7. Node.js CLI 工具最佳实践
  8. 【nodejs原理源码赏析(5)】net模块与通讯的实现
  9. Cesium 环境配置笔记(使用node.js 或者WampServer服务器)
  10. Quartz配置TerracottaJobStore-012
  11. 使用Python第三方库requests和bs4 爬取必应首页的图片,并存储到系统对应位置
  12. 计算机中year函数怎么使用,excel2010中YEAR函数的使用方法
  13. 前端性能优化(四)01-页面性能优化之优化原则——尽量减少HTTP请求 使用内容传送网络CDN 避免空src或空href值 启用gzip压缩 CSS放顶部,JS放底部 减少DNS查找
  14. odl源码系列一restconf模块
  15. 在人工智能领域创业,需要明确可知的5个基本条件
  16. SQL group by和count
  17. 鸿蒙系统专利申请,华为在欧盟申请HarmonyOS专利 或为鸿蒙系统的英文名称
  18. pytorch distiller filter channel剪枝
  19. 简单删除隐藏文件夹System Volume Information
  20. 算法导论 3.2-1 关于单调递增函数的证明

热门文章

  1. Android4.2以后,多屏幕的支持 学习(一)
  2. SIP术语的名词解析
  3. H.264NLU和RTSP协议理解
  4. python程序不出结果_超详细的Python入门教程,1小时就可以学会
  5. python怎么继承_Python: 如何继承str/string?
  6. python实现加密字符串_Python实现对字符串的加密解密方法示例
  7. Linux 关机命令介绍shutdown
  8. 如何使用Fiddler抓包操作?
  9. poj3061(二分算法)
  10. 2020ICPC·小米 网络选拔赛第一场(D. Router Mesh)