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
=>