u-boot tftp problem - Embedded

This is a discussion on u-boot tftp problem - Embedded ; I am having a problem getting u-boot tftp to work. I have a Freescale M5373EVB board. I've used the Freescale-supplied dBUG bootloader to boot the board and TFTP uClinux into it. Works well and uClinux boots runs fine. I then ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: u-boot tftp problem

  1. u-boot tftp problem

    I am having a problem getting u-boot tftp to work. I have a Freescale
    M5373EVB board. I've used the Freescale-supplied dBUG bootloader to
    boot the board and TFTP uClinux into it. Works well and uClinux boots
    runs fine.

    I then decided to load u-boot instead as a boot loader. That went
    well, except that I can't seem to get TFTP to work. I get "TX
    timeout"s all the time. I've verified that the TFTP server is working
    fine by intiating a TFTP transfer from another computer on the
    network. The server responded quickly and the vmlinux.bin transferred
    over in a flash.

    I thought that it might be that the FEC is being initialized in full
    duplex vs. half duplex mode. I recompiled u-boot to force half
    duplex. No change with tftp.

    All computers are connected to a switch with a router as a DHCP
    server. I've tried both fixed IP (both server and M5373EVB) and
    DHCP. The latter required recompiling u-boot to add dhcp support. It
    all went well, but no TFTP.

    I am also running tcpdump on the server and monitoring for activity
    from the IP address assigned to the eval board. Nothing, it is
    absolutely quiet.

    I've bypassed the switch and connected the eval board to the server
    direct with a cross-over ethernet cable too. No difference.

    Thanks,

    -Martin



  2. Re: u-boot tftp problem

    I ran Wireshark and saw that my data block packets were fragmenting. Then I realized that I might have an MTU problem. I checked my network interface.

    $ ifconfig eth1
    eth1 Link encap:Ethernet HWaddr 00:50:04:24:11:B9
    inet addr:10.190.254.252 Bcast:10.190.255.255 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:576 Metric:1
    RX packets:7897 errors:0 dropped:0 overruns:0 frame:0
    TX packets:260 errors:0 dropped:0 overruns:0 carrier:0
    collisions:1 txqueuelen:1000
    RX bytes:597756 (583.7 KiB) TX bytes:77355 (75.5 KiB)
    Interrupt:17 Base address:0x8f80

    Then I changed my MTU size.

    # ifconfig eth1 mtu 1500

    After which my interface showed:

    $ ifconfig eth1
    eth1 Link encap:Ethernet HWaddr 00:50:04:24:11:B9
    inet addr:10.190.254.252 Bcast:10.190.255.255 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:19154 errors:4 dropped:0 overruns:0 frame:4
    TX packets:10129 errors:0 dropped:0 overruns:0 carrier:3
    collisions:1 txqueuelen:1000
    RX bytes:1289464 (1.2 MiB) TX bytes:14960356 (14.2 MiB)
    Interrupt:17 Base address:0x8f80

    This solved my nagging tftp problem. I had noticed that tftp would work from other machines, so it ended up just being a problem with my network interface configuration. I must have recompiled U-Boot 20 times trying different code before realizing it wasn't a U-Boot problem. However, even with the MTU set to 576 I was able to tftpboot using earlier versions of the file net/tftp.c and net/tftp.h, or equivalently earlier versions of U-Boot.

+ Reply to Thread