From: Brian Prodoehl Date: Wed, 2 Nov 2005 11:34:47 -0600 Subject: [U-Boot-Users] NetConsole tstc problems In-Reply-To: <20051102075928.99DEB35265C@atlas.denx.de> References: <20051102075928.99DEB35265C@atlas.denx.de> Message-ID: <20051102113447.bc4sw4gsoockkk40@secure.uwalumni.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > In message <20051101151924.c9ww4408kw8ososc@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