1、配置网络部分,主要是使能CONFIG_IP_PNP以在2中能够看到Root file system on NFS选项
Networking support
Networking options
TCP/IP networking
IP: kernel level autoconfiguration
[*] IP: DHCP support
[*] IP: BOOTP support
2、配置开启nfs服务
File systems --->
Network File Systems --->
<*> NFS client support
[*] NFS client support for NFS version 3
[*] NFS client support for the NFSv3 ACL protocol extension
[*] NFS client support for NFS version 4 (EXPERIMENTAL)
[*] NFS client support for NFSv4.1 (DEVELOPER ONLY)
[*] Root file system on NFS
3.make uImage
4、在uboot中设置如下启动参数(IP根据实际使用更改)
setenv bootargs init=/linuxrc console=ttySAC0 bootdelay=10 root=/dev/nfs rw nfsroot=192.168.1.100:/opt/EmbedSky/nfs_root,v3,tcp ip=192.168.1.103:192.168.1.100:192.168.1.1:255.255.255.0::eth0:off
5内核打印命令行检查参数设置是否正确
Kernel command line: console=ttySAC0,115200 init=/init video=mxcfb0:dev=lcd,CLAA-WVGA,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=48M vmalloc=400M androidboot.console=ttySAC0 androidboot.hardware=freescale root=/dev/nfs ip=192.168.1.103 fec_mac=12:32:43:34:21:43 nfsroot=192.168.1.100:/opt/EmbedSky/nfs_root,v3,tcp
6检查/opt/EmbedSky/nfs_root/etc/init.d/rcS,去掉网卡操作相关的指令rcS
#ifconfig lo 127.0.0.1
#net_set &
7.挂载成功