1、bd_t结构体:用于保存开发板相关的参数
================================================================================================
2、gd_t结构体:成员主要是系统的初始化参数
在include/am-arm/global_data.h定义:
在include\asm-arm\u-boot.h
typedef struct bd_info {
int bi_baudrate; /* serial console baudrate */
unsigned long bi_ip_addr; /* IP Address */
unsigned char bi_enetaddr[6]; /* Ethernet adress MAC地址*/
struct environment_s *bi_env;
ulong bi_arch_number; /* unique id for this board 板子ID*/
ulong bi_boot_params; /* where this board expects params 启动参数*/
struct /* RAM configuration :RAM配置*/
{
ulong start;
ulong size;
} bi_dram[CONFIG_NR_DRAM_BANKS];
#ifdef CONFIG_HAS_ETH1//如果有定义第二块网卡就···,实际没有定义,忽略
/* second onboard ethernet port */
unsigned char bi_enet1addr[6];
#endif
} bd_t;
主要使用于armlinux.c文件用来定义u-boot传递给kernel的参数================================================================================================
2、gd_t结构体:成员主要是系统的初始化参数
在include/am-arm/global_data.h定义:
typedef struct global_data {
bd_t *bd;
unsigned long flags; //状态标志
unsigned long baudrate; //波特率
unsigned long have_console; /* serial_init() was called 串口初始化标识*/
unsigned long reloc_off; /* Relocation Offset 重定位偏移,实际定向的位置与编译连接时指定的位置之差,一般为0*/
unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Checksum of Environment valid? */
unsigned long fb_base; /* base address of frame buffer */
#ifdef CONFIG_VFD
unsigned char vfd_type; /* display type */
#endif
#if 0
unsigned long cpu_clk; /* CPU clock in Hz! */
unsigned long bus_clk;
unsigned long ram_size; /* RAM size */
unsigned long reset_status; /* reset status register at boot */
#endi