Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: oldpenguin on November 04, 2013, 08:35:50 PM

Title: u-boot environment corruption
Post by: oldpenguin on November 04, 2013, 08:35:50 PM
Hello
I don't know if anyone has ever tried this.
During my tests with nand flash partitioning, I wanted to change some u-boot environment variables and make them persistent (store in flash). The problem is as soon as I issue the "saveenv" in u-boot, the environment memory gets corrupted and I get the dreadful "*** Warning - bad CRC, using default environment" at start plus the environment is reset to some useless defaults.
I am using u-boot from sunxi-bsp and loading the image with livesuit.

Any solution ?
Is u-boot environment hard-coded to some memory position ?

Title: Re: u-boot environment corruption
Post by: oldpenguin on November 07, 2013, 08:07:58 PM
Hi
I did not find any solution for the environment persistence/corruption.

Apparently, the only way to customize the boot-up process is to compile your own u-boot and hard-code the wanted commands.
I did manage to do that following several threads around these forums.

Another way to configure u-boot in other projects is by using an external file Boot.scr.

Does any one know if this file is supported in this version of u-boot ?
Title: Re: u-boot environment corruption
Post by: davidefa on November 08, 2013, 01:32:32 AM
I use a boot.scr on an sd with a olimex debian and it works.
That same boot.scr is ignored by the uboot on nand ( I have flashed on nand a debian image someone posted in another thread )
Title: Re: u-boot environment corruption
Post by: oldpenguin on November 08, 2013, 10:41:33 AM
Thanks for your feedback
I don't understand why they should be so different.
Maybe its just some compilation options, or maybe both methods just can't be used simultaneously (script.bin AND Boot.scr)
I will have to check the source code, and will post back my findings.