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.

setenv not found

I have the DM6467T EVM and am trying to follow the instructions at http://processors.wiki.ti.com/index.php/Writing_Kernel_Image_to_NAND_Flash

I'm at the step "Downloading the Kernel Image to the DVEVM".  It says "DVEVM# setenv serverip <tftp server ip address>", which I deduce means to use the "setenv" command on the evm.  However, when I type any "setenv" command, I get a not found error.

To begin with, I powered on the DM6467T EVM and saw the boot log come out the UART onto my Windows XP hyperterminal session.  It mentions "Arago".  This ended with a "login" prompt.  I typed "root" and was not asked for a password.  I next typed "setenv serverip XXX.XXX.XXX.XXX" and got the not found error.

Is there some setup I've skipped?  Why is the setenv command not found?  Does Arago use a different [spelling of the] command?  Printenv doesn't work either.  Do I need to run a different shell after login?

  • That prompt and the command should be issued at u-boot.  You have described the terminal output as having reached through the booting of the linux kernel to the root console.

    I looked at the page you reference and there was not an indication that you should do this at the u-boot prompt.  That should be corrected.

    You will need to interrupt u-boot and issue these commands.

     

    EDIT : Actually, the article does reference u-boot just above, BUT does not specifically mention these commands are issued at the u-boot prompt.  It is implied.

  • (This post was written before seeing Brandon's reply.  Thx Brandon)

    I still need to know how to get setenv working on my EVM.  Nevertheless, I've found that "set" will display environmental variables and simply "name=value" will set them.

    So I ran:

    serverip=XXX.XXX.XXX.XXX.XXX

    bootfile=uImage-dm6467t-evm.bin

    Now the next thing the instructions say to do is "dhcp".  But guess what!  dhcp is not found either!  

    I think if I can get setenv to work, then dhcp will work too.  Note I looked in /bin for a csh but find none, and "sh csh" can't find it either.

  • Brandon,

    Thanks for the advice.  This leads me to two questions.

    1) How do I interrupt u-boot to issue these commands?

    2) I'm actually not necessarily wanting to write the kernel to NAND flash already, but just trying to get my feet a little wet and see if I have things setup correctly.  (I've gotten zero responses on my other more germane posts.)  Perhaps instead, I just wanted to see if my ubuntu/vmware/windowsxp atftp server was working correctly.  I wanted to try downloading anything from it.  This *is*, however, in preparation for later building my *own* kernal to write to NAND flash.  So perhaps I really should start by rewriting the original kernel.  Dunno for sure.

    -Helmut

    EDIT: I also just found lower down at http://processors.wiki.ti.com/index.php/Writing_Kernel_Image_to_NAND_Flash instructions on "Updating a kernel from a linux prompt".  Perhaps I should try that for now, and only the original instructions if I break the kernel.  NEVERTHELESS, it would be helpful to know how to interrupt u-boot in that case.

    EDIT: However, this assumes uImage is on your disk.  I need to know how to access my atftp server from linux on the EVM to download the uImage.  I'm searching now...

  • While u-boot is first executed, it should print information to the console port.  At some point, you should see an count-down that gives you some amount of time to interrupt it (unless u-boot on the board has been configured to not allow this).

     

  • Thanks.  I've noticed this [EDIT: countdown] already.  Will try sometime.  

    Any advice on downloading a uImage from my ubuntu/vmware/windowsxp atftp server from linux?  Again, the instructions say to use "dhcp" for this from u-boot, but not how to do this from linux.

    thx

    EDIT: Figured out "tftp -g -l test.txt <ipaddress>" from EVM (arago linux).  Get error "Network is unreachable".  Same with "ping".  Haven't tested network connection in this EVM yet, so need to fall back to testing that...

  • Brandon,

    Having gotten nowhere with linux running on the EVM (ref http://e2e.ti.com/support/embedded/f/354/p/86974/300618.aspx#300618) I tried interrupting U-Boot as you suggested above.

    Now the setenv and printenv commands work, of course.

    The dhcp command on the EVM (U-boot running) does not, however.  Note that it does INDEED seem to be getting an ip address from my router, 192.168.123.19 being the next sequential available and also now showing up in my router's dhcp table.  Great!

    However, the dhcp command says the server is 192.168.123.33.  This is in fact my router.  Even though both before and after, printenv says serverip has a value of 192.168.123.18 (my atftpd running on ubuntu/vmware/windowsXP).  So it seems like dhcp is NOT using the serverip env var but something else.

    Note I found http://processors.wiki.ti.com/index.php/DVEVM_and_DVSDK_frequently_asked_questions#Why_is_u-boot_trying_to_tftp_my_uImage_from_the_wrong_server_address_when_executing_.27dhcp.27.3F and this may relate.

  • Brandon,

    HELP!  I've burned a week getting nowhere fast.  Perhaps, please, can you or some other TI employee that knows this stuff backward and forward give me a call at  678-919-1093 ?  I'm always available 9am-9pm EST, and sometimes as early as 6am and rarely 4am.  There's got to be a simple path from beginning to end, but the doc is just too fragmented and incomplete to properly fill in my knowledge gaps.  I keep hitting a new roadblock only seconds after having spent hours or days getting past the last one.  I would like very much to simply get the EVM doing what it should be able to do.

    Thanks very much,

    Helmut

  • Helmut,

    I am not sure if you are expecting the serverip variable to be used for resolving the DHCP. It is, infact, the server where the tftp would go looking for the files.

    Do look at this page to understand the u-boot variables better:

    http://www.denx.de/wiki/DULG/UBootEnvVariables

  • Thanks VERY much for the link.             (((EDIT: I see why setenv autoload no caused it not to tftp.  The problem of my first dhcp still remains)))

    Please note I am aware that all the doc says the serverip variable is used for the tftp address.  

    HOWEVER,  I found a FAQ at http://processors.wiki.ti.com/index.php/DVEVM_and_DVSDK_frequently_asked_questions (specifically http://processors.wiki.ti.com/index.php/DVEVM_and_DVSDK_frequently_asked_questions#Why_is_u-boot_trying_to_tftp_my_uImage_from_the_wrong_server_address_when_executing_.27dhcp.27.3F) that points out a problem with some routers.  This FAQ made me aware of the problem.

    I then find I do indeed have a problem sort of like this.  Below is a screen capture.  I confirm my environmental variable settings before, between, and after two dhcp attempts.  For the first attempt, serverip is set CORRECTLY.  However, dhcp seems to IGNORES this var and uses the router address instead.  It binds to an IP address that I recognize as being CREATED by my server.  That is, ...19 was the next available address.  However, it says it will tftp from ...33, which is the router rather than the ...18 of the serverip var.  Note I control-C cancel dhcp which seems to hang.  Note printenv confirms the correct serverip setting even after dhcp ignored it.

    I further tried manually typing "setenv autoload no" per advice from the FAQ.  Now, the dhcp command doesn't even say it's trying to tftp.  It comes back without me cancelling it. I think this is because, while it could find the router at ...33, it can NOT find my ubuntu/vmware/windowsXP tftp server at ...18.

    Note I recall ping not finding anybody and posted on it elsewhere, but I think that was under linux.  I just found that ping WILL work here under U-Boot.  I tried ping and it complained about ipaddr not being set.  I set that to ...19 per the router's prior suggestion.  Now I can successfully ping the router (...33) AND ubuntu/vmware/windowsXP (...18) Interestingly, ping fails to the unbuntu's host WindowsXP (...10).  Perhaps there's some compatibility difference in windows and linux-type pinging?  Never heard of such before. 

    === CAPTURE ===

     

    DM6467 EVM > setenv serverip 192.168.123.18

    DM6467 EVM > setenv bootfile uImage-dm6467t-evm.bin

    DM6467 EVM > printenv

    bootargs=mem=112M console=ttyS0,115200n8 root=/dev/hda1 rw ip=off vpif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0

    bootcmd=nboot 0x80700000 0 0x160000; bootm

    bootdelay=3

    baudrate=115200

    addclk=setenv bootargs ${bootargs} clkref=${clkref}

    stdin=serial

    stdout=serial

    stderr=serial

    ethaddr=00:0e:99:02:b7:78

    ethact=DaVinci EMAC

    ver=U-Boot 2009.08-00002-gcab1855 (Jan 20 2010 - 04:20:31)

    serverip=192.168.123.18

    bootfile=uImage-dm6467t-evm.bin

     

    Environment size: 451/16380 bytes

    DM6467 EVM > dhcp

    BOOTP broadcast 1

    DHCP client bound to address 192.168.123.19

    Using DaVinci EMAC device

    TFTP from server 192.168.123.33; our IP address is 192.168.123.19

    Filename 'uImage-dm6467t-evm.bin'.

    Load address: 0x80700000

    Loading: *

    TFTP error: 'File not found' (1)

    Starting again

     

     

    Abort

    DM6467 EVM > printenv

    bootargs=mem=112M console=ttyS0,115200n8 root=/dev/hda1 rw ip=off vpif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0

    bootcmd=nboot 0x80700000 0 0x160000; bootm

    bootdelay=3

    baudrate=115200

    addclk=setenv bootargs ${bootargs} clkref=${clkref}

    stdin=serial

    stdout=serial

    stderr=serial

    ethaddr=00:0e:99:02:b7:78

    ethact=DaVinci EMAC

    ver=U-Boot 2009.08-00002-gcab1855 (Jan 20 2010 - 04:20:31)

    serverip=192.168.123.18

    bootfile=uImage-dm6467t-evm.bin

     

    Environment size: 451/16380 bytes

    DM6467 EVM > setenv autoload no

    DM6467 EVM > dhcp

    BOOTP broadcast 1

    DHCP client bound to address 192.168.123.19

    DM6467 EVM > printenv

    bootargs=mem=112M console=ttyS0,115200n8 root=/dev/hda1 rw ip=off vpif_display.ch2_numbuffers=0 vpif_display.ch3_numbuffers=0

    bootcmd=nboot 0x80700000 0 0x160000; bootm

    bootdelay=3

    baudrate=115200

    addclk=setenv bootargs ${bootargs} clkref=${clkref}

    stdin=serial

    stdout=serial

    stderr=serial

    ethaddr=00:0e:99:02:b7:78

    ethact=DaVinci EMAC

    ver=U-Boot 2009.08-00002-gcab1855 (Jan 20 2010 - 04:20:31)

    autoload=no

    bootfile=uImage-dm6467t-evm.bin

    gatewayip=192.168.123.33

    netmask=255.255.255.0

    ipaddr=192.168.123.19

    serverip=192.168.123.33

    dnsip=192.168.123.33

    dnsip2=192.168.254.254

     

    Environment size: 576/16380 bytes

    DM6467 EVM > 

     

     

  • Sanjeev,

    Bypassed to Fix.  Thanks again.  Your link to u-boot doc helped.  I hadn't found that before.  While there is STILL a problem with dhcp interacting with my router, you got me further thinking.  I omitted dhcp altogether and ran tftpboot instead.  It works.  It downloads from my ubuntu/vmware/windowsXP server successfully.

    For others, here's a complete explanation.  Substitute your own IP adresses

    - connect to the serial port of your DM6467T EVM.  115200 baud 8N1

    - Power up

    - while the EVM is waiting a few seconds for you to interrupt the [linux boot] process, press enter to interrupt it.

    - type these commands:
    setenv ipaddr 192.168.123.19
    setenv serverip 192.168.123.18
    setenv bootfile uImage-dm6467t-evm.bin
    setenv loadaddr 0x80700000

    - now type the tftpboot command:
    tftpbood

    - tftpboot will give you messages echoing recognition of the settings above, plus some status info for the transfer.

    SUMMARY: My original problem was I was trying to follow http://processors.wiki.ti.com/index.php/Writing_Kernel_Image_to_NAND_Flash#Downloading_the_Kernel_Image_to_the_DVEVM by typing commands into linux that were intended for U-Boot.  That got solved by the interruption mentioned above.  Next, I had interaction with my router, who I assume has it's own tftp server.  By setting other environmental variables and NOT using the dhcp command, I was able to avoid this interaction and get the download to work