saveenvcommand does not work in the U-Boot prompt as the U-Boot default configuration is CONFIG_ENV_IS_NOWHERE. This is to give a preferred environment storage device option to save environment variables.
To change the U-Boot configuration according to persistent storage devices on your target, follow these steps:
- Run the following command:
petalinux-config -c u-boot -> UBOOT_ENV_IS_IN_EEPROM/SPI/FAT
- Deselect the Environment is not stored menu option.
- Build the U-Boot image with
petalinux-build -c u-boot.
- Boot with newly build images and try run the