Chinaunix首页 | 论坛 | 博客
  • 博客访问: 17534
  • 博文数量: 12
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2013-04-15 18:31
文章分类
文章存档

2013年(12)

我的朋友

分类: LINUX

2013-04-15 18:59:11

1.屏蔽掉/include/configs/smdk6410.h中关于CS8900宏定义这部分,加上DM9000的定义:
#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等命令。


阅读(343) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~