Ricky6688 发表于 2016-6-9 15:33:56

tftpboot uImage

MX6Q SABRESD U-Boot > tftpboot uImage
Trying FEC0
FEC: Link is Up 796d
Using FEC0 device
TFTP from server 192.168.1.16; our IP address is 192.168.1.8
Filename 'uImage'.
Load address: 0x10800000
Loading: send option "timeout 5"
sending ARP for 1001a8c0
ARP broadcast 1
ARP broadcast 2
ARP broadcast 3
ARP broadcast 4
ARP broadcast 5
packet received
packet received
Receive from protocol 0x806
Got ARP
Got ARP REPLY, set server/gtwy eth addr (00:0c:29:f3:11:b6)
Got it
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
#Server did not acknowledge timeout option!
sending UDP to 1001a8c0/00:0c:29:f3:11:b6
packet received
packet received
Receive from protocol 0x800
Got IP
len=544, v=45
sending UDP to 1001a8c0/00:0c:29:f3:11:b6
packet received
packet received


什么 原因:
总是这样不断的重复发送

AAAAA 发表于 2016-6-12 11:55:51

配置好了本机IP和目标机IP了吗?你用的是虚拟机吗?

Ricky6688 发表于 2016-6-13 12:05:50

问题已解决,谢谢

longkonglan 发表于 2016-9-29 12:19:22

我也遇到这个问题了,是怎么解决的

longkonglan 发表于 2016-10-2 17:31:21

longkonglan 发表于 2016-9-29 12:19
我也遇到这个问题了,是怎么解决的

原因可能是debug没有关闭,导致每收到一个tftp数据包都要打印180个字节,如果接收4M字节(约8000个数据包)需要打印1440000字节,大约需要125秒。

ydm 发表于 2017-5-5 11:20:45

怎么解决的呀debug怎么关闭呢大神
:'(

sunxiaobei 发表于 2017-5-8 16:29:37

厉害了,我的楼主

xtccj 发表于 2017-10-31 09:27:39

修改Mx6q_sabresd.c中:
/* ccj add for debug */
int mx6_rgmii_rework(char *devname, int phy_addr)
{
        unsigned short val;
#if    1/* ccj add for debug */
/* enable master mode, force phy to 100Mbps */
phy_write(devname, phy_addr, 0x9, 0x1c00);
#endif

phy_write(devname, phy_addr, 0xd, 0x3);
phy_write(devname, phy_addr, 0xe, 0x805d);
phy_write(devname, phy_addr, 0xd, 0x4003);
phy_read(devname, phy_addr, 0xe,&val);
val &= ~(0x1 << 8);
phy_write(devname, phy_addr, 0xe, val);

        /* To enable AR8031 ouput a 125MHz clk from CLK_25M */
        phy_write(devname, phy_addr, 0xd, 0x7);
        phy_write(devname, phy_addr, 0xe, 0x8016);
        phy_write(devname, phy_addr, 0xd, 0x4007);
        phy_read(devname, phy_addr, 0xe, &val);

        val &= 0xffe3;
        val |= 0x18;
        phy_write(devname, phy_addr, 0xe, val);

        /* introduce tx clock delay */
        phy_write(devname, phy_addr, 0x1d, 0x5);
        phy_read(devname, phy_addr, 0x1e, &val);
        val |= 0x0100;
        phy_write(devname, phy_addr, 0x1e, val);
        return 0;

}

修改Mxc_fec.c中:


int fec_recv(struct eth_device *dev)
{
        struct fec_info_s *info = dev->priv;
        volatile fec_t *fecp = (fec_t *) (info->iobase);
        int length;
      int i=0;
               
        for (;;) {               

#ifdef CONFIG_SYS_UNIFY_CACHE
                icache_invalid();
#endif

                /* section 16.9.23.2 */
                if (info->rxbd.cbd_sc & BD_ENET_RX_EMPTY) {
                        length = -1;/* ccj add for debug */
                        if(i++>50)
                           return 0;
                        break;        /* nothing received - leave for() loop */
                }
                length = info->rxbd.cbd_datlen;

                if (info->rxbd.cbd_sc & 0x003f) {
#ifdef ET_DEBUG
                        printf("%s[%d] err: %x\n",
                             __func__, __LINE__,
                             info->rxbd.cbd_sc);
#endif
                        fecp->eir &= fecp->eir;
                } else {
                        length -= 4;
#ifdef CONFIG_MX28
                        swap_packet((void *)NetRxPackets, length);
#endif
                        /* Pass the packet up to the protocol layers. */
#ifdef CONFIG_ARCH_MMU
                        memcpy((void *)NetRxPackets,
                                ioremap_nocache((ulong)info->rxbd.cbd_bufaddr, 0),
                                length);
#endif
                        NetReceive(NetRxPackets, length);

                        fecp->eir |= FEC_EIR_RXF;
                }

                /* Give the buffer back to the FEC. */
                info->rxbd.cbd_datlen = 0;

                /* wrap around buffer index when necessary */
                if (info->rxIdx == LAST_PKTBUFSRX) {
                        info->rxbd.cbd_sc = BD_ENET_RX_W_E;
                        info->rxIdx = 0;
                } else {
                        info->rxbd.cbd_sc = BD_ENET_RX_EMPTY;
                        info->rxIdx++;
                }

                /* Try to fill Buffer Descriptors */
                fecp->rdar = 0x01000000; /* Descriptor polling active    */
        }
       
        return length;
}
页: [1]
查看完整版本: tftpboot uImage