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)

你可能感兴趣的:(Uboot work sequence< colibri_pxa270 >)