Subject: Re: kernel compiles and com ports
To: None <dleeds@eagle.ais.net>
From: None <winans@aps.anl.gov>
List: netbsd-users
Date: 01/24/1995 09:23:10
FYI -- these are FAQs and I know my responses have been made before. 
You should RTFF and/or scan the mailing archives before posting.  The
mailing archives are on ftp.NetBSD.ORG.

>I just installed NetBSD i386 and it seems very nice, but I am trying to 
>make the modem devices like I had to in FreeBSD.../dev/cua02 for COM3/IRQ5

Don't bother.  The correct name for the tty ports on a Unix system is
tty00, tty01,...  if you REALLY want them to be named something else,
you can either add links to the real ones or rename them after making
them with the ttynn name.

Aliasing them is probably not a good idea because the advisary locking
scheme is (I believe) based on the device names so you would be voiding
your warranty ;-)

>I then tried to use kermit, it works if I set the line to 
>/dev/tty02 but it hangs after I set line and I have to hit ctrl-c to get 
>the kermit prompt back...any suggestions??

You have a modem on the line that has its CD line set to 'off' because
you are dialing out????   Well, if so, you have to tell your Unix that
this is the case and to go ahead and let you open the device even
though there is no carrier currently active on it.  This is done by
setting the 'local' flag on the device a'la stty.  The simplest way to
do this is to put the flag into the /etc/ttys file on the line that
describes the device/port.

Your file should look something like this:

console "/usr/libexec/getty Pc"         pc3     off secure
ttyv0   "/usr/libexec/getty Pc"         pc3     on secure
tty00   "/usr/libexec/getty std.9600"   unknown off secure
tty01   "/usr/libexec/getty std.9600"   unknown off secure
tty02   "/usr/libexec/getty std.9600"   unknown off secure local
tty03   "/usr/libexec/getty std.9600"   unknown off secure

I normally loose the secure flag and run my modems in hardware flow
control mode like this: 

tty02   "/usr/libexec/getty std.9600"   unknown off local rtscts

Notice that the getty is set to off, but the flags are still relevant
because the 'ttyflags -a' command in /etc/rc is what will set the modes
for you.  So if you edit /etc/ttys like this, you then do a 'ttyflags
-a' as root when you are dun.

>Okay...is there a doc for compiling a new kernel under NetBSD???

Not that I am aware of.  You pretty much have to deal with generic
config docs from Berkeley.

>config file gives me an error and make depend in the compile directory
>fails with a dont know how to make

I am SURE the make failed because the config failed.

>also, is there a doc detailing all the various kernel config options??

Again, not as far as I know.  The simplest way to deal with a kernel
config is to look at what is in the ALL config file.  That one has
examples of device config options and stuff.  99% of the time, all you
need to do is take the lines you want from it and config/make/boot.

The drivers themselves have man pages, so RTFM if you REALLY want to
know what all the config options and stuff are.

For example:
========================================================================
hack% man 4 intro
INTRO(4)                  NetBSD Programmer's Manual                  INTRO(4)

blah blah blah...

LIST OF DEVICES
     The devices listed below are supported in this incarnation of the system.
     Devices are indicated by their functional interface.  Not all supported
     devices are listed.

           com      NS8250-, NS16450-, and NS16550-based asynchronous serial
                    communications device interface
           cy       Cyclades Cyclom-4Y, -8Y, and -16Y asynchronous serial com-
                    munications device interface
           ed       Western Digital/SMC 80x3 and Ultra, 3Com 3c503, and NE1000
                    and 2000 ethernet interface
           ep       3Com Etherlink III (3c5x9) ethernet interface
           lms      Logitech-style bus mouse device interface
           lpt      Parallel port device interface
           mem      Main memory interface
           mms      Microsoft-style bus mouse device interface
           npx      Numeric Processing Extension coprocessor and emulator
           pms      PS/2 auxiliary port mouse device interface
           speaker  console speaker device interface

======================================================================

In general, you should wander around section 4 of the man pages.  If you
cd into /usr/share/man/cat4, you will see all that there is.

Good luck,
--John

! John Winans                     Advanced Photon Source  (Controls)    !
! winans@aps.anl.gov              Argonne National Laboratory, Illinois !
!                                                                       !
!"The large print giveth, and the small print taketh away." - Tom Waits !