[U-Boot] environmental "baudrate" not used at boot up

Scott Wood scottwood at freescale.com
Wed Jan 19 20:58:29 CET 2011


On Tue, 18 Jan 2011 21:34:45 -0800
<chrisv at cyberswitching.com> wrote:

> On Sun, Jan 16, 2011 at 06:01:22AM -0800, chrisv at 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():
>    1. init_baudrate() -> getenv_r() -> serial_setbrg()
>    2. 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



More information about the U-Boot mailing list