
On Tue, 18 Jan 2011 21:34:45 -0800 chrisv@cyberswitching.com wrote:
On Sun, Jan 16, 2011 at 06:01:22AM -0800, chrisv@cyberswitching.com wrote:
... Any advice on where to take it from here?
Hi everyone,
I investigated this a little further, and I'm wondering if the problem is related to the initialization ordering in lib_arm/board.c.
Here's the sequence:
start_armboot():
- init_baudrate() -> getenv_r() -> serial_setbrg()
- env_relocate()
Note that init_baudrate() calls getenv_r("baudrate") and passes either the result (on success) or CONFIG_BAUDRATE (on error) to serial_setbrg(). Only after this does the environment get relocated using env_relocate().
The full NAND code only works after relocation. So you cannot read out the NAND environment, in the normal way, before serial init -- you get the default environment instead.
If you are booting from NAND, I suggest using CONFIG_NAND_ENV_DST to have the NAND SPL load the environment at the same time as it loads U-Boot. If you're using some preloader other than U-Boot's NAND SPL, you'll need to see if it supports something similar.
-Scott