
On 11/17/2010 05:30 PM, Steve Sakoman wrote:
I'm seeing some strange behavior with the fw_setenv tools on OMAP.
Here's what I see when using the tools on OMAP (overo in this case):
- fw_printenv prints the environment with no issues [1]
- fw_setenv allows me to change a variable with no reported errors [2]
- fw_printenv will print the changed environment, however the variables
are not sorted [3]
I tested yesterday on a davinci board, I can confirm this behavior, I have not thought was an error. I do not see any code in fw_env.c to sort variables. I konow the variables are sorted in u-boot, but do we ever have this feature on the userland fw_printenv ?
- Since all seems well at this point, I reboot. There is an error
reading the new environment [4]
I cannot confirm that. I made the same test, environment is stored on a SPI flash. No CRC error, the environment was restored correctly after a reset and/or power cycle.
I added debug printf's to readenv() in env_nand.c and the root cause is an error return from ret=nand_read(&nand_info[0], offset, &len, char_ptr)). I get an error code of -74
Before I spend too much time on this I wanted to check to see if others are seeing this issue, or whether it might be OMAP specific.
At least this should not be a general failure, because it works on my target. It could be also nand specific.
Best regards, Stefano