Uboot work sequence< colibri_pxa270 >

Uboot work sequence< colibri_pxa270 >

1.     Start.s <\arch\arm\cpu\pxa>

_start: b reset  -->

reset: -->

bl _main -->

2.     Crt0.s<\arch\arm\lib>

ENTRY(_main)  -->

bl  board_init_f -->

board_init_f() à < Board_f.c > run all the function in init_sequence_f

ldr        pc, =board_init_r           /* this is auto-relocated! */

3.     Board_r.c<\common>

board_init_r --> run all the function in init_sequence_r

run_main_loop -->

main_loop() -->

4.     Main.c<\common>

process_boot_delay --> run_command_list

parse_file_outer -->

parse_file_outer解析用户命令

对于uboot支持的每一个命令,是通过U_BOOT_CMD宏定义的

http://wenku.baidu.com/view/9ba118f7c8d376eeaeaa319a.html

 

#define CONFIG_BOOTCOMMAND                                                                    \

            "if mmc init && fatload mmc 0 0xa0000000 uImage; then "                       \

                        "bootm 0xa0000000; "                                                   \

            "fi; "                                                                                          \

            "if usb reset && fatload usb 0 0xa0000000 uImage; then "           \

                        "bootm 0xa0000000; "                                                   \

            "fi; "                                                                                          \

            "bootm 0x80000;"

 

5.     Cmd_bootm.c <\common>

 

U_BOOT_CMD(

            bootm, CONFIG_SYS_MAXARGS,        1,         do_bootm,

            "boot application image from memory", bootm_help_text);

 

do_bootm -->

do_bootm_states -->  boot_fn = boot_os[images->os.os];设置函数为下面的进入做准备

 

bootm_find_os ->

1)     boot_get_kernel ->  memmove(&images->legacy_hdr_os_copy, hdr,sizeof(image_header_t));

2)     /* find kernel entry point */

            if (images.legacy_hdr_valid) {

                        images.ep = image_get_ep(&images.legacy_hdr_os_copy);

 

boot_selected_os -->

boot_fn(state, argc, argv, images); --> do_bootm_linux -->

boot_jump_linux --> kernel_entry = (void (*)(int, int, uint))images->ep;

kernel_entry -->

Configure board: Colibri_pxa270.h (include\configs)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值