On 11/17/2011 10:46 AM, Dennis Borgmann wrote: > Hello u-boot users list, > > I am experiencing a problem concerning variables being set and later > getting lost.
This sounds like your environment variables in flash got erased or corrupted. The question is why. Where is your u-boot env being saved? Normal flash? I2C-attached flash? Other? (I2C flash is inherently less robust than we like due to weaknesses in the protocol.) I am assuming normal flash... * Do you have flash write protection enabled (prevents inadvertent flash scribbling, especially a problem if your linux or programs are not stable). * Do you understand your flash memory layout (can you draw a diagram of it)? Is something like a flash file system inadvertently overlayed on top of the u-boot env? If you have a flash file system inadvertently configured to use the same memory space as your u-boot env, it will "randomly" overwrite it based on file activity. * Do you use linux utilities to read/write your u-boot env? When the failure occurs, what does the memory dump of the actual u-boot flash storage area look like? Quite often the overwrite pattern leaves valuable clues as to who did it. * If it is all 0xFF, someone just erased it. * If some bits are set to zero that should be ones, someone probably did an inadvertent write to the memory (writing a '0' to a '1' bit turns it to a '0', writing a '0' or '1' to a '0' bit doesn't change it). * Does it look like file data? [snip] > Annoyingly, I cannot surely reproduce this error. I tried rebooting it > over 3 days in 2-minute-steps and the error won't occur. In addition, I > tried giving random input to the console of u-boot for 3 days (again in > 2-minute-steps) and still the error won't come up. We've all been there and feel your pain. :-( > Two questions: > > 1. What else might be the cause of this? Someone (likely software, possibly hardware) is corrupting or erasing your u-boot env storage in flash. > 2. How could I prevent u-boot from resetting to its default value? Fix whoever is doing the scribbling. There is no other way. > I'd be happy for any kind of help. > > Best regards, > Dennis Good luck, gvb _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot