查看主机的hostname:ubuntu
SMDK6410 # setenv bootargs "root = /dev/nfs
nfsroot=192.168.0.128:/forlinx/root/FileSystem-Yaffs2
ip=192.168.0.103:192.168.0.128:192.168.0.1:255.255.255.0:ubuntu:eth0:o
ff console=ttySAC0,115200"
SMDK6410 # saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
SMDK6410 # printenv
bootcmd=nand read 0xc0008000 0x200000 0x500000;bootm 0xc0008000
bootdelay=1
baudrate=115200
ethaddr=00:40:5c:26:0a:5b
netmask=255.255.255.0
ipaddr=192.168.0.103
gatewayip=192.168.0.1
serverip=192.168.0.128
stdin=serial
stdout=serial
stderr=serial
bootargs=root=/dev/nfs
nfsroot=192.168.0.128:/forlinx/root/FileSystem-Yaffs2
ip=192.168.0.103:192.168.0.128:192.168.0.1:255.255.255.0:ubuntu:eth0:o
ff console=ttySAC0,115200
Environment size: 420/524284 bytes
SMDK6410 #
setenv serverip 192.168.0.128 PC的ubuntu端的IP是开发板的serverIP
setenv ipaddr 192.168.0.103
在ubuntu端使用hostname命令获得电脑端的ubuntu
这里不是开发手册上面写的witech.com.cn
同时要关闭ubuntu端的防火墙
sudo ufw disable
sudo ufw status查看防火墙状态
要打开nfs以及端口服务
service portmap restart
service nfs-kernel-server restart
service portmap status
挂载nfs网络文件系统
mount -t nfs -o tcp,nolock 192.168.80.110:/home2/djliu/001 /home