Re: nullconsole?

2007-01-18 Thread fabioFVZ
On 10:15 Wed 17 Jan , Martin Hedenfalk wrote:
 Hello list,
 
 Is there a nullconsole in OpenBSD, similar to the nullconsole in FreeBSD?

in /usr/src/sys/kern/subr_prf.c

in printf function:

--  retval = kprintf(fmt, TOCONS | TOLOG, NULL, NULL, ap);
++  retval = kprintf(fmt, TOLOG, NULL, NULL, ap);

and recompile it.

I don't know if this is a good thing...but for now i use it :)

fabioFVZ

OpenCON 2007 :)



nullconsole?

2007-01-17 Thread Martin Hedenfalk

Hello list,

Is there a nullconsole in OpenBSD, similar to the nullconsole in FreeBSD?

I have a WRAP box where I need to use the serial port to interface an
external device. I don't want the default console on the serial port,
because any kernel console messages would disturb the communication.

On the WRAP, set tty pc0 in /etc/boot.conf still uses the serial
port. This might be due to some BIOS setting, but I'd rather not
change that as re-setting the BIOS seems to be non-trivial.

What I'm looking for is a set tty none or similar in /etc/boot.conf.
Any ideas?
Otherwise I'll go ahead and implement it myself.

TIA
  Martin Hedenfalk



Re: nullconsole?

2007-01-17 Thread Adriaan

On 1/17/07, Martin Hedenfalk [EMAIL PROTECTED] wrote:

Hello list,

Is there a nullconsole in OpenBSD, similar to the nullconsole in FreeBSD?

I have a WRAP box where I need to use the serial port to interface an
external device. I don't want the default console on the serial port,
because any kernel console messages would disturb the communication.



Comment out the line in /etc/syslog.conf that sends stuff to
/dev/console. On my 4.0-current box that isthe default BTW

# Uncomment this line to send important messages to the system
# console: be aware that this could create lots of output.
#*.err;auth.notice;authpriv.none;kern.debug;mail.crit   /dev/console

==Adriaan==



Re: nullconsole?

2007-01-17 Thread Lars Hansson
On Wednesday 17 January 2007 17:15, Martin Hedenfalk wrote:
 Is there a nullconsole in OpenBSD, similar to the nullconsole in FreeBSD?

Not that I know but you could always set it to a non-existant tty (com1?), I 
guess.
But that's not the problem here though...

 On the WRAP, set tty pc0 in /etc/boot.conf still uses the serial
 port. This might be due to some BIOS setting, but I'd rather not
 change that as re-setting the BIOS seems to be non-trivial.

This sounds like the BIOS is redirecting vga to the serial port and if that is 
the case the only way to use the serial port is to disable the console 
redirection in BIOS.


 What I'm looking for is a set tty none or similar in /etc/boot.conf.
If the WRAP is using console redirection this wont help.

---
Lars Hansson



Re: nullconsole?

2007-01-17 Thread Martin Hedenfalk

On 1/17/07, Lars Hansson [EMAIL PROTECTED] wrote:

On Wednesday 17 January 2007 17:15, Martin Hedenfalk wrote:
 Is there a nullconsole in OpenBSD, similar to the nullconsole in FreeBSD?

Not that I know but you could always set it to a non-existant tty (com1?), I
guess.
But that's not the problem here though...


I've tried it, and set tty com1 didn't work. Not sure exactly what
happened but it didn't boot properly anyway.


 On the WRAP, set tty pc0 in /etc/boot.conf still uses the serial
 port. This might be due to some BIOS setting, but I'd rather not
 change that as re-setting the BIOS seems to be non-trivial.

This sounds like the BIOS is redirecting vga to the serial port and if that is
the case the only way to use the serial port is to disable the console
redirection in BIOS.


 What I'm looking for is a set tty none or similar in /etc/boot.conf.
If the WRAP is using console redirection this wont help.


If it was possible to set the default console to nullconsole, ie
discarding all console I/O, what other part of the system would write
(directly) to pc0?

   -martin



Re: nullconsole?

2007-01-17 Thread Joachim Schipper
On Wed, Jan 17, 2007 at 06:32:33PM +0800, Lars Hansson wrote:
 On Wednesday 17 January 2007 17:15, Martin Hedenfalk wrote:
  Is there a nullconsole in OpenBSD, similar to the nullconsole in FreeBSD?
 
 Not that I know but you could always set it to a non-existant tty
 (com1?), I guess. But that's not the problem here though...
 
  On the WRAP, set tty pc0 in /etc/boot.conf still uses the serial
  port. This might be due to some BIOS setting, but I'd rather not
  change that as re-setting the BIOS seems to be non-trivial.
 
 This sounds like the BIOS is redirecting vga to the serial port and if
 that is the case the only way to use the serial port is to disable the
 console redirection in BIOS.
 
 
  What I'm looking for is a set tty none or similar in /etc/boot.conf.
 If the WRAP is using console redirection this wont help.

Why not? If you set the system console device to some non-existent com1,
as you state above, and disable most everything in /etc/ttys, wouldn't
you be able to make sure the system doesn't use the vga port?

Joachim



Re: nullconsole?

2007-01-17 Thread Lars Hansson
On Wednesday 17 January 2007 19:47, Joachim Schipper wrote:
 Why not? If you set the system console device to some non-existent com1,
 as you state above, and disable most everything in /etc/ttys, wouldn't
 you be able to make sure the system doesn't use the vga port?

I wa thinking of the messages that the BIOS itself usuallt outputs and that 
those would interfere with whatever device is connected.
setting tty to com1 apparently doesn't work either.

---
Lars Hansson



Re: nullconsole?

2007-01-17 Thread Lars Hansson
On Wednesday 17 January 2007 19:39, Martin Hedenfalk wrote:
 If it was possible to set the default console to nullconsole, ie
 discarding all console I/O, what other part of the system would write
 (directly) to pc0?

The BIOS messages that appear before the OS or bootloader is even running.

---
Lars Hansson



Re: nullconsole?

2007-01-17 Thread Jeff Quast

On 1/17/07, Joachim Schipper [EMAIL PROTECTED] wrote:

On Wed, Jan 17, 2007 at 06:32:33PM +0800, Lars Hansson wrote:
 If the WRAP is using console redirection this wont help.


there is no such thing, as wrap is headless anyway.



Why not? If you set the system console device to some non-existent com1,
as you state above, and disable most everything in /etc/ttys, wouldn't
you be able to make sure the system doesn't use the vga port?

   Joachim




there is no vga port on the wrap

http://www.pcengines.ch



Re: nullconsole?

2007-01-17 Thread Martin Hedenfalk

On 1/17/07, Lars Hansson [EMAIL PROTECTED] wrote:

On Wednesday 17 January 2007 19:39, Martin Hedenfalk wrote:
 If it was possible to set the default console to nullconsole, ie
 discarding all console I/O, what other part of the system would write
 (directly) to pc0?

The BIOS messages that appear before the OS or bootloader is even running.


Sure, but that output would be acceptable.

I'll implement a nullconsole and post a patch to [EMAIL PROTECTED]

   -martin