How do I clear environment variables previously saved with u-boot?

On your kit, try

help env

and look for "env default".

env default [-f] var [...] - [forcibly] reset variable(s) to their default values

That sounds like what you are looking for.

env default -a

does a nonpersistent change, then "printenv" shows the defaults.

To change defaults, you would rebuild your u-boot.bin with changes e.g. to CONFIG_EXTRA_ENV_SETTINGS.


To use default vars without removing them from flash execute

env default -a

within u-boot and then execute $bootcmd. Joe Kul's solution.

To erase the vars from the SPI flash execute

run eraseenv

within u-boot and then reboot.