Skip to contentSkip to conversation

setenv only works in command line. Not working when called in the code

U-Boot Julyberry 1 participant 1 message Aug 6, 2013

lore
Share & tools
lore

Julyberry

author
#0 lore raw

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.