
Dear Gary Jennejohn,
Is there another part of the patch, part 1/2, too?
In message 20081020135849.371fe4d1@ernst.jennejohn.org you wrote:
When both CONFIG_SYS_CONSOLE_IS_IN_ENV and CONFIG_NETCONSOLE are defined the user can have stdout set to nc (netconsole).
This causes problems because u-boot will try to write to nc as soon as GD_FLG_DEVINIT is set in gd->flags, which happens before the network devices are initialized in net/eth.c. This results in error messages being spewed out.
It seems this can happen only if CONFIG_SYS_CONSOLE_IS_IN_ENV is defined, right?
To prevent this problem set GD_FLG_DEVINIT in net/eth.c:eth_initialize(), after the network devices have been initialized, instead of in common/console.c:console_init_r().
I have to admit that I don't like the idea of splitting the GD_FLG_DEVINIT into several, unrelated parts of the code.
Would it not make more sense to have the netconsole part wait with output until it's been initialized? And/or move the netweork init to an earlier point, when netconsole is enabled?
Best regards,
Wolfgang Denk