主要需要这些文件:
#sudo apt-get install xinetd tftpd
nfs-kernel-server minicom build-essential libncurses5-dev uboot-mkimage
autoconf automake
1) 安装完后,需要修改/etc/exports文件
#gedit /etc/exports
增加nfs文件目录
/home/qiuweibo/tftproot/rootfs-nfs *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
2) #/etc/init.d/nfs-kernel-server restart //重启NFS服务
到这里只能说PC端的NFS server搭建好了
uboot环境变量
//正常Uboot中nand启动命令
PRINT:
nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${loadaddr}
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
SET:
//NFS命令如下
SET:
setenv nandargs setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=172.18.50.235:/home/qiuweibo/tftproot/rootfs-nfs ip=172.18.48.95:172.18.50.235:172.18.51.254:255.255.252.0::eth0:off
U-Boot# print ethaddr <-- Check if MAC address is assigned and is unique
U-Boot# setenv ethaddr <-- Set only if not present already, format uv:yy:zz:aa:bb:cc
U-Boot# setenv serverip
U-Boot# setenv rootpath /location/of/nfsroot/export
U-Boot# setenv bootcmd net_boot
阅读(626) | 评论(0) | 转发(0) |