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.

TDA4VM: Save environment variables on the uboot command line

Part Number: TDA4VM

Dear Experts :

  Recently, during debugging, I found that using the 'saveenv' command can not save the environment variables. When I changed the default environment variables by using 'setenv', I saved them with 'saveenv', and Prompt saved successfully. Then powered off and restarted the hardware board. I found that the environment variables were still the previous default values.We have tried on the development board and our own hardware, and the results are the same ,The serial port log is as follows :

U-Boot SPL 2021.01-g53e79d0e89 (Aug 04 2021 - 23:32:00 +0000)
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM2-SOM rev E8
SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
Trying to boot from MMC2
Starting ATF on ARM64 core...

NOTICE: BL31: v2.5(release):08.00.00.004-dirty
NOTICE: BL31: Built : 22:30:09, Aug 4 2021

U-Boot SPL 2021.01-dirty (Oct 21 2021 - 20:58:44 +0800)
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM2-SOM rev E8
SYSFW ABI: 3.1 (firmware rev 0x0015 '21.5.0--v2021.05 (Terrific Llam')
Detected: J7X-BASE-CPB rev E3
Detected: J7X-VSC8514-ETH rev E2
Trying to boot from MMC2


U-Boot 2021.01-g53e79d0e89 (Aug 04 2021 - 22:33:28 +0000)

SoC: J721E SR2.0
Model: Texas Instruments K3 J721E SoC
Board: J721EX-PM2-SOM rev E8
DRAM: 4 GiB
Flash: 0 Bytes
MMC: sdhci@4f80000: 0, sdhci@4fb0000: 1
In: serial@2800000
Out: serial@2800000
Err: serial@2800000
Detected: J7X-BASE-CPB rev E3
Detected: J7X-VSC8514-ETH rev E2
Net: am65_cpsw_nuss_slave ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
eth0: ethernet@46000000
Hit any key to stop autoboot: 0
=>
=> printenv bootpart
bootpart=1:2
=> printenv mmcdev
mmcdev=1
=> setenv bootpart 0
=> setenv mmcdev 0
=> printenv bootpart
bootpart=0
=> printenv mmcdev
mmcdev=0
=> saveenv
Saving Environment to FAT... OK
=>

  • Hi,

    Please follow this: https://e2e.ti.com/support/processors/f/791/t/1031148

    Check the section: 1) Environment is now saved to FAT partition of SD as against eMMC in the previous 7.3 version. This is to accommodate eaik boards that do not have eMMC.

    That should be able to let you saveenv to eMMC. If it helps you please click on verify answer. 

    Regards,
    Keerthy

  • Hi 

      At present, my main problem is that the saved environment variables will disappear after power off and restart, rather than saving the environment variables in EMMC or SD card, but executing the saveenv command prompts success.

     Also, in my SDK, I cannot execute the command 'git revert 20e7036ac9194b4ec8b0161b830d7f4f4d6db95f' mentioned in the link in u-boot-2021.01, and will prompt:

    fatal: bad object 20e7036ac9194b4ec8b0161b830d7f4f4f4d6db95f.

    However, I can save the environment variables to EMMC by modifying them, but I'm not sure whether they are correct, because I saw others modify them on this forum:

    board-support/u-boot-2021.01/configs/j721e_evm_a72_defconfig

    +#CONFIG_ENV_IS_IN_FAT=y
    +#CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
    +CONFIG_ENV_IS_IN_MMC=y

      After recompiling, I copied the three files tiboot3.bin tispl.bin u-boot.img to /media $use/ boot/  and booting to u-boot prompt & enter the below command:

    => printenv mmcdev
    mmcdev=1
    => printenv bootpart
    bootpart=1:2
    => setenv mmcdev 0
    => setenv bootpart 0
    => printenv bootpart
    bootpart=0
    => printenv mmcdev
    mmcdev=0
    => saveenv
    Saving Environment to MMC... Writing to MMC(0)... OK

    However, when I reboot the machine, the saved environment variable will also be restored to the previous value: mmcdev = 1 bootpart = 1:2。And Our SDK version should be the latest 

  • Hi,

    Which SDK are you using? The SDK8.0 U-Boot has the above commit. Can you please try with fresh SDK 8.0 installation & reverting the commit as mentioned in the FAQ?

    Best Regards,
    Keerthy