现在的位置: 首页 > 综合 > 正文

6200 uboot测试版分析(四)

2012年07月16日 ⁄ 综合 ⁄ 共 877字 ⁄ 字号 评论关闭

include/autoconf.mk中COFIG_LOAD_ADDR=0x40008000

common/do_boom.c 中潜入了U_BOOT_CMD(bootm,CONFIG_SYS_MAXARGS,1,do_bootm)因此在default_environment中将会找到的bootm最终将执行do_bootm函数,do_bootm调用同文件下的bootm_start函数,在bootm_start函数中将会通过boot_get_kernel获得uImage的头部并且录入images(bootm_headers_t结构体类型)中(此处会将头部搬移,以使得头部信息原地址空间在解压时可以被覆盖),在函数bootm_start中对image.ep进行复制,回去kernel的入口地址,在do_bootm函数中继续执行bootm_load_os,在该函数中会执行重定位.在do_bootm中的boot_fn=boot_os[image.os.so]获取相应系统的启动函数,例如是linux则被赋值为do_bootm_linux,而后执行boot_fn(0, argc, argv, &images);arch/unicore/lib/bootm.c下的函数do_bootm_linux中将images->ep强制转换成函数地址kernel_entry = (void (*)(int, int, uint))images->ep;而后开始启动kernel_entry(0, machid, bd->bi_boot_params);   6200 的板子时(0,0x9fc,0x40000100    0x9fc是板子硬件设计代号,40000100是传递参数的地址)

 

uboot最终的配置会录入include/configs/SEP0611.h中

在该文件中又含有了include/asm/arch/hardware.h(地址分布)

board/seuic/SEP0611/include/board.h中含有板级配置

include/config_cmd_default.h配置命令

抱歉!评论已关闭.