[comp.os.minix] tty on rs232 lines

timborn@cbnewsd.ATT.COM (timothy.d.born) (11/13/89)

In article <1298@jura.tcom.stc.co.uk>, ct@tcom.stc.co.uk (Clive Thomson) writes:
> 
> Using MINIX 1.3 as shipped, adding the line
> 
> 1r2
>   ^
> to /etc/ttys made it impossible for me to login, as the system hung on an
> unexpected interrupt. Luckily I have a backup system, so I could patch 
> /etc/init.c, and make a new boot disk, others may not have this luxury.
> (I was using a hard disk, and had the root FS  on /dev/hd3, otherwise
> it may have been easier to solve)
> 
> So, onto the question, is getting a tty on the RS232 line really as easy
> as (correctly) changing /etc/ttys ?? I'm having a bit of trouble at present.
> Any comments on either welcome !
> 

Adding additional ttys to Minix 1.3:

1) modify kernel/tty.h NR_RS_LINES from 1 to 2 or 3.  The second tty line
	(/dev/tty2) is com1:, the third, iff you are not using amoeba,
	is com2:.
2) rebuild kernel.  Make sure rs232.c gets rebuilt.
3) edit /etc/ttys.  Read comments in tools/init.c for details of the
	meaning of the three character entries.
4) make a new boot disk.
5) reboot to get init started again.  Init is the program that uses the
	info in /etc/ttys.

Comments:
I have three ttys on my AT at the moment: console + 2.  It was an interesting
experiment, and it worked.  One problem was the process limit is 
quickly exceeded with three users.  But that's another story.

As far as the problem described in the original message: init read the
info in /etc/ttys and tried to spawn a shell for com1:.  When the
interrupt from that port appeared, it was not getting vectored to 
rs232().  In kernel/mpx88.s both primary and secondary com port interrupts
get connected to kernel/rs232.c'rs232() if the NR_RS_LINES >1.

tim
timborn@ihlpb.ATT.COM
...att!ihlpb!timborn