1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
<table class="head">
<tr>
<td class="head-ltitle">CONS(4)</td>
<td class="head-vol">Device Drivers Manual (x86)</td>
<td class="head-rtitle">CONS(4)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">console</code> — <span class="Nd">x86
console interface</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">options CONSDEVNAME=string</code>
<br/>
<code class="Cd">options CONADDR=integer</code>
<br/>
<code class="Cd">options CONSPEED=integer</code>
<br/>
<code class="Cd">options CONS_OVERRIDE</code>
<br/>
<code class="Cd">options CONMODE=integer</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The “console” device is used for
<i class="Em">kernel printf</i> messages and accesses to the
<span class="Pa">/dev/console</span> character special device in user mode.
It is attached to a hardware interface at boot time controlled by options in
the kernel configuration file, or information passed by the boot loader.</p>
<p class="Pp">Bootblocks from <span class="Ux">NetBSD 1.4</span> or newer select
their console device from a compiled-in list, and then pass their choice of
console device and console parameters to the kernel.</p>
<p class="Pp">As of <span class="Ux">NetBSD 1.5</span>, the
<code class="Ic">consdev</code> bootblock command allows changing the
console device on-the-fly.</p>
<p class="Pp">The kernel will use the same console device as the bootblock; no
special kernel configuration is required.</p>
<p class="Pp">To override the bootblock's choice of console, or to use a serial
kernel console with older bootblocks, you must specify kernel config-file
options to override the information passed by the bootblock. The current
option choices are:</p>
<dl class="Bl-tag">
<dt>- the standard PC keyboard and display</dt>
<dd>(with either the “pc” or the <a class="Xr">wscons(4)</a>
driver)</dd>
<dt>- standard PC serial ports</dt>
<dd>(with <a class="Xr">com(4)</a> driver)</dd>
</dl>
<p class="Pp">The available <i class="Em">kernel configuration</i> options
are:</p>
<dl class="Bl-ohang">
<dt><code class="Cd">options CONSDEVNAME=string</code></dt>
<dd>specifies the name of the console device. Valid values are
“pc” for the pc keyboard / display (default) and
“com” for a serial port.</dd>
<dt><code class="Cd">options CONADDR=integer</code></dt>
<dd>sets the base address for the serial console port (default: 0x3f8).</dd>
<dt><code class="Cd">options CONSPEED=integer</code></dt>
<dd>sets the baudrate for the serial console (default: 9600).</dd>
<dt><code class="Cd">options CONS_OVERRIDE</code></dt>
<dd>causes console information passed by the bootloader to be ignored and the
settings specified by the three options above (or the defaults) to be
used. Default behaviour is to use the settings from the bootloader if
present, and to use option / default values only if no information was
passed.</dd>
<dt id="CS8"><code class="Cd">options CONMODE=integer</code></dt>
<dd>allows to specify terminal control flags. The argument is a
“cflag” value, see <a class="Xr">termios(4)</a> for details.
Default is (<code class="Li">CREAD</code> |
<a class="permalink" href="#CS8"><code class="Li">CS8</code></a> |
<a class="permalink" href="#HUPCL"><code class="Li" id="HUPCL">HUPCL</code></a>)
(8N1). This option takes always effect, because mode settings are not
passed by the bootloader.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag">
<dt><span class="Pa">/dev/console</span></dt>
<dd style="width: auto;"> </dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<p class="Pp"><code class="Cd">options
CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">config(1)</a>, <a class="Xr">tty(4)</a>,
<a class="Xr">boot(8)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1>
<p class="Pp">The console device is chosen early in system startup regardless if
the specified driver / device is present in the system configuration file.
If the driver asked for by the bootloader or
“<code class="Cd">options CONSDEVNAME</code>” is not
configured into the system, a panic is caused. Because there is no console
device, no explaining message will be printed. If the driver is present, but
the specific device instance not, kernel printf will work, but
<span class="Pa">/dev/console</span> becomes a dummy.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">September 6, 2006</td>
<td class="foot-os">NetBSD 10.1</td>
</tr>
</table>
|