public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Excluding Env Variable section from the u-boot.bin
@ 2006-01-12 11:27 Albert David
  2006-01-12 14:41 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Albert David @ 2006-01-12 11:27 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [U-Boot-Users] Excluding Env Variable section from the u-boot.bin
@ 2006-01-12 12:56 Nuno João (Ext_NBS)
  2006-01-12 14:43 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Nuno João (Ext_NBS) @ 2006-01-12 12:56 UTC (permalink / raw)
  To: u-boot


	I have a configuration in 2 of "my" boards where the environment
	variable's area lays in a different sector from u-boot code,
	also so that it is possible to upgrade u-boot while keeping
	the environment:


In mpc8xx board I have:

/*
 * Environment in flash. It will be on the flash's 3rd 64KB block, fully
 * using it. U-boot will use the 1st two 64KB blocks, as specified by
 * CFG_MONITOR_LEN above.
 */
#define CFG_ENV_IS_IN_FLASH     1
#define CFG_ENV_OFFSET          0x20000 /*   Offset   of Environment Sector     */
#define CFG_ENV_SIZE            0x10000 /* Total Size of Environment Sector     */


In a mpc85xx board I have:

/*
 * Environment
 */
#define CFG_ENV_IS_IN_FLASH     1
#define CFG_ENV_SECT_SIZE       0x40000     /* 256K (one sector) for env */
/* env in its own flash sector, right before u-boot */
#define CFG_ENV_SIZE            CFG_ENV_SECT_SIZE
#define CFG_ENV_ADDR            0xffe00000


	I didn't need to change anything else. There are some preprocessor
	macros in the environment code that will handle most of the job.

	Cheers


-----Original Message-----
From: u-boot-users-admin@lists.sourceforge.net [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf Of Albert David
Sent: quinta-feira, 12 de Janeiro de 2006 11:27
To: u-boot-users at lists.sourceforge.net
Subject: [U-Boot-Users] Excluding Env Variable section from the u-boot.bin

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.

(...)

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [U-Boot-Users] Excluding Env Variable section from the u-boot.bin
@ 2006-01-12 14:52 Nuno João (Ext_NBS)
  2006-01-12 15:36 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Nuno João (Ext_NBS) @ 2006-01-12 14:52 UTC (permalink / raw)
  To: u-boot


	As far as I understood / remember, you can have the
	environment and part of u-boot's code sharing the same
	sector, which makes it at least more difficult to upgrade
	the code using a BDI-like tool which usually works on
	a full-sector basis.
 

-----Original Message-----
From: wd@denx.de [mailto:wd at denx.de] 
Sent: quinta-feira, 12 de Janeiro de 2006 14:44
To: Nuno Jo?o (Ext_NBS)
Cc: u-boot-users at lists.sourceforge.net; Albert David
Subject: Re: [U-Boot-Users] Excluding Env Variable section from the u-boot.bin 
(...)

It is *always* possible to update the U-Boot image and keep  the  old
environment settings. Typically all you need for embedded environment
is a simple "saveenv" command.

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

end of thread, other threads:[~2006-01-13 10:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12 11:27 [U-Boot-Users] Excluding Env Variable section from the u-boot.bin Albert David
2006-01-12 14:41 ` Wolfgang Denk
2006-01-13  4:29   ` Albert David
2006-01-13  7:51     ` Tore Martin Hagen
2006-01-13 10:10     ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2006-01-12 12:56 Nuno João (Ext_NBS)
2006-01-12 14:43 ` Wolfgang Denk
2006-01-12 14:52 Nuno João (Ext_NBS)
2006-01-12 15:36 ` Wolfgang Denk

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