Linux主机ip设置为192.168.0.77,通过u-boot设置开发板自身ip为192.168.0.78,按住PC机的空格键,复位开发板进入u-boot命令行方式,重新设置Linux的启动参数如下:
setenv linux_arg root=/dev/nfs nfsroot=192.168.0.77:/armsys2440/root ip=192.168.0.78:192.168.0.77:192.168.0.1:255.255.255.0:armsys.hzlitai.com:eth0:off console=ttyS0
保存设置后运行如下:
IP-Config: Complete:
device=eth0, addr=192.168.0.78, mask=255.255.255.0, gw=192.168.0.1,
host=armsys, domain=, nis-domain=hzlitai.com,
bootserver=192.168.0.77, rootserver=192.168.0.77, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
Looking up port of RPC 100003/2 on 192.168.0.77
Looking up port of RPC 100005/1 on 192.168.0.77
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing init memory: 80K
init started: BusyBox v1.00-pre10 (2005.10.13-02:40+0000) multi-call binary
Starting pid 15, console /dev/console: '/etc/init.d/rcS'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^ Welcome to root filesystem! ^
^ www.hzlitai.com.cn ^
^ ^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[30/Sep/1989:08:15:07 +0000] boa: server version Boa/0.94.13
[30/Sep/1989:08:15:07 +0000] boa: server built Feb 28 2004 at 21:47:23.
[30/Sep/1989:08:15:07 +0000] boa: starting server pid=38, port 80
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
/etc/init.d/rcS: 49: /bin/hostname: Network is unreachable
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
/etc/init.d/rcS: 47: qtopia: Network is unreachable
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
RPC: sendmsg returned error 101
nfs: RPC call returned error 101
从信息中可以看出,NFS已经挂载上,出错的原因应该是在挂载上NFS后读rcS脚本文件时对网卡的IP或网关重新配置了,查看mount的根文件系统下/etc/init.d/rcS文件,发现有一行为
/sbin/ifconfig eth0 192.168.253.9 netmask 255.255.255.0 up
将该行注释掉,运行成功。