續:minis3c2440嵌入式開發板學習之u-boot移植(二)

 

2、添加配置文件<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
    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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章