[U-Boot-Users] Excluding Env Variable section from the u-boot.bin

Albert David albert.david at gmail.com
Thu Jan 12 12:27:02 CET 2006


Dears,
For my ppc405EP based custom board I would like to make few changes to
the u-boot memory map, so that every time I update the u-boot,
environment variables in the flash remain untouched.

Flash Memory used:S29GL128M(spansion 16MB Flash with 128 uniform
sectors of 128KB each)

Current mapping
U-Boot Start Flash Address 0xFFF60000 		- 2 sectors
U-Bot Env Variable Start Addr 0xFFFA000		- 1 sector
U-Bot Env Variable(Redundant)Start Addr 0xFFFC000	- 1 sector
U-Boot End sector				- 1 sector

Size of the binary output of u-boot(u-boot.bin) after build is 
128kb*5sectors=648Kbytes.

Current settings in the source tree:

U-boot-1.1.4/include/configs/my_board.h
#define CFG_FLASH_BASE		0xFFF60000
#define CFG_MONITOR_BASE	CFG_FLASH_BASE
#define CFG_MONITOR_LEN		(640 * 1024)

#define CFG_ENV_IS_IN_FLASH	1
#define CFG_ENV_ADDR		0xFFFA0000
#define CFG_ENV_SECT_SIZE	0x20000
#define CFG_ENV_ADDR_REDUND	0xFFFC0000
#define CFG_ENV_SIZE_REDUND	0x20000

U-boot-1.1.4/my_board/config.mk
TEXT_BASE = 0xFFF60000

U-boot-1.1.4/my_board/u-boot.lds
  ppcenv_assert = ASSERT(. < 0xFFFA0000, ".bss section too big,
overlaps .ppcenv section. Please update your confguration:
CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be
modified.");
  . = 0xFFFA0000;
  .ppcenv :
  {
    common/environment.o(.ppcenv);
  }





Required mapping:
U-Bot Env Variable Start Addr 0xFFF8000		- 1 sector
U-Bot Env Variable(Redundant)Start Addr 0xFFFA000	- 1 sector
U-Boot Start Flash Address 0xFFFC0000 		- 2 sectors

Required Size of the binary output of u-boot(u-boot.bin) after build
is  128kb*2sectors=256Kbytes.

I have already tried to modify the above specified files to:

U-boot-1.1.4/include/configs/my_board.h
#define CFG_FLASH_BASE		0xFFFC0000
#define CFG_MONITOR_BASE	CFG_FLASH_BASE
#define CFG_MONITOR_LEN		(256 * 1024)

#define CFG_ENV_IS_IN_FLASH	1
#define CFG_ENV_ADDR		0xFFF80000
#define CFG_ENV_SECT_SIZE	0x20000
#define CFG_ENV_ADDR_REDUND	0xFFFA0000
#define CFG_ENV_SIZE_REDUND	0x20000

U-boot-1.1.4/my_board/config.mk
TEXT_BASE = 0xFFFC0000

U-boot-1.1.4/my_board/u-boot.lds
  ppcenv_assert = ASSERT(. < 0xFFF80000, ".bss section too big,
overlaps .ppcenv section. Please update your confguration:
CFG_MONITOR_BASE, CFG_MONITOR_LEN and TEXT_BASE may need to be
modified.");
  . = 0xFFF80000;
  .ppcenv :
  {
    common/environment.o(.ppcenv);
  }

But after doing "make all" I get the message
ppc_4xx-ld:.bss section too big, overlaps .ppcenv section. Please
update your confguration: CFG_MONITOR_BASE, CFG_MONITOR_LEN and
TEXT_BASE may need to be modified.

In a simple term, I wanted to build my u-boot by excluding environment
variable section of the memory..

Can any one help me?

Where am I going wrong??

Is there any other modification needs to be done other than the above
specified changes?

Thanks in advance for your support,
With best regards,
Albert.




More information about the U-Boot mailing list