[U-Boot-Users] Dynamic location of the environment sector
Angelos Manousarides
amanous at inaccessnetworks.com
Thu Jun 22 13:02:45 CEST 2006
Wolfgang Denk wrote:
> In message <449A6F42.9090509 at inaccessnetworks.com> you wrote:
>
> The only effect of this is to put the environment into a separate
> linker section. You can do this, but you don't have to. You can make
> this work without this setting es well. Just configure your linker
> script correctly.
>
>
>>My board is not on the first #if, so it felt back to the last #else,
>>thus placing the env_size and environment in the wrong order.
>
>
> This is an error in your linker script then.
My linker script is :
.text :
{
cpu/pxa/start.o (.text)
. = env_offset ;
common/environment.o (.text)
*(.text)
/**(EXCLUDE_FILE (common/environment.o) .text)*/
}
env_offset is defined at common/environment.c, and this is the defined
used by other boards as well.
BUT:
$ arm-linux-objdump -d common/environment.o
common/environment.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <env_size>:
0: 00 80 00 00 ....
00000004 <environment>:
4: 85 6f 43 92 62 6f 6f 74 64 65 6c 61 79 3d 35 00
.oC.bootdelay=5.
14: 62 61 75 64 72 61 74 65 3d 31 31 35 32 30 30 00
baudrate=115200.
...
How can this be correct? All the defines are for offset 0 of this file,
but at 0 is the env_size. I also did a hexedit of the u-boot.bin and the
environment indeed starts at 0x4004 :
00004000 00 80 00 00 85 6F 43 92 62 6F 6F 74 64 65 6C 61
Regards,
Angelos Manousaridis
More information about the U-Boot
mailing list