Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1502871
  • 博文数量: 108
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 997
  • 用 户 组: 普通用户
  • 注册时间: 2013-06-29 09:58
个人简介

兴趣是坚持一件事永不衰竭的动力

文章分类

全部博文(108)

文章存档

2021年(1)

2020年(10)

2019年(19)

2018年(9)

2016年(23)

2015年(43)

2013年(3)

我的朋友

分类: LINUX

2018-12-25 21:35:57

基于ti-processor-sdk-linux-am335x-evm-04.00.00.04的uboot启动流程备忘,重点是要修改下sdram_init(),使之与板上的内存相匹配

点击(此处)折叠或打开

  1. _start arch/arm/lib/vectors.S
  2.         b    reset
  3. reset     arch\arm\cpu\armv7\start.S
  4.           bl    _main
  5.         
  6. _main    arch\arm\lib\crt0.S
  7.         bl    board_init_f
  8.         bl spl_relocate_stack_gd
  9. board_init_f        arch\arm\mach-omap2\am33xx\board.c
  10.         sdram_init();
  11. sdram_init()        board\ti\am335x\board.c    

  12. board_init_f        common\board_f.c

  13. save_omap_boot_params() arch\arm\mach-omap2\boot-common.c


  14. board_init_r        common\spl\spl.c
  15.         printf(">>spl:board_init_r()\n");
  16.         
  17. SPL阶段        
  18. 1=>_start                            //arch/arm/lib/vectors.S     
  19. 2==>b reset                        //jump to arch\arm\cpu\armv7\start.S:reset
  20. 3===>bl _main                //jump to arch\arm\lib\crt0.S:_main
  21. 4====>bl board_init_f        //jump to arch\arm\mach-omap2\am33xx\board.c:board_init_f
  22. 5=====>sdram_init()    //jump to board\ti\am335x\board.c:sdram_init()
  23. 4====>bl spl_relocate_stack_gd    //jump to common\board_f.c:spl_relocate_stack_gd
  24. 4====>ldr    pc, =board_init_r        //jump to common\spl\spl.c:board_init_r
  25. 5=====>spl_board_init()            //jump to arch\arm\mach-omap2\boot-common.c:spl_board_init()
  26. 6======>save_omap_boot_params() //jump to arch\arm\mach-omap2\boot-common.c:save_omap_boot_params()
  27. 5=====>boot_from_devices()            //jump to common\spl\spl.c:boot_from_devices()
  28. 6======>printf("Trying to boot from %s\n", loader->name);
  29. 6======>spl_load_image()                
  30. 7=======>spl_ymodem_load_image()        //ommon\spl\spl_ymodem.c                
  31.                 
  32. save_boot_params            arch\arm\mach-omap2\lowlevel_init.S:save_boot_params
  33. ENTRY(save_boot_params)
  34.     ldr    r1, =OMAP_SRAM_SCRATCH_BOOT_PARAMS
  35.     str    r0, [r1]
  36.     b    save_boot_params_ret
  37. ENDPROC(save_boot_params)            

  38. save_omap_boot_params() //arch\arm\mach-omap2\boot-common.c:save_omap_boot_params()        
  39. {
  40. u32 boot_params = *((u32 *)OMAP_SRAM_SCRATCH_BOOT_PARAMS);
  41. ...
  42. omap_boot_params = (struct omap_boot_parameters *)boot_params;
  43. boot_device = omap_boot_params->boot_device;
  44. }

  45. SPL_LOAD_IMAGE_METHOD("UART", 0, BOOT_DEVICE_UART, spl_ymodem_load_image);//ommon\spl\spl_ymodem.c    


  46. 第二阶段:
  47. ==>board_init_r()            //common\board_r.c
  48. ===>init_fnc_t init_sequence_r[] = {...,initr_net,...}    //common\board_r.c
  49. ===>initr_net()                //common\board_r.c
  50. ====>eth_initialize();        //net\eth_legacy.c
  51. =====>board_eth_init()     //board\ti\am335x\board.c    置为MII            
  52. ======>cpsw_register()         //drivers\net\cpsw.c
  53. =======>_cpsw_register()     //drivers\net\cpsw.c
  54. ========>cpsw_mdio_init()     //drivers\net\cpsw.c
  55. =========>cpsw_mdio_read()        //drivers\net\cpsw.c
  56. ==========>wait_for_user_access    //drivers\net\cpsw.c

  57. //引脚配置
  58. ==>board_init_f()
  59. ===>init_fnc_t init_sequence_f[] = {...,board_early_init_f,display_options,...}
  60. ====>board_early_init_f()
  61. =====>set_mux_conf_regs()
  62. ======>enable_board_pin_mux()
  63. =======>configure_module_pin_mux()


阅读(5864) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~