Skip to contentSkip to conversation

Resend: The dreaded embedded environment - linker barf!

U-Boot-Users Robin Gilks 2 participants 2 messages Aug 25, 2003 – Aug 27, 2003

lore
Share & tools
lore
#0 lore raw

Greetings

Well what a suprise!! I've been struck by the environment mapping yet again!.

If I change my memory map for 'top' booting I *should* just need to set the TEXT_BASE address to threequarters up my 4M flash device (so it starts at 0xfff00000), set the CFG_MONITOR_BASE to the same and leave CFG_FLASH_BASE where it is along with all other address config items.

Unfortunately the linker barfs on the embedded environment value which is defined as an offset into the image (well, actually the flash according to the code). Setting it as CFG_ENV_OFFSET or CFG_ENV_ADDR makes no difference (so I can't put it at the start of the flash outside the image either).

The error message from the linker is:
u-boot.lds:132 invalid assignment to location counter
- the line number refering to the line after the closing brace for the whole file which doesn't help much!!

It looks as though the CFG_FLASH_BASE define is being used inappropriately where CFG_MONITOR_BASE would be a more sensible value (for example to see if the environment is embedded should depend on where in flash that u-boot image is, not where the flash starts!!)

Any ideas appreciated!

Signature · 5 lines
Robin Gilks
Senior Design Engineer          Phone: (+64)(3) 357 1569
Tait Electronics                Fax  :  (+64)(3) 359 4632
PO Box 1645 Christchurch        Email : robin.gilks at tait.co.nz
New Zealand
#1 lore raw

Dear Robin,

Quoted 2 lines · in message <[email protected]> you wrote:

If I change my memory map for 'top' booting I *should* just need to set

What do you mean with "should" here? Is this what you think should happen? Maybe your expectations do not match the reality given by the current implementation / configuration.

Quoted 4 lines

It looks as though the CFG_FLASH_BASE define is being used inappropriately where CFG_MONITOR_BASE would be a more sensible value (for example to see if the environment is embedded should depend on where in flash that u-boot image is, not where the flash starts!!)

These defines are used all fine, as long as your configuration makes sense (as demonstrated by the 100+ existing board configurations).

Quoted 1 line

Any ideas appreciated!

Try to understand what the image should look like, where the environment is located, and which #defines are used to configure the environment to that location.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
365 Days of drinking Lo-Cal beer.                       = 1 Lite-year