From mboxrd@z Thu Jan 1 00:00:00 1970 From: Angelos Manousarides Date: Thu, 22 Jun 2006 14:02:45 +0300 Subject: [U-Boot-Users] Dynamic location of the environment sector In-Reply-To: <20060622104442.BC2DF3525C5@atlas.denx.de> References: <20060622104442.BC2DF3525C5@atlas.denx.de> Message-ID: <449A78D5.1040607@inaccessnetworks.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > In message <449A6F42.9090509@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 : 0: 00 80 00 00 .... 00000004 : 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