
Dear Kim,
In message 20100720190112.3F435153A7F@gemini.denx.de I wrote:
What we see here is in the pre-relocation phase, where we are still parsing the original, in-flash copy of the stringified environment. What is strange is that this seems to have worked when accessing "baudrate" (either because the environment was found, or because the default environment was used), but is stopping here.
I think the problem is that before relocation we have to use getenv_r(), which is done for example to read the baudrate, see arch/powerpc/lib/board.c: init_baudrate()
However, some boards also use getenv() before relocation. I just found for example that the Sequoia board does this (before relocation):
"board/amcc/sequoia/sequoia.c":
330 int checkboard(void) 331 { 332 char *s = getenv("serial#"); 333 u8 rev; 334 u32 clock = get_async_pci_freq(); 335 336 #ifdef CONFIG_440EPX 337 printf("Board: Sequoia - AMCC PPC440EPx Evaluation Board"); 338 #else 339 printf("Board: Rainier - AMCC PPC440GRx Evaluation Board"); 340 #endif ...
and as one can expect the board crashes before printing the board information.
I'm considering a way to eliminate getenv_r() (at the cost of providing some static buffer in the global data area?).
[Comments? Ideas?]
However, I cannot see any gentenv() use before relocation for your board, so the problem there is still unclear. I think I need your help to debug this...
Best regards,
Wolfgang Denk