Problems with serial console on a i386 machine

Problems with serial console on a i386 machine

Post by Heiko Gerstun » Thu, 21 Oct 2004 17:36:05



Hi y'all!

We use a SBC with a Geode CPU (i386 compatible) and now wanted to switch
off VGA console support (and the onboard graphics as well). As a console
can be handy sometimes, we planned to use a serial console and built a
kernel (2.4.20 with PPSKit patches) supporting this.

Now, when we boot the system everything works fine, console messages can
be read over the serial port, but when the kernel finished its first
initialization and init bangs in, the serial output begins to crawl.

After every 16 characters the output sleeps for approx. 10 seconds, this
leads to a boot up time of 15 minutes (compared to less than 1 minute
with a VGA console enabled).

Afterwards the system runs with normal speed, but everytime I try to
output something on the serial port I use as a console, the output is as
slow as described above.

We wonder if this is a problem with the signal pins or something like
that. We tried ZOC as a terminal program as well as one or two others
without a change.

If we do not use the serial port as a console, it works flawlessy.

It would be great if anyone could point us into the right direction.

Thanks in advance,
kind regards,

Heiko

--
Meinberg radio clocks: 25 years of accurate time worldwide

Meinberg Radio Clocks
www.meinberg.de

Stand alone ntp time servers and radio clocks based on GPS, DCF77 and
IRIG. Rackmount and desktop versions and PCI slot cards.

 
 
 

Problems with serial console on a i386 machine

Post by Michael Schnel » Thu, 21 Oct 2004 22:48:18


Quote:

> After every 16 characters the output sleeps for approx.

This is a known interrupt problem with the serial interface of ELAN CPUs
and there is a serial driver setting (or another driver source code)
that works around this.

Perhaps the Geode has the same bug.

-Michael

 
 
 

Problems with serial console on a i386 machine

Post by Heiko Gerstun » Sat, 23 Oct 2004 20:04:01


Hi Michael,

thank you for your reply. We applied the patch to our kernel version,
without improvement. We used setserial to change the uart setting from
16550A to 8250 and then the 10s pause happens after each single char,
because of the non-FIFO situation we caused by using a 8250.

This really seems to be an interrupt problem. Interesting fact:
Everytime we enable the onboard VGA graphics of our board, the serial
port seems to work without problems. The delay only happens when no VGA
adapter is existing in the system.

Any ideas what could cause this?

Thank you in advance,
kind regards,
Heiko


>> After every 16 characters the output sleeps for approx.

> This is a known interrupt problem with the serial interface of ELAN CPUs
> and there is a serial driver setting (or another driver source code)
> that works around this.

> Perhaps the Geode has the same bug.

> -Michael

--
Meinberg radio clocks: 25 years of accurate time worldwide

Meinberg Radio Clocks
www.meinberg.de

Stand alone ntp time servers and radio clocks based on GPS, DCF77 and
IRIG. Rackmount and desktop versions and PCI slot cards.

 
 
 

Problems with serial console on a i386 machine

Post by Mark » Sun, 24 Oct 2004 00:41:22



Quote:> Hi Michael,

> thank you for your reply. We applied the patch to our kernel version,
> without improvement. We used setserial to change the uart setting from
> 16550A to 8250 and then the 10s pause happens after each single char,
> because of the non-FIFO situation we caused by using a 8250.

> This really seems to be an interrupt problem. Interesting fact:
> Everytime we enable the onboard VGA graphics of our board, the serial
> port seems to work without problems. The delay only happens when no VGA
> adapter is existing in the system.

> Any ideas what could cause this?

> Thank you in advance,
> kind regards,
> Heiko

I've had a similar problem where things stopped working when I removed the
VGA adapter.  I figured out that the init scripts were continuously trying
to start the agetty process on the virtual terminals that are normally used
when a VGA adapter is present.  In inittab the process was using respawn, so
init will continuously try to start these processes.  I ended up editing my
inittab to remove these entries and things started working after that.
Might be worth trying.

Mark

 
 
 

Problems with serial console on a i386 machine

Post by Menno Duursm » Mon, 25 Oct 2004 00:43:13



> If we do not use the serial port as a console, it works flawlessy.

Is there a tty0 device node on your system?
Mine lacked that one, i created it (per the manual) like so:

mknod -m 622 tty0 c 4 0

