public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Environment in flash rather than EEProm
@ 2004-03-30 13:29 Andy Hawkins
  2005-01-27 10:21 ` [U-Boot-Users] " Martin Egholm Nielsen
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Hawkins @ 2004-03-30 13:29 UTC (permalink / raw)
  To: u-boot

Hi all

I'm using a PPChameleonEVB, and am trying to move the u-boot environment
into flash. I've modified the include/configs/PPChameleon.h file as follows:

#define CFG_ENV_IS_IN_FLASH	1
#define CFG_ENV_ADDR		0xFFFFA000
#define CFG_ENV_OFFSET		(CFG_ENV_ADDR - 0xFFFC0000)
#define CFG_ENV_SIZE		0x2000

I've added some debugging into the section where it reads the environment,
and I'm seeing the following:



U-Boot 1.0.2-adh-2004/03/29 (Mar 30 2004 - 13:40:38)

CPU:   IBM PowerPC 405EP Rev. B at 133.333 MHz (PLB=133, OPB=66, EBC=33 MHz)
       IIC Boot EEPROM disabled
       PCI async ext clock used, internal PCI arbiter enabled
       16 kB I-Cache 16 kB D-Cache
Board: ### No HW ID - assuming PPChameleonEVB
I2C:   ready
DRAM:  32 MB
Top of RAM usable for U-Boot at: 02000000
Reserving 189k for U-Boot at: 01fd0000
Reserving 256k for malloc() at: 01f90000
Reserving 128 Bytes for Board Info at: 01f8ff80
Reserving 48 Bytes for Global Data at: 01f8ff50
Stack Pointer at: 01f8ff38
New Stack Pointer is: 01f8ff38
Now running in RAM - U-Boot at: 01fd0000
FLASH:  4 MB
env_relocate[204] offset = 0x2010000
env_relocate[216] embedded ENV (before reloc) at fffd9474
env_relocate[218] embedded ENV (after reloc) at 01fe9474
U-Boot relocated to 01fd0000
NAND:Probing at 0xff000000
  32 MB
### main_loop entered: bootdelay=5

### main_loop: bootcmd="<UNDEFINED>"
=>

As you can see, the address of the environment before relocation is
0xfffd9474. Shouldn't this be 0xFFFFA000? Is there anything else I need to
do to force the location of the environment into the required place?

It looks like the address of the environment is based on the location of the
'environment' variable in common/environment.c. Do I need to change the LD
script to force this variable to a certain location? If so, can anyone help
with what I need to do (I'm not familiar with LD scripts yet).

Many thanks.

Andy

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-02-11 12:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-30 13:29 [U-Boot-Users] Environment in flash rather than EEProm Andy Hawkins
2005-01-27 10:21 ` [U-Boot-Users] " Martin Egholm Nielsen
2005-01-28 21:00   ` Wolfgang Denk
2005-01-29 19:47     ` Martin Egholm Nielsen
2005-01-29 21:29       ` Wolfgang Denk
2005-02-11 11:59         ` Martin Egholm Nielsen
2005-02-11 12:20           ` Wolfgang Denk
2005-02-11 12:46             ` Martin Egholm Nielsen

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