How to set uboot environment variables in uboot source files?

Are u-boot environment variables supposed to only be set with uboot commands (“setenv …” ) at prompt?
I have variables set in “DEFINE CONFIG_EXTRA_ENV_SETTINGS” in module head file. I re-built and copied the u-boot image to my SD card. Then I did uboot update at u-boot prompt :
run setupdate
run update_uboot

After I power cycled the my board, I did not see any environment variables that got updated! What am I missing here? I am using colibri imx6s module.

William

Can you try resetting the u-boot environment variables and saving them as below?

env default -a
saveenv

This should result in the new u-boot environment variables taking effect.

Thanks for quick reply.

I tried these commands and they worked. It seems that doing uboot update only changes default environment variable values, which won’t take effect until these 2 commands has been executed.

William