#define CONFIG_DRIVER_DM9000 1
#define CONFIG_DM9000_BASE (0x18000300) /*XM0CSN1*/
#define DM9000_IO (CONFIG_DM9000_BASE)
#define DM9000_DATA (CONFIG_DM9000_BASE+0x4) /*ADDR2*/
//#define CONFIG_DM9000_DEBUG 1
#define CONFIG_DM9000_USE_16BIT 1
#define CONFIG_ETHADDR 08:08:10:12:10:27
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.1.253
#define CONFIG_SERVERIP 192.168.1.159
#define CONFIG_GATEWAYIP 192.168.1.1
2.在board/samsung/smdk6410/smdk6410.c的board_eth_init()函数中加上
#if defined(CONFIG_DRIVER_DM9000)
rc = dm9000_initialize(bis);
#endif
编译后下载运行结果如下:
U-Boot 2012.10 (Nov 06 2012 - 16:20:20) for SMDK6410
CPU: S3C6410@533MHz
Fclk = 533MHz, Hclk = 133MHz, Pclk = 66MHz (ASYNC Mode)
Board: SMDK6410
DRAM: 256 MiB
WARNING: Caches not enabled
Flash: *** failed ***
NAND: No oob scheme defined for oobsize 218
2048 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: dm9000
Hit any key to stop autoboot: 0
SMDK6410 # printenv
baudrate=115200
bootargs=console=ttySAC,115200
bootcmd=nand read 0x50018000 0x60000 0x1c0000;bootm 0x50018000
bootdelay=5
ethact=dm9000
ethaddr=08:08:10:12:10:27
gatewayip=192.168.1.1
ipaddr=192.168.1.253
netmask=255.255.255.0
serverip=192.168.1.120
stderr=serial
stdin=serial
stdout=serial
Environment size: 318/16380 bytes
SMDK6410 # ping 192.168.1.120
dm9000 i/o: 0x18000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 08:08:10:12:10:27
operating at 100M full duplex mode
Using dm9000 device
host 192.168.1.120 is alive
SMDK6410 #
可以看到已经连接成功。暂时没有加上tftp等命令。
上一篇:UBOOT-2012-10在OK6410平台的移植(四)uboot 2012.10 raise: Signal # 8 caught的问题
相关热门文章 评论热议