为了以后方便驱动的开发和测试,不用每次将编写的程序文件放在SD里面,所以采用文件系统挂载的方式,方便快捷!
系统环境: ubuntu
NFS挂载步骤:
1、配置ubuntu下NFS
sudo apt-get install portma
sudo apt-get install nfs-kernel-server
2、在主机目录下建立共享文件夹 (这里的路径设为:/nfs/root)
mkdir /nfs
chmod 777 /nfs
mkdir /nfs/root
chmod 777 /nfs/root
3、修改 /etc/exports文件
执行 gedit /etc/exports
在文本中添加
/nfs/root *(rw,sync,no_root_squash)
4、重启nfs服务
/etc/init.d/nfs restart
5、设置主机IP和开发板IP
同时,设置虚拟机的网络连接方式为桥连接
6、测试是否连通
7、挂载文件系统
mount -t nfs 192.168.0.231:/nfs/root /mnt -o nolock(根据自己的IP作修改)