But maybe you just need to remove /etc/ioctl.save before reboot. And as
Mark sugested try and edit /etc/inittab to disable any getty(s)
otherwise respawn on tty[1-6].

Using BusyBox as init , i have this:

$ su -c 'grep -A1 serial /etc/lilo.conf'
Password:
# LILO serial console, kernel serial console
serial = 0,9600n8
append = "console=ttyS0,9600n8"
$ grep respawn /etc/inittab |grep -v -e ^$ -e ^#
::respawn:/bin/login
::respawn:/sbin/getty -L ttyS1 9600 vt102
$

Note, no getty on ttyS0 just a "login" process, as the kernel is
told to use ttyS0 as console - in runlevel 1 - it "just works". In any
other runlevel, a getty would be needed.

The getty i /do/ have running (on ttyS1) is just so i get a login prompt,
no matter which serial-port i happen to connect my null-modem cable to ...

Also, i have had odd things happen if the serial-console settings of any
bootloader (Lilo, Grub, Syslinux) differed from the kernel or getty ones.
To avoid that rearing again i use 9600n8 as the _only_ setting(s).

Quote:> It would be great if anyone could point us into the right direction.

http://bernia.disca.upv.es/lxr/http/source/Documentation/serial-conso...

HTH.

--
-Menno.

 
 
 

Problems with serial console on a i386 machine

Post by Heiko Gerstun » Tue, 26 Oct 2004 21:13:55


Hi Mark,

thank you for your reply. We already removed all inittab entries
covering the getty processes for all serial and virtual ports, without
success. As the systems performance is normal after bootup (where it is
dead slow because of the delays occuring when printing out something on
the serial port) and because top does not show any cpu consuming
processes, it seems to be an interrupt problem.

Another indication is the fact that if we "switch off the FIFO" by
setting the port type to 8250, the pause occurs after each char (not
after 16 chars).

Any other ideas? I already tried to apply the interrupt handling patch
for the AMD ELAN cpu architecture, where a similiar error has been found
(in the hardware, not in the serial driver), but this patch did not fix
the problem.

Kind regards,
Heiko




>>Hi Michael,

>>thank you for your reply. We applied the patch to our kernel version,
>>without improvement. We used setserial to change the uart setting from
>>16550A to 8250 and then the 10s pause happens after each single char,
>>because of the non-FIFO situation we caused by using a 8250.

>>This really seems to be an interrupt problem. Interesting fact:
>>Everytime we enable the onboard VGA graphics of our board, the serial
>>port seems to work without problems. The delay only happens when no VGA
>>adapter is existing in the system.

>>Any ideas what could cause this?

>>Thank you in advance,
>>kind regards,
>>Heiko

> I've had a similar problem where things stopped working when I removed the
> VGA adapter.  I figured out that the init scripts were continuously trying
> to start the agetty process on the virtual terminals that are normally used
> when a VGA adapter is present.  In inittab the process was using respawn, so
> init will continuously try to start these processes.  I ended up editing my
> inittab to remove these entries and things started working after that.
> Might be worth trying.

> Mark

--
Meinberg radio clocks: 25 years of accurate time worldwide

Meinberg Radio Clocks
www.meinberg.de

Stand alone ntp time servers and radio clocks based on GPS, DCF77 and
IRIG. Rackmount and desktop versions and PCI slot cards.

 
 
 

1. No VGA/Serial Console in i386 Linux 2.0.x

I have seen patches to run i386 2.0.x on a machine with no video (no VGA, no
EGA, no nothing).  I have also seen patches to run 2.0.x over a serial
console.  I know these capabilities are part of 2.1.x -- can anybody point me
to resources for these patches for 2.0.x?

Thank you very much.

Steven Work
Renaissance Labs

2. Ultra EIDE (FAQ ?)

3. HOW DO I CONNECT A SERIAL CONSOLE TO A LINUX I386 BOX?

4. REORGANIZE LINUX NEWS???

5. Bootloader/serial console question (i386)

6. Getting closer with ISDN PPP (only 23 years to go)

7. serial console - lilo serial= no serial port input

8. Ebay to run Linux.

9. Serial Console to another machine

10. machine no longer boots without keyboard OR serial console

11. Console on an old machine with serial cable

12. Support for serial console on legacy free machines

13. Downloading RH7...So many types: 7.0-i386...7.0-i386-respin...7.0-ja-i386