Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Apr 2010 17:24:35 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        freebsd-questions@freebsd.org
Subject:   disabling all serial input / output at boot time
Message-ID:  <201004132124.o3DLOaij062046@lava.sentex.ca>

next in thread | raw e-mail | index | archive | help

I have an embedded device (Alix box) that is running RELENG_8 off a 
CF that is designed to monitor / control a serial sensor device.  The 
sensor is quite chatty and is always outputing data at 115200.  The 
problem is that this will interrupt the boot process.

I managed to get around boot0 by making this small hack (if there is 
a better way, please let me know.

0(ich10)# diff -u boot0.S.o boot0.S
--- boot0.S.o   2010-04-13 15:11:22.000000000 -0400
+++ boot0.S     2010-04-13 15:27:02.000000000 -0400
@@ -356,7 +356,9 @@
          */
  #ifndef SIO
                 movb $0x1,%ah                   # BIOS: Check
-               int $0x16                       #  for keypress
+               /* int $0x16 */                 #  for keypress
+               testb $0x02,%ah
+
  #else /* SIO */
                 movb $0x03,%ah                  # BIOS: Read COM
                 call bioscom
@@ -538,7 +540,8 @@
                 pushw %bx                       # Save
                 movw $0x7,%bx                   # Page:attribute
                 movb $0xe,%ah                   # BIOS: Display
-               int $0x10                       #  character
+               /* int $0x10                    #  character  */
+               nop
                 popw %bx                        # Restore
  #else /* SIO */
                 movb $0x01,%ah                  # BIOS: Send
1(ich10)#


and I added in /boot/loader.conf

console="nullconsole"

I also tried
# cat /boot.config
-nmq

But when I put an inline serial monitor to see why things are getting 
hung up, I still see the "spinning slashes" (/) show up.  After that, 
it seems the boot process is hung and it never fully boots.  There 
seems to be a window of opportunity where key presses on the serial 
console stop/pause one of the boot stages.. but boot.config should 
prevent that no ? I even tried to "fake" it out, but trying to make 
com2, the console in /boot/device.hints, but I still see the spinning 
slashes on com1

Is there any way to completely disable serial interaction and to 
truly make the bootup process quiet and non interactive ?

         ---Mike


--------------------------------------------------------------------
Mike Tancsa,                                      tel +1 519 651 3400
Sentex Communications,                            mike@sentex.net
Providing Internet since 1994                    www.sentex.net
Cambridge, Ontario Canada                         www.sentex.net/mike




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004132124.o3DLOaij062046>