1.nfs服务器已经安装好,nfs安装略
测试nfs是否可用:在开发板命令行下使用命令:
#mount –t nfs –o nolock 192.168.1.101:/work/nfs_root /mnt
或者在Linux本机命令行下执行命令:
$mount -t nfs 192.168.1.101:/work/nfs_root /mnt
能在/mnt目录里能看到/work/nfs_root目录里的内容则表示正常
2.将制作好的文件系统解压到Linux机上的/work/nfs_root目录下
3.重启开发板,停在uboot下,输入命令:#setenv bootargs "root=/dev/nfs nfsroot=192.168.1.101:/work/nfs_root ip=192.168.1.102:::::eth0:off console=ttySAC0,115200",记得保存:#saveenv,保存后#reset重启开发板
4.若出现(http://bbs.witech.com.cn/thread-11818-1-1.html)
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
s3c-rtc s3c64xx-rtc: setting system clock to 2000-01-05 00:30:03 UTC (947032203)
dm9000 dm9000.0: eth0: link down
mmc0: new SDHC card at address 1234
dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
mmcblk0: mmc0:1234 SA32G 29.8 GiB
mmcblk0: p1
VFS: Mounted root (nfs filesystem) on device 0:14.
devtmpfs: mounted
Freeing init memory: 172K ----->说明挂接成功
FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
/etc/rc.d/init.d/netd: line 16: /usr/sbin/inetd: not found
mkdir: cannot create directory '/mnt/disk': File exists
Try to bring eth0 interface up......nfs: server 192.168.1.100 not responding, still trying
但是网路又不通,屏幕显示NET WORK starting
则下飞凌新的文件系统或者如:http://bbs.witech.com.cn/thread-11818-1-1.html的方法修改/etc/init.d/ifconfig-eth0文件,修改为(红色部分作改动)
if
[ -f /etc/eth0-setting ] ; then
source /etc/eth0-setting
#if
grep -q "^/dev/root / nfs " /etc/mtab ; then
if grep -q "root=/dev/nfs" /proc/cmdline;then
echo -n NFS root ... > /dev/ttySAC0
else
ifconfig eth0 down
ifconfig eth0 hw ether $MAC
ifconfig eth0 $IP netmask $Mask up
route add default gw $Gateway
fi
echo nameserver $DNS > /etc/resolv.conf