[U-Boot] ARM relocation, probably trivial mistake - back to original problem

Reinhard Meyer u-boot at emk-elektronik.de
Fri Oct 1 14:22:05 CEST 2010


Dear Wolfgang Denk,
>> For the fix, I see an ugly multiline
>> #if defined(AT91SAM9260) || defined(AT91SAM9G20) || ...
>> coming into arch/arm/asm/global_data.h.
>>
>> There is no common defined value for all AT91 SoCs that could be used.
> 
> If this is really for all AT91 SoCs, then please feel free to
> introduce a common define (CONFIG_SYS_AT91 ?) and use that. Eventually
> you can clean up some other such #if's on the way.

That would have to be set either in each board.h file or in each at91*.h
file.

> Probably there is a header file common to all AT91 SoCs when then can
> use a single such construct to #define the new variable so you don;t
> have to touch all the many board config files.

The only files I can see included in each instance are those of the kind
hardware.h, memory_map.h and similiar. The define does not really belong
in any of those.

I did the changes of adding the clock values to gd, and it became somewhat
better, but there are still issues pending:

1. NAND accesses cause "raise: Signal # 8 caught"
but still work, kernel boots normally.
2. environment is still invalid - when I boot the
"CONFIG_SYS_ARM_WITHOUT_RELOC" version the ENV is ok.
3. saveenv goes way to fast to do anything and
i2c md 57 1000.2 100 shows no change
4. env default -f hangs the system

Q: after relocation, "gd->" values are still available, right?

I am searching for further "violations"...

U-Boot 2010.09-00106-g6e135b9-dirty (Oct 01 2010 - 15:13:14)

U-Boot code: 21F00000 -> 21F3C070  BSS: -> 21F7D600
CPU: AT91SAM9XE
Crystal frequency:   18.432 MHz
CPU clock        :  198.656 MHz
Master clock     :   99.328 MHz
I2C:   ready
monitor len: 0007D600
ramsize: 04000000
Top of RAM usable for U-Boot at: 24000000
Reserving 501k for U-Boot at: 23f82000
Reserving 143k for malloc() at: 23f5e100
Reserving 24 Bytes for Board Info at: 23f5e0e8
Reserving 112 Bytes for Global Data at: 23f5e078
  (112 bytes is exactly correct with the expanded struct)
New Stack Pointer is: 23f5e070
RAM Configuration:
Bank #0: 20000000 64 MiB
relocation Offset is: 02082000
monitor flash len: 0003C070
Now running in RAM - U-Boot at: 23f82000
FLASH: 512 KiB
NAND:  raise: Signal # 8 caught
raise: Signal # 8 caught
raise: Signal # 8 caught
256 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
MMC:   mci: 0
Net:   macb0, enc1.0, enc1.1, enc1.2
Reset Ethernet PHY
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Press SPACE to abort autoboot in 1 seconds
TOP9000> env
env - environment handling commands

Usage:
env ask name [message] [size] - ask for environment variable
env default -f - reset default environment
env edit name - edit environment variable
env export [-t | -b | -c] addr [size] - export environmnt
env import [-d] [-t | -b | -c] addr [size] - import environmnt
env print [name ...] - print environment
env run var [...] - run commands in an environment variable
env save - save environment
env set [-f] name [arg ...]

TOP9000> env default -f
(hangs here)



More information about the U-Boot mailing list