From mboxrd@z Thu Jan 1 00:00:00 1970 From: andyjjones Date: Tue, 7 Feb 2012 02:04:02 -0800 (PST) Subject: [U-Boot] U-boot environment variables keep disappearing Message-ID: <33277540.post@talk.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi folks, I'm a newbie. I'm trying to write a basic script in u-boot which erases and writes x-loader to NAND between 0x0 and 0x80000. When I save some basic environment variables to u-boot such as: set foo bar saveenv foo is always there when i come back. However, when I write a slightly longer program and save it using saveenv (and check it's there using "print"), it is gone by the time I reboot. The slightly longer program is this: formatXLoader=if test "$firstFormat" -eq "0"; then echo Formatting NAND for X-Loader...; mmc init; fatload mmc 0:1 80000000 MLO; nandecc hw 2; nand erase 0 80000; echo Formatting complete. Writing X-Loader to NAND; nand write 80000000 0 80000; echo X-Loader written successfully; set firstFormat 1; else echo X-loader already written to NAND; fi Why is my formatXLoader program disappearing? I am pulling out my hair. Thankyou! :) -- View this message in context: http://old.nabble.com/U-boot-environment-variables-keep-disappearing-tp33277540p33277540.html Sent from the Uboot - Users mailing list archive at Nabble.com.