This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

A question when Booting via TFTP

EVM6446  

My Uboot enviromental variant :

bootdelay=3
baudrate=115200
nfshost=192.168.11.100
rootpath=/home/Lorry/workdir/filesys
ethaddr=08:00:28:32:06:08
serverip=192.168.11.100
bootargs=console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.11.100:/home/Lorry/workdir/filesys,nolock mem=120M eth=08:00:28:32:06:08
stdin=serial
stdout=serial
stderr=serial
videostd=pal
bootcmd=dhcp;bootm
bootfile=uImage

 $saveenv 

$boot

BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 52
*** Unhandled DHCP Option in OFFER/ACK: 52
DHCP client bound to address 192.168.11.101
TFTP from server 192.168.11.100; our IP address is 192.168.11.101
Filename '�'.
Load address: 0x2050000
Loading: *
TFTP error: 'File not found' (1)
Starting again

I don't know why my bootfile name becomes a strange char '�' . So I try static IP address.

.........

.................

ipaddr = 192.168.11.101 

bootargs=console=ttyS0,115200n8 noinitrd rw ip=192.168.11.101 root=/dev/nfs nfsroot=192.168.11.100:/home/Lorry/workdir/filesys,nolock mem=120M eth=08:00:28:32:06:08

bootcmd = tftpboot;bootm

...................

........

That's successful.  

 

I think there is something wrong with my router, when the router answers DHCP request, it changes bootfile name.

 

Thanks. 

  • We have seen issues with a few routers (the one you described is new); in one case, this was fixed by upgrading router firmware; the fact that is works well with static ip ( I assume router is disconnected in this scenerio), would appear to point to the router. 

    What happens if you place the router back and type 'dhcp' at the u-boot command prompt?  I am curious.

  • I upgrade my router , unfortunately it don't change either. 

    In static ip type, I still connect with router, but boot is successful, so I think DHCP function of my router is the main factor for the failed boot. 

    //----------------DHCP command in dynamic IP ---------------------

    In dynamic ip type, I try "dhcp" command in u-boot, the message is failed either. (below:)

    SEED_DaVinci_EVM v1.0# dhcp
    BOOTP broadcast 1
    *** Unhandled DHCP Option in OFFER/ACK: 52
    *** Unhandled DHCP Option in OFFER/ACK: 52
    DHCP client bound to address 192.168.11.102
    TFTP from server 192.168.11.103; our IP address is 192.168.11.102
    Filename '�'.
    Load address: 0x2050000
    Loading: *
    TFTP error: 'File not found' (1)
    Starting again

    I check my env.

     SEED_DaVinci_EVM v1.0# printenv
    bootdelay=3
    baudrate=115200
    rootpath=/home/Lorry/workdir/filesys
    ethaddr=08:00:28:32:06:08
    bootcmd=dhcp;bootm
    stdin=serial
    stdout=serial
    stderr=serial
    videostd=pal
    serverip=192.168.11.103
    nfshost=192.168.11.103
    bootargs=console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.11.103:/home/Lorry/workdir/filesys,nolock mem=120M
    bootfile=�

    I found that bootfile is changed by router. I wonder how the router can change my env, as I know what the router could do is to give an dynamic IP address to my EVM board.

    How powerful the router is!!

    //----------------DHCP command in static  IP ------------------------------- 

    In static type, I try 'dhcp' command in uboot, the result is same with the dynamic one.

    SEED_DaVinci_EVM v1.0# dhcp
    BOOTP broadcast 1
    *** Unhandled DHCP Option in OFFER/ACK: 52
    *** Unhandled DHCP Option in OFFER/ACK: 52
    DHCP client bound to address 192.168.11.102
    TFTP from server 192.168.11.103; our IP address is 192.168.11.102
    Filename '�'.
    Load address: 0x2050000
    Loading: *
    TFTP error: 'File not found' (1)
    Starting again

     

    I think I should try an different router.  

  • This is a strange one, but is not out of the question, a DHCP server has the ability to define a file, and it is likely that your particular router defines this with that square character, thus breaking the TFTP boot sequence. I am curious if your board ever was able to boot from TFTP? If it was able to TFTP in the past what conditions may have changed since then that brought about this?

    As Juan mentioned we have had odd issues with some routers, so my first guess would be to change the router to another model as suggested, assuming you cannot get into the lower level controls over the DHCP server on the router. Another option if DHCP is a must is to have your host Linux machine operate the DHCP server, in which case you can manually configure it to use a file name that is valid for your system.

    The U-Boot manual section 4.7 below discusses setting up a DHCP server (on a Linux host) that defines a proper file name.

    http://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.7.

  • Can u please send me the simialr link for ubuntu 8.04 ..it will be a gr8 help...

  • hi,

    LorryAstra

    I also meet the problem you mentioned above with dm8168.

    Have you solved it?

    Hoping for your reply.

  • Use the autoload environment variable to control DHCP. Set it to "no" will stop DHCP from trying to load the boot image. It should just configure the IP address. Not quite sure. Minimal env vars might be:

    setenv autoload no
    setenv serverip 192.168.192.166
    setenv bootfile uImage
    setenv bootcmd dhcp;tftpboot;bootm

    I can't remember if tftpboot needs to be replaced with tftp [address] or serverip needs to be reinit. Best to test each command in bootarg manually to see what env vars are being automatically modified.