[U-Boot] Getting started with uboot

Wolfgang Denk wd at denx.de
Wed Aug 4 21:36:29 CEST 2010


Dear Thomas Heller,

In message <i3ccjf$a05$1 at dough.gmane.org> you wrote:
> Where does uboot store the environment variables?
> 
> I have my tx25 board booting correctly from uboot when
> entering interactive commands:

Check the board config file:

include/configs/tx25.h:
 33
 34 #define CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* 256 kB for U-Boot */
 35
...

102 #define CONFIG_ENV_IS_IN_NAND
103 #define CONFIG_ENV_OFFSET       CONFIG_SYS_MONITOR_LEN
104 #define CONFIG_ENV_SIZE         (128 * 1024)    /* 128 kB NAND block size */
105 #define CONFIG_ENV_OFFSET_REDUND        (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)


> > => nand read 0x80108000 0x02040000 0x00260000
> > 
> > NAND read: device 0 offset 0x2040000, size 0x260000
> >  2490368 bytes read: OK

0x02040000 is more than 32 MiB, i. e. far, far away from the
envrionment.

> But when I call 'saveenv' then it doesn't boot any longer;
> it seems that 'saveenv' overwrites parts of the root file system.
> 
> So, my question is: where does uboot save the environment?

This does not happen on my system. "saveenv" leaves the whole NAND
starting at offset 0x80000 and above untouched.


Is this an original TX25 board? Did you make any modifications to
U-Boot?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Hi there! This is just a note from me, to you, to tell you, the  per-
son  reading this note, that I can't think up any more famous quotes,
jokes, nor bizarre stories, so you may as well go home.


More information about the U-Boot mailing list