2、添加配置文 a.将smdk2410.h复制为tocore2440.h,其文件修改如下: 1)添加宏#undef CONFIG_SKIP_LOWLEVEL_INIT (line40) 2)注释2410宏定义: //#define CONFIG_S<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />3C2410 1 //#define CONFIG_SBC2410X 1 3)添加2440宏定义: #define CONFIG_S3C2440 1 #define CONFIG_TOCORE2440 1 #define CONFIG_TOCORE2440_LED 1 //添加点灯宏定义 #define CONFIG_S3C2440_NAND_BOOT 1 //Nandflash启动 4)注释CS8900网卡宏定义(在line72添加#if 0,在line76 添加#endif),添加DM9000网卡宏定义: #define CONFIG_DRIVER_DM9000 1 #define CONFIG_DM9000_USE_16BIT 1 #define CONFIG_DM9000_BASE 0x20000300 #define DM9000_IO 0x20000300 #define DM9000_DATA 0x20000304 #define CONFIG_DM9000_NO_SROM 1 #undef CONFIG_DM9000_DEBUG #define CONFIG_NET_MULTI 5)在命令行宏定义中添加如下宏定义: #define CONFIG_CMD_ASKENV #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING #define CONFIG_CMD_NAND #define CONFIG_CMD_SAVEENV
#define CONFIG_BOOTDELAY 3 //设置系统启动等待时间 #define CONFIG_BOOTARGS "console=ttySAC0 root=/dev/nfs " "nfsroot=192.168.2.199:/fs " / "ip=192.168.2.69:" //NFS支持 #define CONFIG_ETHADDR 08:00:3e:26:0a:5b //打开MAC #define CONFIG_IPADDR 192.168.2.69 //定义自身IP #define CONFIG_SERVERIP 192.168.2.105 //定义服务器IP #define CONFIG_BOOTCOMMAND "dhcp; bootm" //打开DHCP //line154之后添加如下宏定义 #define CONFIG_SYS_PROMPT "[tocore2440 ]# " //修改启动标识 #define CONFIG_SYS_LOAD_ADDR 0x31000000 //下载地址 #define CONFIG_ENV_ADDR 0x060000 //断电保存地址 #define CONFIG_ENV_IS_IN_NAND 1 //Nandflash #define CONFIG_ENV_OFFSET 0X60000 //整个寄存器偏移地址 #define CONFIG_ENV_SIZE 0x20000 //ENV分区大小 #define MTDPARTS_DEFAULT "mtdparts=nandflash0:384k(bootloader),"/ "128k(params)," / "5m(kernel)," / "-(root)" //Nandflash默认设置
#define NAND_MAX_CHIPS 1 //Nandflash最大个数 #define CONFIG_MTD_NAND_VERIFY_WRITE //校验 #if defined(CONFIG_TOCORE2440_LED) //点灯宏定义
/* 添加对GPIO寄存器设置的宏定义 */ #define GPIO_CTL_BASE 0x56000000 #define oGPIO_B 0x10 #define oGPIO_CON 0x0 #define oGPIO_DAT 0x4 #define oGPIO_UP 0x8 #endif #define STACK_BASE 0x33f00000 #define STACK_SIZE 0x10000 |
续:minis3c2440嵌入式开发板学习之u-boot移植(二)
最新推荐文章于 2024-05-29 09:31:15 发布