Subject: Re: halting without a console keyboard
To: None <bouyer@antioche.lip6.fr>
From: Brook Milligan <brook@biology.nmsu.edu>
List: netbsd-help
Date: 05/25/2000 14:33:40
   On Thu, May 25, 2000 at 10:54:48AM -0600, Brook Milligan wrote:
   > I want to run a machine without a keyboard.  Apparently the only way
   > to do this is to disable the keyboard test in the BIOS and compile a
   > kernel with no keyboard support.

   I don't think you need to remove keyboard support from kernel.
   I've several machines which are behind a keyboard/mouse/display
   switch (it's really a 3 circuits, 4 positions switch, nothing more) and
   they boot fine even when the switch isn't in the rigth position.

I didn't either, but this machine (old i386) doesn't boot with
kernel keyboard support and no keyboard (disabled in BIOS).  It just
hangs when the kernel is loaded.  In any case, it never gets beyond
the xxxx+xxxx+[xxxx+xxx] message.

   Maybe what you really need is a serial console ?

I have one serial port that must be used for other purposes.
Otherwise, this would be an option.  Or, can the serial console use
the same device as a "normal" serial line, i.e., for a modem or mouse
or whatever?  I figured that was too wacko to work.

My best idea so far is the following patch:

--- machdep.c.orig      Fri Feb  4 16:09:35 2000
+++ machdep.c   Thu May 25 12:44:36 2000
@@ -1375,10 +1375,15 @@
        if (howto & RB_HALT) {
                printf("\n");
                printf("The operating system has halted.\n");
+#if (NPC > 0) && (NPCCONSKBD > 0)
                printf("Please press any key to reboot.\n\n");
                cnpollc(1);     /* for proper keyboard command handling */
                cngetc();
                cnpollc(0);
+#else
+               for(;;) ;
+               /* NOT REACHED */
+#endif
        }
 
        printf("rebooting...\n");

Is this a bad idea?  Any other ideas?

Cheers,
Brook