制作、烧写根文件系统,使用NFS,变异使用驱动程序
因为mkyaffs2image不在linux 系统中 因此使用ftp将文件传送到linux中之后 ,将文件放到 /bin目录下 并在bin目录下为mkyaffs2image加上可执行权限
过程如下:
将mkyaffs2image 从当前文件目录拷贝到/bin文件目录下
sudo cp mkyaffs2image /bin/
为mkyaffs2image 加上可执行权限
sudo chmod +x /bin/mkyaffs2image
输入mkfs+Tab键可以将相关的命令全部列出来
在经过上述的操作之后已经可以在linux系统上使用mkyaffs2image编译文件了
再然后使用
mkyaffs2image
反馈:
mkyaffs2image: image building tool for YAFFS2 built Jan 6 2010
usage: mkyaffs2image dir image_file [convert]
dir the directory tree to be converted
image_file the output file to hold the image
'convert' produce a big-endian image from a little-endian machine
可以看出使用mkyaffs2image的方式为:
mkyaffs2image fs_mini_mdev fs.yaffs2 //fs.yaffs2就是生成的目标文件
将编译好的文件通过,nfs下载到开发板(网络)
nfs 30000000 192.168.1.118:/work/nfs_root/tmp/fs.yaffs2
使用 nfs 下载要求开发板设置好了 gatewayip 若是没有设置好 在uboot中使用
set gatewayip 192.168.1.103 //设置 gatewayip 然后在使用nfs下载命令,剩下的和tftp使用过程一样
nfs 30000000 192.168.1.118:/work/fs.yaffs2
- 制作烧写根文件系统,使用NFS,编译使用驱动程序
- 仅用flsah上的根文件系统启动之后,手工moubt nfs
- 使用
mount -t nfs -o nolock,vers=2 192.168.1.118:/work/nfs_root /mnt
//将虚拟机上的文件 /work过载到 开发板的/mnt文件目录下
- 使用nfs作为根文件系统来启动
参数设置参考
服务器
nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
开发板
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
参考
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.1.118:/work/nfs_root/tmp/fs_mini_mdev ip=192.168.1.17:192.168.1.118:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0
set bootargs noinitrd root=/dev/nfs nfsroot=192.168.1.118:/work/nfs_root/tmp/fs_mini_mdev init=/linuxrc console=ttySAC0