[U-Boot] [PATCH] tegra: Specify debugging serial port at boot.

Stephen Warren swarren at wwwdotorg.org
Wed Mar 21 17:29:07 CET 2012

On 03/21/2012 03:38 AM, Wolfgang Denk wrote:
> To bring this to a constructive end:
> It appears that all you are trying here is an annoying, but somewhat
> unlikely error situation.  As marked above (see *), it might make
> sense to think of alternative ways to find out what the console port
> might be.  One possibility to do this is to use the environment.
> You need access to the environment anyway to initialize the console
> port (for reading the "baudrate" setting).  So why not encoding the
> console UART port for example as part of a "hwconfig" setting?  This
> setting could be auto-initialized when you load a DT on this board
> (eventually after verifying that it works).
> OK, there is still a chance that the environment settings are missing
> or incorrect _and_ the DT cannot be loaded, but the probability for
> such a double-fault is much, much smaller.
> Could this be an acceptable solution for you?

I'd prefer to just have a different U-Boot (build) config for each HW
configuration, and define the console UART as part of that configuration
using the existing defines that are for that purpose.

If we put the UART ID into the environment, then we either need to:

a) Have a different U-Boot configuration anyway, in order to define the
different environment during the U-Boot build process.

b) Post-process the U-Boot binary after building it, in order to modify
the environment that's contained in that binary.

Neither of those seem better to me that simply putting the UART ID into
the U-Boot config directly in the first place.

More information about the U-Boot mailing list