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.

Changing environment variables & values in uboot

I am using ti-sdk-am335x-evm-07.00.00.00,and have successfully created a bootable SD card image by using the various scripts that come with the SDK.

I have followed the instructions at "http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide#Writing_to_NAND_from_U-Boot" to successfully copy MLO, SPL, and Kernel to the NAND on the AM335x EVM board, and have booted that image.

However, I can't seem to change the environment variables for the uboot environment.

I don't have the links in front of me at the moment, but on various pages within the SDK realm, there are clear statements that the TI image uses uEnv.txt to set the environment variables used by uboot. However, the image created by the scripts in the SDK, do not include this file, and if I manually create it on the SD card, it seems to be totally ignored.


I am sure I am missing something obvious, but I need to know how to get over this hump, because my end project will need to change some of the things away from the defaults created by the SDK scripts. Please advise.

  • Hi Kevin,

    I will forward this to the SW team, but response will probably be delayed until the holidays are over.

  • Kevin,

    There are some important things to be considered if you are writing the file manually.

    *The uEnv.txt file should be in unix format. Also make sure that there is an empty line at the end of the file.

    Have you referred to the link:
    http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide and section 'Making use pre-existing uEnv on SD card'

    Best Regards,
    Shiv
  • I created the file within my Ubuntu VM, using gedit. I assumed this was enough to verify the correct file format. I tried it with one, two, and three blank lines at the end, and placed it in the FAT-formatted boot partition, as a sister to MLO. In all cases, it seems as though the contents of uEnv.txt were totally ignored.

    Thank you for the section reference; I had not yet found that information. Just to be clear, my experiments with uEnv.txt have been on the SD card, when booting off of the SD card.

  • Kevin,

    A few things that might help.

    1. Could you attach or insert the appropriate lines from your boot log so we can see what is being done with the uEnv.txt file?
    2. With the scripts provided with the SDK, we create a few different uEnv.txt files. The most useful script is setup-uboot-env.sh which should be in the "sdk/bin" directory. Study this script and see how it creates different uEnv.txt files depending on the choices used. This will also show you where the file needs to be placed, but in general it goes in the same place as MLO and u-boot.img, the boot partition.
    3. As you'll see from the above, the most important entry in a uEvn.txt file is the "uenvcmd=" statement. This is required for uEnv.txt to work.

    Hope these things help or point you in the right direction.