[U-Boot-Users] Re: Environment in flash rather than EEProm

Martin Egholm Nielsen martin at egholm-nielsen.dk
Thu Jan 27 11:21:34 CET 2005


Hi,

Is the below recipe the way to put the environment in flash?
I can't seem to find any other instructions on this...

BR,
  Martin

> 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
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click





More information about the U-Boot mailing list