主题 : dm9000网卡移植咨询 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 3870
精华: 2
发帖: 20
金钱: 240 两
威望: 240 点
综合积分: 80 分
注册时间: 2009-02-13
最后登录: 2009-07-31
楼主  发表于: 2009-03-24 23:36

 dm9000网卡移植咨询

我用linux-2.6.22.2内核  移植了网卡驱动 显示如下信息, 帮我看下我的网卡驱动移植成功没有?

如果成功了为什么我无法NFS,  是不是MAC地址未修改的原因?
Uncompressing Linux.............................................................
...................................... done, booting the kernel.
Linux version 2.6.22.2 (root@hong) (gcc version 3.4.1) #2 Tue Mar 24 23:08:50 CS
T 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61592KB available (2820K code, 305K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
yaffs Mar 24 2009 23:05:38 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: invalid bpp 16
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
dm9000 Ethernet Driver
eth%d: Invalid ethernet MAC address.  Please set using ifconfig
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: ff:ff:ff:ff:ff:ff
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=4 39ns, Twrph1=1 9ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00050000 : "vivi"
0x00050000-0x00250000 : "kernel"
0x00250000-0x02a50000 : "YAFFS"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 124K
init started: BusyBox v1.7.0 (2008-01-22 10:04:09 EST)
starting pid 735, tty '': '/etc/init.d/rcS'
eth0: link down
mount: mounting tmpfs on /tmp failed: Invalid argument

Please press Enter to activate this console.
starting pid 738, tty '/dev/ttySAC0': '/bin/sh'
# ifconfig
eth0      Link encap:Ethernet  HWaddr FF:FF:FF:FF:FF:FF
          inet addr:192.168.1.17  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:51 Base address:0xe300

#
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-03-25 07:41
我没记错的话,FF:FF:FF:FF是以太网的广播地址,想要网卡正常工作,你需要给它一个合法的MAC地址.至于怎么做,要看你现在用的DM9000的源代码
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 3870
精华: 2
发帖: 20
金钱: 240 两
威望: 240 点
综合积分: 80 分
注册时间: 2009-02-13
最后登录: 2009-07-31
2楼  发表于: 2009-03-25 12:51
引用第1楼kasim于2009-03-25 07:41发表的  :
我没记错的话,FF:FF:FF:FF是以太网的广播地址,想要网卡正常工作,你需要给它一个合法的MAC地址.至于怎么做,要看你现在用的DM9000的源代码



谢谢你的回答  我确实没有设置MAC  甚至没有使能中断,仅仅是将驱动注册了而已! (网上资料太杂)

等我全部弄好 编译通过之后  运行显示如下代码
# ifconfig
eth0      Link encap:Ethernet  HWaddr FF:FF:FF:FF:FF:FF
          inet addr:192.168.1.17  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:51 Base address:0xe300

# eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1

# ping 192.168.1.80
PING 192.168.1.80 (192.168.1.80): 56 data bytes
64 bytes from 192.168.1.80: seq=0 ttl=64 time=1.911 ms
64 bytes from 192.168.1.80: seq=1 ttl=64 time=0.598 ms
64 bytes from 192.168.1.80: seq=2 ttl=64 time=0.603 ms
64 bytes from 192.168.1.80: seq=3 ttl=64 time=0.598 ms
64 bytes from 192.168.1.80: seq=4 ttl=64 time=0.601 ms
64 bytes from 192.168.1.80: seq=5 ttl=64 time=0.851 ms
64 bytes from 192.168.1.80: seq=6 ttl=64 time=0.868 ms
64 bytes from 192.168.1.80: seq=7 ttl=64 time=0.862 ms
64 bytes from 192.168.1.80: seq=8 ttl=64 time=0.601 ms
64 bytes from 192.168.1.80: seq=9 ttl=64 time=0.588 ms
64 bytes from 192.168.1.80: seq=10 ttl=64 time=0.850 ms
64 bytes from 192.168.1.80: seq=11 ttl=64 time=0.832 ms
[1] + Stopped                    ping 192.168.1.80
#



这已经表示表示我的网卡驱动移植成功了么????    HWaddr FF:FF:FF:FF:FF:FF  可能是位置不对,但我肯定设置了!
不过还是能ping通主机的~~~
准备NFS挂接开发主机的文件系统 显示如下信息


Copy linux kernel from 0x00050000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "console=ttySAC0 root=/dev/nfs nfsroot=192.168.1.11:/opt/
FriendlyARM/mini2440/root_nfs ip=192.168.1.17:192.168.1.11:192.168.1.1:255.255.2
55.0:sbc2440.arm9.net:eth0:off"
MACH_TYPE = 362
NOW, Booting Linux......
Uncompressing Linux.............................................................
...................................... done, booting the kernel.
Linux version 2.6.22.2 (root@hong) (gcc version 3.4.1) #8 Wed Mar 25 12:28:18 CS
T 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: console=ttySAC0 root=/dev/nfs nfsroot=192.168.1.11:/opt/Fri
endlyARM/mini2440/root_nfs ip=192.168.1.17:192.168.1.11:192.168.1.1:255.255.255.
0:sbc2440.arm9.net:eth0:off
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61592KB available (2820K code, 305K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, DVS off
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
yaffs Mar 24 2009 23:05:38 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: invalid bpp 16
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
dm9000 Ethernet Driver
eth%d: Invalid ethernet MAC address.  Please set using ifconfig
eth0: dm9000 at c485e300,c4860304 IRQ 51 MAC: ff:ff:ff:ff:ff:ff
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=4 39ns, Twrph1=1 9ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit
)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00050000 : "vivi"
0x00050000-0x00250000 : "kernel"
0x00250000-0x02a50000 : "YAFFS"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link down
IP-Config: Complete:
      device=eth0, addr=192.168.1.17, mask=255.255.255.0, gw=192.168.1.1,
     host=sbc2440, domain=, nis-domain=arm9.net,
     bootserver=192.168.1.11, rootserver=192.168.1.11, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.11
eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Looking up port of RPC 100005/1 on 192.168.1.11
VFS: Mounted root (nfs filesystem).
Freeing init memory: 124K
Warning: unable to open an initial console.



这难道是我的文件系统不对还是网络有问题???????
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-03-25 18:27
那是因为文件系统缺少必要的设备节点,比如/dev/console,/dev/null
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 3870
精华: 2
发帖: 20
金钱: 240 两
威望: 240 点
综合积分: 80 分
注册时间: 2009-02-13
最后登录: 2009-07-31
4楼  发表于: 2009-03-25 21:27

 回 3楼(kasim) 的帖子

谢谢您的回答  果然是里面没有文件~!!    

我在图形界面复制的系统到NFS文件夹里     居然那两个文件没复制进去!

然后再次把NFS启动一下  挂接成功!

为了感谢论坛的帮助

准备把我移植linux-2.6.22.2内核步骤和DM9000驱动移植总结下发布出来哈(不过本人还是新手,希望你能帮忙改下错误)
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2009-03-25 22:17
建立nfs文件系统, 最安全的方法是用root权限把做好的文件系统压缩包解压缩到nfs目标目录, 如果要用cp命令, 也要用类似sudo cp -a /path/to/source/* /path/to/nfs/dest. 否则像/dev目录下的设备节点文件这种特殊的文件, 一般的复制肯定会出错
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 63731
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2012-02-23
最后登录: 2012-08-27
6楼  发表于: 2012-02-23 21:35
我在进行网卡驱动移植时出现这样的问题
dm9000 Ethernet Driver, V1.31
dm9000 dm9000.0: read wrong id 0x002a291e
dm9000 dm9000.0: read wrong id 0x2b002900
dm9000 dm9000.0: read wrong id 0x2b2a2928
dm9000 dm9000.0: read wrong id 0x2b2a2928
dm9000 dm9000.0: read wrong id 0x002a0028
dm9000 dm9000.0: read wrong id 0x2b2a0028
dm9000 dm9000.0: read wrong id 0x2b2a2928
dm9000 dm9000.0: read wrong id 0x2b2a2928
dm9000 dm9000.0: wrong id: 0x2b2a2928
dm9000 dm9000.0: not found (-19).
这个怎么解决啊
级别: 新手上路
UID: 63731
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2012-02-23
最后登录: 2012-08-27
7楼  发表于: 2012-02-23 21:37
我用的内核是linux-2.6.30.4版本的
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2012-02-26 09:46
引用第6楼活宝贝于2012-02-23 21:35发表的  :
我在进行网卡驱动移植时出现这样的问题
dm9000 Ethernet Driver, V1.31
dm9000 dm9000.0: read wrong id 0x002a291e
dm9000 dm9000.0: read wrong id 0x2b002900
dm9000 dm9000.0: read wrong id 0x2b2a2928
.......

1. 确保Memory controller中DM9000A对应的部分(mini2440上是nGCS4)正确初始化了
2. 将正确的data/command IO地址传递给了内核中的DM9000驱动。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."