[U-Boot] setenv only works in command line. Not working when called in the code

Julyberry senkoh at gmail.com
Wed Aug 7 01:57:49 CEST 2013


Hello,

I am adding a new library which is being called in common/main.c.

In that library, I am updating U-Boot environment variables which are
accessed from Linux as well.

While getenv() always works fine, but setenv() does not work. The value is
not updated. 
setenv works correctly if I use it in u-boot command line or fw_setenv in
Linux.

I also tried to use run_command(). I actually get result, 0 which means
success. however, the value is still not updated when the device finally
boots up in Linux. 
I also use 'fsload' command in my library with run_command(). That works
fine.

Can someone help with this?

Thanks a lot.



--
View this message in context: http://u-boot.10912.n7.nabble.com/setenv-only-works-in-command-line-Not-working-when-called-in-the-code-tp160901.html
Sent from the U-Boot mailing list archive at Nabble.com.


More information about the U-Boot mailing list