public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] U-boot environment variables keep disappearing
@ 2012-02-07 10:04 andyjjones
  0 siblings, 0 replies; only message in thread
From: andyjjones @ 2012-02-07 10:04 UTC (permalink / raw)
  To: u-boot


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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-07 10:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 10:04 [U-Boot] U-boot environment variables keep disappearing andyjjones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox