赞
踩
1.无法动态获得ip地址 一直是Sending DHCPrequests ...
默认u-boot配置为ip=dhcp的方式,u-boot会寻找dhcp服务器的地址。你可以手动设置u-boot的环境变量使ip为静态ip即可。注意ip地址根据你实际的情况来修改,格式为:ip=ip地址:网关:掩码。
setenvbootargs 'console=ttyS0,115200n8 noinitrd rw ip=192.168.1.10:192.168.1.1:255.255.255.0root=/dev/nfs nfsroot=192.168.1.110:/home/rhel/filesys,nolock mem=64M'
若还是不行,可以直接ip=off
setenv bootcmd'nand read 0x82000000 0x500000 0x400000; nboot 0x80700000 0x0 0x100000; bootm'
setenv bootargs'console=ttyS0,115200n8 ip=off root=/dev/ram0 rw initrd=0x82000000,5M mem=64M'
然后q推出运行,再mount -t nfs -o nolock 192.168.1.110:/home/rhel/filesys /mnt
挂载NFS文件系统
Looking up port of RPC 100005/1 on 192.168.1.110
A. 忘了打开虚拟机
B. 尝试关于防火墙
service iptables stop
iptables:清除防火墙规则: [确定]
iptables:将链设置为政策 ACCEPT:filter [确定]
iptables:正在卸载模块: [确定]
然后重新启动
3.由nand flash启动的情况下,BKFrame才能顺利出现抓拍图片。
当在mount状态下调试,BKFrame不会出现抓拍图片
解决方法: 由nand flash启动的情况下, 抓拍正常,点击保存文件.
然后在mount状态下,点打开文件,选择文件,然后下传参数,此时情况应正常.
如不正常,可重启.
如还不正常,可尝试将/home/rhel/filesys/root文件全部更新为最新文件.
注意:要修改autorun.sh,从nand flash启动, USR_ROOT_PATH=/mnt/nand
用nfs方式调试时, 因为make install后将生成文件放入/home/rhel/filesys/root, mount时路径是192.168.1.110:/home/rhel/filesys ,故USR_ROOT_PATH=/root
2. mount:RPC:Timed out
解决方案:由于RPC 协议没运行;启动portmap 服务;
也有可能是防火墙问题;Server/Client 均有可能。
3.No route to host
防火墙被打开,关闭防火墙。
主机和虚拟机的ip没有设对
4.不能挂载nfs
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Gateway not on directlyconnected network.
Looking up port of RPC 100003/2 on192.168.0.3
portmap: server 192.168.0.3 not responding,timed out
Root-NFS: Unable to get nfsd port numberfrom server, using default
Looking up port of RPC 100005/1 on192.168.0.3
portmap: server 192.168.0.3 not responding,timed out
Root-NFS: Unable to get mountd port numberfrom server, using default
mount: server 192.168.0.3 not responding,timed out
Root-NFS: Server returned error -5 whilemounting /nfs
VFS: Unable to mount root fs via NFS,trying floppy.
VFS: Cannot open root device"nfs" or unknown-block(2,0)
Please append a correct "root="boot option
Kernel panic - not syncing: VFS: Unable tomount root fs on unknown-block(2,0)
这种情况通常是nfs配置问题。
确认uboot的bootargs参数里和nfs相关的ip地址信息设置是否正确,以及Host机/etc/exports配置无误,重起nfs服务,重新尝试连接。另外还需要注意bootargs内console和mem两个参数的设置。kernel2.6后console最好设置为ttySAC0,mem也要根据开发板实际情况设置正确。
setenv bootargs 'console=ttyS0,115200n8noinitrd rwip=192.168.1.10:192.168.1.110:192.168.1.1:255.255.255.0::eth0:on root=/dev/nfsnfsroot=192.168.1.110:/home/rhel/filesys,nolock mem=64M'
nfsroot=192.168.1.110:/home/rhel/filesys,nolock,proto=tcpconsole=ttySAC0,115200其中192.168.1.10为目标板IP,192.168.1.110为主机IP,192.168.1.1是网关IP,255.255.255.0为子网掩码。/home/rhel/filesys是主机NFS根目录。
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
This parameter tells the kernel how toconfigure IP addresses of devices and also how to set up the IP routing table.It was originally called `nfsaddrs', but now the boot-time IP configurationworks independently of NFS, so it was renamed to `ip' and the old name remainedas an alias for compatibility reasons.
If this parameter is missing from the kernel command line, all fields are assumedto be empty, and the defaults mentioned below apply. In general this means thatthe kernel tries to configure everything using autoconfiguration.
The <autoconf> parameter can appear alone as the value to the `ip' parameter(without all the ':' characters before). If the value is "ip=off"or "ip=none", no autoconfiguration will take place, otherwise autoconfigurationwill take place. The most common way to use this is "ip=dhcp".
<client-ip> IP address of the client.
Default: Determined using autoconfiguration.
<server-ip> IP address of the NFS server. If RARP isused to determine the client address and this parameter is NOT empty only repliesfrom the specified server are accepted.
Only required for NFS root. That is autoconfiguration will not be triggered ifit is missing and NFS root is not in operation.
Default: Determined using autoconfiguration.
The address of the autoconfiguration server is used.
<gw-ip> IP address of a gateway if the server is on adifferent subnet.
Default: Determined using autoconfiguration.
<netmask> Netmask for local network interface. Ifunspecified the netmask is derived from the client IP address assuming classfuladdressing.
Default: Determined using autoconfiguration.
<hostname> Name of the client. May be supplied byautoconfiguration, but its absence will not trigger autoconfiguration.
Default: Client IP address is used in ASCII notation.
<device> Name of network device to use.
Default: If the host only has one device, it is used.
Otherwise the device is determined using autoconfiguration. This is done bysending autoconfiguration requests out of all devices, and using the devicethat received the first reply.
<autoconf> Method to use for autoconfiguration. In thecase of options which specify multiple autoconfiguration protocols,requests aresent using all protocols, and the first one to reply is used.
Only autoconfiguration protocols that have been compiled into the kernel willbe used, regardless of the value of this option.
off or none: don't use autoconfiguration(do static IP assignment instead) on orany: use any protocol available in the kernel
(default)
dhcp: use DHCP
bootp: use BOOTP
rarp: use RARP
both: use both BOOTP and RARP but notDHCP
(old option kept for backwards compatibility)
Default: any
关于NFS挂载的提示:
挂载中添加参数nolock可以加快挂载速度
挂载中添加tcp参数,可以解决挂载后,客户端操作服务器返回 nfs server no responding 的错误。
setenvbootargs 'console=ttyS0,115200n8 noinitrd rw ip=192.168.1.10:192.168.1.110:192.168.1.1:255.255.255.0::eth0:off root=/dev/nfs nfsroot=192.168.1.110:/home/rhel/filesys,nolock,tcpmem=64M'
setenv bootargs 'console=ttySAC0,115200n8noinitrd rw ip=192.168.1.10:192.168.1.110:192.168.1.1:255.255.255.0::eth0:on root=/dev/nfsnfsroot=192.168.1.110:/home/rhel/filesys,nolock,tcp mem=64M'
对于nfs根文件系统的挂载需要确保一下几个方面:
1) Bootargs必须配置正确
2) 必须确保开发板能和nfs主机网络是联通,检查虚拟机和主机的网址是否设了.
为了确保开发板和nfs主机联通,可以在u-boot下测试。然后正确配置nfs。
3) 确保nfs配置正确且根文件系统正确
可以执行servicenfs restart 启动nfs服务(fedora/redhat)
可以执行showmount -e 检查nfs输出路径中是否包含根文件系统目录
4) 为了确保挂载速度和操作可靠性
关闭nfs主机防火墙,关闭虚拟机所在主机的防火墙。
在挂载的时候,添加nolock和tcp参数。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。