我把内核移植好之后,挂载nfs出错,我的板子是mini4020.
我的uboot环境变量如下
bootdelay=1
baudrate=115200
ethaddr=00:50:c2:1e:af:fb
filesize=80d570
fileaddr=31000000
gatewayip=192.168.0.3
ipaddr=192.168.0.2
serverip=192.168.0.1
bootcmd=nand read 0x30007fc0 0x00100000 0x00200000;bootm 0x30007fc0
netmask=255.255.255.0
stdin=serial
stdout=serial
stderr=serial
bootargs=root=/dev/nfs rw nfsroot=192.168.0.1:/nfs ip=192.168.0.2:192.168.0.1:192.168.0.3:255.255.255.0:sep4020:eth0:off console=ttyS0,115200
Environment size: 428/16380 bytes
但是启动之后出现如下信息
Starting kernel ...
Linux version 2.6.16 (root@kyon-desktop) (gcc version 3.4.1) #1101 Wed Mar 11 17:16:50 CST 2009
CPU: ARM720T [41807202] revision 2 (ARMv4T)
Machine: 4020 board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.1:/nfs/root ip=192.168.0.2:192.168.0.1:192.168.0.3:255.255.255.0:sep4020:eth0:off console=ttyS0,115200
PID hash table entries: 256 (order: 8, 4096 bytes)
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: 32MB = 32MB total
Memory: 29500KB available (2192K code, 568K data, 116K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
sep_ether: sepether_probe!
platform_device_register sep4020_fb_set_platdata
Generic PHY: Registered new driver
SCSI subsystem initialized
NetWinder Floating Point Emulator V0.97 (double precision)
NTFS driver 2.1.26 [Flags: R/O].
fuse init (API version 7.6)
yaffs Mar 11 2009 17:11:10 Installing.
Initializing Cryptographic API
io scheduler noop registered
io scheduler cfq registered (default)
The 320*240 LCD is install------------------------------------------>
Console: switching to colour frame buffer device 40x30
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x10005000 (irq = 24) is a 16450
serial8250.0: ttyS1 at MMIO 0x10006000 (irq = 23) is a 16450
serial8250.0: ttyS2 at MMIO 0x10007000 (irq = 22) is a 16450
serial8250.0: ttyS3 at MMIO 0x10008000 (irq = 21) is a 16450
RAMDISK driver initialized: 16 RAM disks of 200000K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
dm9000 Ethernet Driver
sepether_init,platform_driver_register!
eth%d: The ether is working under RMII mode
eth0: Link now 10-HalfDuplex
eth0: sep ethernet at 0xe1003000 int=28 10M-HalfDuplex (00:50:c2:1e:af:fb)
eth0: Davicom 9196 PHY (Copper)
Cronyx Ltd, Synchronous PPP and CISCO HDLC (c) 1994
Linux port (c) 1998 Building Number Three Ltd & Jan "Yenya" Kasprzak.
SCSI Media Changer driver v0.25
blkmtd: version $Revision: 1.27 $
blkmtd: error: missing `device' name
block2mtd: version $Revision: 1.30 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "U-boot"
0x00100000-0x00600000 : "linux 2.6.16 kernel"
0x00600000-0x01e00000 : "root"
0x01e00000-0x04000000 : "user"
sep4020sdi_probe........................
the resource num is 2
MMC/SD initialisation done.the irq num is 12
UDA1341 audio driver initialized
NET: Registered protocol family 2
sep4020_mci: IRQ clear imask.
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
SCTP: Hash tables configured (established 1024 bind 2048)
TIPC: Activated (compiled Mar 11 2009 17:12:23)
NET: Registered protocol family 30
TIPC: Started in single node mode
sepether_open!
<6>eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down.
eth0: Link down
然后一直不停地打印出“eth0: Link down”。
我该过bootargs很多次,但都不见效果,
sudo service portmap restart
sudo ufw disable
sudo service portmap restart
我也执行过,还是没用。我把nfs的export文件贴出来
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
/nfs *(rw,sync,no_root_squash,)
还请各位指教,为什么我挂载nfs的时候会不停的出现“eht0:link down”?谢谢!
4 个解决方案
应该是你的网卡驱动没有配置好。你先看看IP多少,能否ping得通主机呀。
我从板子可以PING通主机,但是主机PING不通板子。我曾经试过配置网卡驱动,但编译之后,在板子上跑不起来,是不是UBOOT的问题?还望指教!
serverip=192.168.0.1
你自己的主机地址,是不是和路由器的ip地址冲突了。
还有就是你先测一下你配置的nfs成功没有啊。
问题查出来了,是网线的问题,应该用交叉网线,而我用的是直连网线。