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.

AM335x U-Boot variables not retained after reboot

Hi All,

I am working on a prototype board based on Beagle Bone Black running TI SDK 8.00. During testing for a feature, we came across an possible issue in storing / reading a u-boot environment valriable.

The u-boot environment variables are located in the /dev/mmcblk0boot1 partition on eMMC. Environment variable redundancy is enabled in the configuration.

We save the environment variable using the utility fw_setenv, reboot the device and then read this environment variable in u-boot.

Sometimes (1-2 in 100 times) after the variable is set using the fw_setenv, we find that in u-boot it does not retain this value, instead goes back to the previous value. We have not observed any prints during the u-boot boot up which indicates that there is a failure to read the environment variables.

Can someone suggest how to debug this issue?

Thanks,
Sridhar CR

  • I will ask the software team to look at this.
  • Hi,

    You have a couple of options:

    1. You can create uEnv.txt file and place it in the boot partition of your eMMC. The format of the file is variable=value.

    2. You can use:
    setenv
    saveenv
    I tested this on my board with the following sequence:
    setenv spibusno 1
    saveenv
    then reset the board & the spibusno was set as 1 (instead of the default 0).

    3. You can add your variables in include/configs/am335x_evm.h, under the:
    #define CONFIG_EXTRA_ENV_SETTINGS \
    DEFAULT_LINUX_BOOT_ENV \
    part of the header.

    Best Regards,
    Yordan
  • Thank you, Yordan!

    We have checked at the U-Boot level and it works fine.
    Problem is with "fw_setenv" called from Linux Scripts to pass information to U-Boot. We would see the problem quite often (2 times out of 50/100times).
    Any possible reason for this issue?

    Regards,

    Kamal