u-boot启动流程(一)
来源:互联网 发布:美国编程网站儿童 编辑:程序博客网 时间:2024/05/19 19:59
arch/arm/cpu/armv7/start.S //这里要看你用的是什么样的cpu,我用的contex A5,所以在armv7目录下
/* Set stackpointer in internal RAM to call board_init_f */call_board_init_f: ldr sp, =(CONFIG_SYS_INIT_SP_ADDR) bic sp, sp, #7 /* 8-byte alignment for ABI compliance */#ifndef CONFIG_NAND_SPL ldr r0,=0x00000000 bl board_init_f #else ldr r0, =(CONFIG_SYS_INIT_SP_ADDR) ldr r1, =0x00000000 ldr r2, =(CONFIG_SYS_TEXT_BASE) bl relocate_code #endif在这里会跳转到board_init_f()函数 arch/arm/lib/board.c
void board_init_f (ulong bootflag){ bd_t *bd; init_fnc_t **init_fnc_ptr; gd_t *id; ulong addr, addr_sp; /* Pointer is writable since we allocated a register for it */ gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07); /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("": : :"memory"); memset ((void*)gd, 0, sizeof (gd_t)); gd->mon_len = _bss_end_ofs; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { hang (); } } debug ("monitor len: %08lX\n", gd->mon_len); /* * Ram is setup, size stored in gd !! */ debug ("ramsize: %08lX\n", gd->ram_size);这里会调用init_sequence[ ]里的函数,该数组在该文件中定义,内容如下:
init_fnc_t *init_sequence[] = {#if defined(CONFIG_ARCH_CPU_INIT) arch_cpu_init, /* basic arch cpu dependent setup */ #endif #if defined(CONFIG_BOARD_EARLY_INIT_F) board_early_init_f, #endif timer_init, /* initialize timer */#ifdef CONFIG_FSL_ESDHC get_clocks,#endif env_init, /* initialize environment */ init_baudrate, /* initialze baudrate settings */ serial_init, /* serial communications setup */ console_init_f, /* stage 1 init of console */ display_banner, /* say that we are here */#if defined(CONFIG_DISPLAY_CPUINFO) print_cpuinfo, /* display cpu info (and speed) */ #endif #if defined(CONFIG_DISPLAY_BOARDINFO) checkboard, /* display board info */ #endif #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) init_func_i2c,#endif dram_init, /* configure available RAM banks */#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI) arm_pci_init,#endif NULL,};
- u-boot移植(一)---u-boot启动流程分析
- u-boot启动流程(一)
- (一)u-boot启动流程分析
- u-boot启动流程一
- u-boot启动流程
- u-boot启动流程
- u-boot启动流程
- u-boot启动流程
- u-boot启动流程
- u-boot 启动流程(mips)
- u-boot 启动流程(mips)
- U-boot 启动(一)
- 【u-boot】u-boot-2017.05启动过程分析(一)
- u-boot总的启动流程
- U-BOOT的启动流程
- u-boot启动流程分析
- U-BOOT启动流程之一
- U-Boot启动内核流程
- 我最喜欢的10条编程语录
- 华中区程序设计邀请赛比赛总结
- iphone 判断当前为3g还是wifi网络
- django 中使用静态文件(css,images,javascript)
- strtus2 三 HelloWorld
- u-boot启动流程(一)
- 用sed将C++注释(//) 替换成存 C(/* ... */)注释
- 源码管理文章 链接
- makefile规则
- 配色基础知识 配色技巧
- Android画图学习总结(四)——Animation(上)
- 列表比较只关心元素数据
- eclipse/MyEclipse 插件 .
- 规则的命令