imx6q 与主机互相ping不通
刚从飞凌买的imx6q的板子,想通过NFS系统进行后期应用程序的开发调试,但出师不利,6q和主机ping不通,头大了,板子与主机、虚拟机(win7和Ubuntu14.04能够相互ping通)都不能ping通,uboot阶段通过命令行
setenv 设置了开发板的ip/netmask/serverip/nfsroot信息并saveenv保存好,板子和主机及
虚拟机中的网络都设置在同一网段(板子与主机直接通过一根网线连接,主机无线上网,虚
拟机中添加一网络适配器用于连接有线网卡(连接开发板,网段的设置为主机和开发板同一
网段,无线网卡的网段未设置)),开发板ping主机后,打印
MX6Q SABRESD U-Boot > ping 192.168.1.7
Trying FEC0
PHY indentify @ 0x1 = 0x004dd074
FEC: Link is Up 796d
*** ERROR: `ethaddr' not set
Trying FEC0
FEC: Link is Up 796d
ping failed; host 192.168.1.8 is not alive
板子的配置是:
MX6Q SABRESD U-Boot > print
bootdelay=3
baudrate=115200
ipaddr=192.168.1.103
netmask=255.255.255.0
loadaddr=0x10800000
rd_loadaddr=(0x1300000)
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp
nfsroot=${serverip}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm
bootargs_mmc=setenv bootargs ${bootargs} ip=none root=/dev/mmcblk0p1 rootwait
bootcmd_mmc=run bootargs_base bootargs_mmc; mmc dev 3; mmc read ${loadaddr} 0x800
0x2900; bootm
bootcmd=run bootcmd_mmc
ethact=FEC0
serverip=192.168.1.8
nfsroot=/tftpboot/rootfs
stdin=serial
stdout=serial
stderr=serial
Environment size: 705/8188 bytes
不知道原因出在哪儿了,还望指教。
本帖最后由 w-oasis.com 于 2016-4-7 16:28 编辑
提示的错误信息`ethaddr' not set也没发现啊,开发板ping自己也是同样的提示:MX6Q SABRESD U-Boot > ping 192.168.1.103
Trying FEC0
FEC: Link is Up 796d
*** ERROR: `ethaddr' not set
Trying FEC0
FEC: Link is Up 796d
ping failed; host 192.168.1.103 is not alive
本帖最后由 w-oasis.com 于 2016-4-7 17:09 编辑
刚随便设置了下ethaddr,setenv ethaddr 00:01:02:03:04:05,重新ping,开发板可以ping通主机和虚拟机,如下:
MX6Q SABRESD U-Boot > ping 192.168.1.7
Trying FEC0
FEC: Link is Up 796d
Using FEC0 device
sending ARP for 0701a8c0
ARP broadcast 1
packet received
packet received
Receive from protocol 0x806
Got ARP
Got ARP REPLY, set server/gtwy eth addr (b8:88:e3:dd:23:09)
Got it
packet received
packet received
Receive from protocol 0x806
Got ARP
packet received
packet received
Receive from protocol 0x800
Got IP
len=28, v=45
host 192.168.1.7 is alive
黄灯会闪,绿灯一直是灭的(换另一台笔记本上,绿灯是亮的)。主机ping不通开发板,线的问题?电脑问题?板子问题(翻之前的帖子,有说到飞凌的板子用交换机才能与主机互相ping通)?还是哪块配置不对? 1。开发板与PC直连的时候, 网线需要交叉, 或者从 PC 侧设置PC的网卡为 TX/RX 交换的。 用交换机就不需要 交叉网线了。
2。开发板与PC直连的时候,当reset开发板, PC侧也会检出link down,然后网络管理软件会down掉网卡,导致后续的服务访问出现超时。 本帖最后由 w-oasis.com 于 2016-4-8 10:18 编辑
scaborough 发表于 2016-4-7 20:45
1。开发板与PC直连的时候, 网线需要交叉, 或者从 PC 侧设置PC的网卡为 TX/RX 交换的。 用交换机就不需要...
你好,谢谢你的回答。但我现在拿交叉网线直连开发板和PC,依然是开发板能ping通PC,PC不能ping通开发板,另外我让开发板进入自己文件系统(之前通过mfgtool烧写的)后再ping PC,运行ifconfig eth0 **.**.**.** 及ifconfig就ping通了。有的人说从uboot阶段只能开发板主动ping外界,外界是不能ping通开发板的,有的又说只有进入系统后才能互相ping的通。
照目前我的情况来看, 1.uboot阶段开发板可以单方面(主动)ping通外界(PC);
2.进入系统后,开发板和外界均可以ping,但从uboot阶段通过tftp加载内核及后面的通过NFS加载文件系统貌似还有问题,可能哪方面配置不当。
我是参照网上的一些资料来操作的,中间会有模糊的地方,不知道可有比较好的参考资料:dizzy:
现在参考网上的文章设置NFS启动,首先配置tftp,make a tftp directory Here we make /opt/tftpboot be a tftp directory.
# mkdir /tftpboot //该目录下链接有文件系统文件夹rootfs
# chmod 777 /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 /tftpboot
(4)Restarting tftp service
#sudo /etc/init.d/openbsd-inetd restart
然后是NFS服务相关文件的修改配置启动,最后在开发板上uboot阶段设置环境参数:
setenv ipaddr 192.168.1.**
setenv serverip 192.168.1.**
setenv bootfile uImage
setenv nfsroot /tftpboot/rootfs
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_nfs 'setenv bootargs ${bootargs} root=/dev/nfs rw ip=${ipaddr }:${serverip }:192.168.1.8:255.255.255.0::eth0:off nfsroot=${serverip}:${nfsroot},v3,tcp
setenv bootcmd_net 'run bootargs_base bootargs_nfs;bootm'
setenv bootcmd 'tftpboot uImage; run bootcmd_net'
saveenv
最后reset开发板,出现如下界面:
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
#sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 0801a8c0/00:0c:29:3b:4b:ef
一直往下走,不知道怎么回事,虚拟机此时是可以ping通开发板的,这又是哪发生的问题啊
不能通过tftp加载内核NFS挂载系统的方式启动开发板,参照网上的一些做法,直接在开发板原系统目录里面新建一目录作为挂载目录,挂载上了虚拟机中的系统。
页:
[1]