iMX6 NFS启动
1、Tftp下载uImage:
1.1,设置ubuntu
(1) Setup tftp server files
# apt-get install tftpd tftp openbsd-inetd
(2) make a tftp directory Here we make /opt/tftpboot be a tftp directory.
# mkdir /opt/tftpboot
# chmod 777 /opt/tftpboot
(3) Open /etc/inetd.conf and edit it
# gedit /etc/inetd.conf
Add this line:
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /opt/tftpboot
(4)Restarting tftp service
#sudo /etc/init.d/openbsd-inetd restart
可以根据你的uImage文件放在路径,修改上述路径;也可以在/opt/tftpboot目录下生成一个目标连接文件。
1.2,tftp下载uImage
MX6Q SABRESD U-Boot >tftpboot uImage
2、文件系统以NFS方式加载
2.1 ,设置ubuntu
(1), Install NFS server package
# apt-get install nfs-kernel-server
(2), Configure portmap
# dpkg-reconfigure portmap
Select “NO”
(3) ,Configure mounted directory and authority
# gedit /etc/exports
Add the following line at the end of the file:
/home/ rootfs *(rw,sync,no_root_squash)
(4) ,Restart the NFS service
#sudo /etc/init.d/portmap restart
#sudo /etc/init.d/nfs-kernel-server restart
2.2,通过串口设置uboot变量设置
setenv ipaddr 192.168.1.xxx #设置板子IP
setenv serverip 192.168.1.xxx #设置为开发机的IP
setenv bootfile uImage
setenv nfsroot /home/rootfs
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsrootdebug nfsroot=${serverip}:${nfsroot},v3,tcp fec_mac=${ethaddr} video=mxcfb0:dev=ldb,CVBS-TV,if=RGB666,bpp=16'
setenv bootcmd_net 'run bootargs_base bootargs_nfs;bootm'
setenv bootcmd 'tftpboot uImage; run bootcmd_net'
saveenv