在分析板级初始化函数board_init_f 和 board_init_r 之前,先来看一下在uboot中颇为重要的 gd_t, bd_t 结构
bd_t 所对应的定义bd_info 在 arch/arm/include/asm/u-boot.h 下,主要用来保存板子参数
1 typedef struct bd_info { 2 int bi_baudrate; /* serial console baudrate 波特率串口控制台*/ 3 unsigned long bi_ip_addr; /* IP Address */ 4 ulong bi_arch_number; /* unique id for this board 板子唯一的ID */ 5 ulong bi_boot_params; /* where this board expects params 启动参数*/ 6 struct /* RAM configuration ARM的开始位置和大小*/ 7 { 8 ulong start; 9 ulong size; 10 } bi_dram[CONFIG_NR_DRAM_BANKS]; 11 } bd_t;