[U-Boot-Users] NetConsole tstc problems

Brian Prodoehl bjprodoehl at uwalumni.com
Wed Nov 2 18:34:47 CET 2005


> In message <20051101151924.c9ww4408kw8ososc at secure.uwalumni.com> you wrote:
> > Has anyone else experienced problems with NetConsole's tstc?  In
> particular,
> > defining CONFIG_BOOT_RETRY_TIME makes NetConsole almost unusable for me,
> > because then readline() in main.c blocks on tstc and the result (for me, at
> > least) is that NetConsole accepts a character every second or so.  For
> > everything that doesn't depend on tstc, NetConsole works beautifully for
> me.
> > I'm just wondering if anyone else has seen problems, or if anyone has
> > suggestions on how to make tstc less of a show-stopper (something I haven't
> > been able to accomplish).
>
> Please use current code. A fix inthis area  has  been  checked  in  a
> couple of days ago.

I'm not sure which fix you mean.  The fix to the sleep command corrected the
time issue, but there are still underlying problems with nc_tstc.  Try hitting
Ctrl+C to abort the sleep.  I have to hit it between 3 and 10 times before it
registers.  And that fix doesn't help at all with the CONFIG_BOOT_RETRY_TIME
problem.  I don't see any configs using NetConsole and bootretry, but I'd be
interested to hear that someone has it working without having to change core
code.  My current fix is to change the following in main.c's readline():

	for (;;) {
- #ifdef CONFIG_BOOT_RETRY_TIME
+ #if defined(CONFIG_BOOT_RETRY_TIME) && !defined(CONFIG_NETCONSOLE)
		while (!tstc()) {	/* while no incoming data */
			if (retry_time >= 0 && get_ticks() > endtime)
				return (-2);	/* timed out */
		}
#endif
		WATCHDOG_RESET();	/* Trigger watchdog, if needed */

With that change, I'm at least able to use NetConsole when
CONFIG_BOOT_RETRY_TIME is defined, but only by skirting around a tstc that
doesn't work very well.

Brian Prodoehl





More information about the U-Boot mailing list