免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1770 | 回复: 0
打印 上一主题 下一主题

6410通过nfs挂载根文件系统 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-26 17:21 |只看该作者 |倒序浏览

                前提条件:
1.正确配置PC及板子上的网络
2.正确配置PC上的NFS服务及NFS共享目录
3.在NFS共享目录准备好根文件系统的内容及内核
在此不详述
进入uboot:
SMDK6410#
-------------------------------------
正常情况下(uboot 启动nand flash上的内核及根文件系统)时参数配置为:
bootdelay=3
baudrate=115200
ethaddr=00:40:5c:26:0a:5b
ipaddr=192.168.0.20
gatewayip=192.168.0.2
netmask=255.255.255.0
serverip=192.168.0.172
bootcmd=nand read c0008000 40000 3c0000; bootm c0008000
stdin=serial
stdout=serial
stderr=serial
通过nfs挂载PC上存在的根文件系统时参数配置为:
bootdelay=3
baudrate=115200
ethaddr=00:40:5c:26:0a:5b
ipaddr=192.168.0.20
gatewayip=192.168.0.2
netmask=255.255.255.0
serverip=192.168.0.172
bootargs=noinitrd root=/dev/nfs init=/linuxrc nfsroot=192.168.0.172:/home/hanjinlai/nfs_root ip=192.168.0.20:192.168.0.172:192.168.0.254:255.255.255.0::eth0:off console=ttySAC0,115200
bootcmd=nfs c0008000 192.168.0.172:/home/hanjinlai/nfs_root/zImage_mybuild ; bootm c0008000
stdin=serial
stdout=serial
stderr=serial
通过以上对比我们知道要通过nfs挂载根文件系统需要做的步骤有两步:
1.设置uboot参数bootargs:
SMDK6410# setenv bootargs noinitrd root=/dev/nfs init=/linuxrc nfsroot=192.168.0.172:/home/hanjinlai/nfs_root  ip=192.168.0.20:192.168.0.172:192.168.0.254:255.255.255.0::eth0:off console=ttySAC0,115200
2.改变参数bootcmd的值:
SMDK6410# setenv bootcmd nfs c0008000 192.168.0.172:/home/hanjinlai/nfs_root/zImage_mybuild \; bootm c0008000
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/96294/showart_1978723.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP