uboot 2016 从 do_bootm 说起

below describes u-boot do_bootm flow:

do_bootm

  ->do_bootm_states

    ->bootm_start /bootm_find_os /bootm_find_other

      ->bootm_load_os

      ->boot_fn = bootm_os_get_boot_func(images->os.os);

        ([IH_OS_LINUX] = do_bootm_linux,)  

      ->boot_selected_os

        ->do_bootm_linux

          ->boot_prep_linux

            ->image_setup_linux

              ->boot_fdt_add_mem_rsv_regions

              ->boot_get_cmdline

              ->boot_relocate_fdt  //for relocate fdt

              ->image_setup_libfdt //Note that U-Boot makes some automatic modifications to the blob

                       //before passing it to the kernel -

                        // mainly adding and modifying information that is learnt at run-time.

            ->boot_jump_linux

              ->r2 = (unsigned long)images->ft_addr;

              ->kernel_entry(0, machid, r2);

 

Attention:

  Because u-boot kernel need set DRAM base address and DRAN size. So if used out-DTS, befor enter linux kernel. must be sure "/memory" node have been setted. Pls see function: image_setup_libfdt in u-boot.

 

posted @ 2016-06-04 10:58  JustRelax  阅读(1244)  评论(0编辑  收藏  举报