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.

DM365: DVEVM Documentation of Environment Variables for boot?

Just spinning up with a DM365 DVEVM kit.  Completely new to the TI DVEVMs.

Where are the environment variables documented which are used to control booting of the DVEVM?  i.e. bootcmd, bootargs, bootfile, serverip, nfshost, etc.

I can find snippets in the manuals where they're describing how to set up certain boot modes, but no details.

I'm looking for documentation of what all of the environment variable are, and what are the supported options for each of them.

All help appreciated!

  • For basic usage you should be able to get what you need from the getting started guide as you suggest, however for more details of what is going on with the boot process you will probably want to reference the U-Boot manual, this goes into greater detail about the commands you have available in U-Boot, though there is more beyond U-Boot here for example you mention bootargs which is actually arguments you are passing to the newly booted Linux kernel which are outside the scope of U-Boot. This being said there is not necessarily one place that documents everything, but if you have some specific questions we can probably find answers.

  • Thanks, that helped!

    After reading through the U-Boot manual (esp 5.10 Environment Variables and 7.3 Passing Kernel Arguments) I see the source of my confusion.  The Getting Started Guide (and others) are merging together 2 related, but separate topics: via environment variables it is possible to control where the kernel is loaded from; and what the kernel does when it is run.

    [Note: Some of the following is researched, but not yet tested.]

    - There are 3 options for where the kernel is loaded from: flash, TFTP, and DHCP (variation on TFTP).

    - There are 2 (significant) variations on what the kerned does when it runs: mount the NAND Flash file system; or mount an NFS file system.

    The environment variable 'bootcmd' controls where the kernel is loaded from.  Depending on the option selected, one or more of ipaddr; netmask; gatewayip; serverip; and bootfile may need to be defined.  (DHCP sets some of these automatically.) There is no need to change 'bootargs' when changing where the kernel is loaded from.  The Getting Started Guide lists a value for 'bootargs' in most kernel load examples, but this is incorrect.

    The environment variable 'bootargs' provides arguments to the kernel once it is running.  A significant option is which file system to mount: flash or NFS.  This is controlled by "root=/dev/mtdblock3" vs "root=/dev/nfs".  As above, additional options (i.e. nfshost, rootpath) will need to be specified depending on the file sytem selected.

    The Getting Started Guide might benefit from a re-write to clearly delineate these two concepts and to briefly document what the options do.  A link to the U-Boot documentation would also be valuable.

  • Tom Hanson said:
    - There are 3 options for where the kernel is loaded from: flash, TFTP, and DHCP (variation on TFTP).

    I am not sure what you mean by loading the kernel by DHCP? DHCP is typically how you would get an IP address dynamically for your board (dynamic host configuration protocol) and though it can in fact set an address for where the kernel is loaded over TFTP from, DHCP in general is a seperate network protocol as opposed to being what is used to directly load a kernel image. The most common setup that I use is a TFTP loaded kernel on a board that is configured for DHCP (as opposed to a static IP network configuration).

    Tom Hanson said:
    The environment variable 'bootcmd' controls where the kernel is loaded from.  Depending on the option selected, one or more of ipaddr; netmask; gatewayip; serverip; and bootfile may need to be defined.  (DHCP sets some of these automatically.) There is no need to change 'bootargs' when changing where the kernel is loaded from.  The Getting Started Guide lists a value for 'bootargs' in most kernel load examples, but this is incorrect.

    This is true, for changing where you get the kernel from you do not need to change the bootargs variable, however for the purposes of completeness in configuring for any boot we put both the bootcmd and bootargs in as what minimally needs to be set to boot in the particular fashion being presented, that is if you did not have bootargs set at all your boot would fail, so we provide a value for it. This probably could be explained better, but the idea was just to give the 4 standard configurations and what the minimal bootargs you would need for each to work would be, I assume you are referring to this page?

    Tom Hanson said:
    The Getting Started Guide might benefit from a re-write to clearly delineate these two concepts and to briefly document what the options do.  A link to the U-Boot documentation would also be valuable.

    As it is a wiki page now it is certainly modifyable quickly, though I am not quite sure how to re-write it based on your feedback just yet, I did add in a U-Boot manual link at the bottom of the alternate boot methods section

  • Bernie Thompson said:

    - There are 3 options for where the kernel is loaded from: flash, TFTP, and DHCP (variation on TFTP).

    I am not sure what you mean by loading the kernel by DHCP? DHCP is typically how you would get an IP address dynamically for your board (dynamic host configuration protocol) and though it can in fact set an address for where the kernel is loaded over TFTP from, DHCP in general is a seperate network protocol as opposed to being what is used to directly load a kernel image. The most common setup that I use is a TFTP loaded kernel on a board that is configured for DHCP (as opposed to a static IP network configuration).

    [/quote]

    Sorry, was just giving the shorthand.  Perhaps I should have said "There are 3 options for how the kernel is loaded..."  You are correct, you can't actually load the kernel from DHCP.  However, if you:
        "setenv bootcmd 'dhcp;bootm'"
        "setenv bootfile uImage"
    then DHCP will provide the ipaddr and serverip parameters for TFTP.  Which would work great if you have control over the DHCP server (I don't). 

    Alternatively, you can use TFTP directly by specifying everything explicitly:
        setenv bootcmd 'tftp;bootm'
        setenv ipaddr <target ip addr>
        setenv serverip <TFTP host addr>
        setenv bootfile uImage

    Bernie Thompson said:
    ... the idea was just to give the 4 standard configurations and what the minimal bootargs you would need for each to work would be, I assume you are referring to this page?

    That's the page.  And providing the 4 standard configuration is a good starting place.  If everything works flawlessly out of the box.  For those occasions when that doesn't happen, there should be a link/reference to the detailed information.  Otherwise the user is at a loss for where to go next.

    Thanks much for the quick answers!  It got me going again with minimal impact.


  • Thanks so much for sharing the post.

     


    credit auto[:P]

  • HI Sir,

    Also DM365 EVM issue, can you let me know how to make booting with static IP? I ever try to change bootargs to setenv bootargs 'console=ttyS0,115200n8 noinitrd rw root=/dev/nfs nfsroot=$(nfshost):$(rootpath) ip=192.168.10.188,nolock mem=76M ...    , but it still boot with DHCP ...   Then I can not get IP and connect to NFS ...

    Because I only can use non-DHCP network, I will appreciate your help.[:)]

  • The following App Note was written for another platform but should apply to DM365 as well

    http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=spraaq0

     

  • Huang ChunChi said:
    Also DM365 EVM issue, can you let me know how to make booting with static IP? I ever try to change bootargs to setenv bootargs 'console=ttyS0,115200n8 noinitrd rw root=/dev/nfs nfsroot=$(nfshost):$(rootpath) ip=192.168.10.188,nolock mem=76M ...    , but it still boot with DHCP

    From my notes, it looks like you need to change the "bootcmd" variable in addition to the "bootargs" variable.  This is very confusing in the documents.

    If bootcmd is set to 'dhcp;bootm', the board will boot using DHCP.  If set to 'tftp;bootm' it will not use DHCP and all addresses need to be set with environment variables.  For example:

    setenv bootcmd 'tftp;bootm'
    setenv ipaddr 192.168.0.118
    setenv netmask 255.255.255.0
    setenv gatewayip 192.168.0.1
    setenv serverip 192.168.0.117
    setenv bootfile uImage

    ipaddr is the address of the DVEVM board; serverip is the address of the host where it will boot from.  After booting, it then gets the host and path for the exported NFS file system from $(nfshost) and $(rootpath) in the bootargs variable which you're already setting.

    Good luck!