xref: /openbmc/linux/drivers/tty/Kconfig (revision 413d6ed3)
1# SPDX-License-Identifier: GPL-2.0
2config TTY
3	bool "Enable TTY" if EXPERT
4	default y
5	help
6	  Allows you to remove TTY support which can save space, and
7	  blocks features that require TTY from inclusion in the kernel.
8	  TTY is required for any text terminals or serial port
9	  communication. Most users should leave this enabled.
10
11if TTY
12
13config VT
14	bool "Virtual terminal" if EXPERT
15	depends on !UML
16	select INPUT
17	default y
18	help
19	  If you say Y here, you will get support for terminal devices with
20	  display and keyboard devices. These are called "virtual" because you
21	  can run several virtual terminals (also called virtual consoles) on
22	  one physical terminal. This is rather useful, for example one
23	  virtual terminal can collect system messages and warnings, another
24	  one can be used for a text-mode user session, and a third could run
25	  an X session, all in parallel. Switching between virtual terminals
26	  is done with certain key combinations, usually Alt-<function key>.
27
28	  The setterm command ("man setterm") can be used to change the
29	  properties (such as colors or beeping) of a virtual terminal. The
30	  man page console_codes(4) ("man console_codes") contains the special
31	  character sequences that can be used to change those properties
32	  directly. The fonts used on virtual terminals can be changed with
33	  the setfont ("man setfont") command and the key bindings are defined
34	  with the loadkeys ("man loadkeys") command.
35
36	  You need at least one virtual terminal device in order to make use
37	  of your keyboard and monitor. Therefore, only people configuring an
38	  embedded system would want to say N here in order to save some
39	  memory; the only way to log into such a system is then via a serial
40	  or network connection.
41
42	  If unsure, say Y, or else you won't be able to do much with your new
43	  shiny Linux system :-)
44
45config CONSOLE_TRANSLATIONS
46	depends on VT
47	default y
48	bool "Enable character translations in console" if EXPERT
49	help
50	  This enables support for font mapping and Unicode translation
51	  on virtual consoles.
52
53config VT_CONSOLE
54	bool "Support for console on virtual terminal" if EXPERT
55	depends on VT
56	default y
57	help
58	  The system console is the device which receives all kernel messages
59	  and warnings and which allows logins in single user mode. If you
60	  answer Y here, a virtual terminal (the device used to interact with
61	  a physical terminal) can be used as system console. This is the most
62	  common mode of operations, so you should say Y here unless you want
63	  the kernel messages be output only to a serial port (in which case
64	  you should say Y to "Console on serial port", below).
65
66	  If you do say Y here, by default the currently visible virtual
67	  terminal (/dev/tty0) will be used as system console. You can change
68	  that with a kernel command line option such as "console=tty3" which
69	  would use the third virtual terminal as system console. (Try "man
70	  bootparam" or see the documentation of your boot loader (lilo or
71	  loadlin) about how to pass options to the kernel at boot time.)
72
73	  If unsure, say Y.
74
75config VT_CONSOLE_SLEEP
76	def_bool y
77	depends on VT_CONSOLE && PM_SLEEP
78
79config HW_CONSOLE
80	bool
81	depends on VT && !UML
82	default y
83
84config VT_HW_CONSOLE_BINDING
85	bool "Support for binding and unbinding console drivers"
86	depends on HW_CONSOLE
87	help
88	  The virtual terminal is the device that interacts with the physical
89	  terminal through console drivers. On these systems, at least one
90	  console driver is loaded. In other configurations, additional console
91	  drivers may be enabled, such as the framebuffer console. If more than
92	  1 console driver is enabled, setting this to 'y' will allow you to
93	  select the console driver that will serve as the backend for the
94	  virtual terminals.
95
96	  See <file:Documentation/driver-api/console.rst> for more
97	  information. For framebuffer console users, please refer to
98	  <file:Documentation/fb/fbcon.rst>.
99
100config UNIX98_PTYS
101	bool "Unix98 PTY support" if EXPERT
102	default y
103	help
104	  A pseudo terminal (PTY) is a software device consisting of two
105	  halves: a master and a slave. The slave device behaves identical to
106	  a physical terminal; the master device is used by a process to
107	  read data from and write data to the slave, thereby emulating a
108	  terminal. Typical programs for the master side are telnet servers
109	  and xterms.
110
111	  Linux has traditionally used the BSD-like names /dev/ptyxx for
112	  masters and /dev/ttyxx for slaves of pseudo terminals. This scheme
113	  has a number of problems. The GNU C library glibc 2.1 and later,
114	  however, supports the Unix98 naming standard: in order to acquire a
115	  pseudo terminal, a process opens /dev/ptmx; the number of the pseudo
116	  terminal is then made available to the process and the pseudo
117	  terminal slave can be accessed as /dev/pts/<number>. What was
118	  traditionally /dev/ttyp2 will then be /dev/pts/2, for example.
119
120	  All modern Linux systems use the Unix98 ptys.  Say Y unless
121	  you're on an embedded system and want to conserve memory.
122
123config LEGACY_PTYS
124	bool "Legacy (BSD) PTY support"
125	default y
126	help
127	  A pseudo terminal (PTY) is a software device consisting of two
128	  halves: a master and a slave. The slave device behaves identical to
129	  a physical terminal; the master device is used by a process to
130	  read data from and write data to the slave, thereby emulating a
131	  terminal. Typical programs for the master side are telnet servers
132	  and xterms.
133
134	  Linux has traditionally used the BSD-like names /dev/ptyxx
135	  for masters and /dev/ttyxx for slaves of pseudo
136	  terminals. This scheme has a number of problems, including
137	  security.  This option enables these legacy devices; on most
138	  systems, it is safe to say N.
139
140config LEGACY_PTY_COUNT
141	int "Maximum number of legacy PTY in use"
142	depends on LEGACY_PTYS
143	range 0 256
144	default "256"
145	help
146	  The maximum number of legacy PTYs that can be used at any one time.
147	  The default is 256, and should be more than enough.  Embedded
148	  systems may want to reduce this to save memory.
149
150	  When not in use, each legacy PTY occupies 12 bytes on 32-bit
151	  architectures and 24 bytes on 64-bit architectures.
152
153config LDISC_AUTOLOAD
154	bool "Automatically load TTY Line Disciplines"
155	default y
156	help
157	  Historically the kernel has always automatically loaded any
158	  line discipline that is in a kernel module when a user asks
159	  for it to be loaded with the TIOCSETD ioctl, or through other
160	  means.  This is not always the best thing to do on systems
161	  where you know you will not be using some of the more
162	  "ancient" line disciplines, so prevent the kernel from doing
163	  this unless the request is coming from a process with the
164	  CAP_SYS_MODULE permissions.
165
166	  Say 'Y' here if you trust your userspace users to do the right
167	  thing, or if you have only provided the line disciplines that
168	  you know you will be using, or if you wish to continue to use
169	  the traditional method of on-demand loading of these modules
170	  by any user.
171
172	  This functionality can be changed at runtime with the
173	  dev.tty.ldisc_autoload sysctl, this configuration option will
174	  only set the default value of this functionality.
175
176source "drivers/tty/serial/Kconfig"
177
178config SERIAL_NONSTANDARD
179	bool "Non-standard serial port support"
180	depends on HAS_IOMEM
181	help
182	  Say Y here if you have any non-standard serial boards -- boards
183	  which aren't supported using the standard "dumb" serial driver.
184	  This includes intelligent serial boards such as
185	  Digiboards, etc. These are usually used for systems that need many
186	  serial ports because they serve many terminals or dial-in
187	  connections.
188
189	  Note that the answer to this question won't directly affect the
190	  kernel: saying N will just cause the configurator to skip all
191	  the questions about non-standard serial boards.
192
193	  Most people can say N here.
194
195config MOXA_INTELLIO
196	tristate "Moxa Intellio support"
197	depends on SERIAL_NONSTANDARD && (ISA || EISA || PCI)
198	select FW_LOADER
199	help
200	  Say Y here if you have a Moxa Intellio multiport serial card.
201
202	  To compile this driver as a module, choose M here: the
203	  module will be called moxa.
204
205config MOXA_SMARTIO
206	tristate "Moxa SmartIO support v. 2.0"
207	depends on SERIAL_NONSTANDARD && (PCI || EISA || ISA)
208	help
209	  Say Y here if you have a Moxa SmartIO multiport serial card and/or
210	  want to help develop a new version of this driver.
211
212	  This is upgraded (1.9.1) driver from original Moxa drivers with
213	  changes finally resulting in PCI probing.
214
215	  This driver can also be built as a module. The module will be called
216	  mxser. If you want to do that, say M here.
217
218config SYNCLINK_GT
219	tristate "SyncLink GT/AC support"
220	depends on SERIAL_NONSTANDARD && PCI
221	help
222	  Support for SyncLink GT and SyncLink AC families of
223	  synchronous and asynchronous serial adapters
224	  manufactured by Microgate Systems, Ltd. (www.microgate.com)
225
226config N_HDLC
227	tristate "HDLC line discipline support"
228	depends on SERIAL_NONSTANDARD
229	help
230	  Allows synchronous HDLC communications with tty device drivers that
231	  support synchronous HDLC such as the Microgate SyncLink adapter.
232
233	  This driver can be built as a module ( = code which can be
234	  inserted in and removed from the running kernel whenever you want).
235	  The module will be called n_hdlc. If you want to do that, say M
236	  here.
237
238config PPC_EPAPR_HV_BYTECHAN
239	bool "ePAPR hypervisor byte channel driver"
240	depends on PPC
241	select EPAPR_PARAVIRT
242	help
243	  This driver creates /dev entries for each ePAPR hypervisor byte
244	  channel, thereby allowing applications to communicate with byte
245	  channels as if they were serial ports.
246
247config PPC_EARLY_DEBUG_EHV_BC
248	bool "Early console (udbg) support for ePAPR hypervisors"
249	depends on PPC_EPAPR_HV_BYTECHAN=y
250	help
251	  Select this option to enable early console (a.k.a. "udbg") support
252	  via an ePAPR byte channel.  You also need to choose the byte channel
253	  handle below.
254
255config PPC_EARLY_DEBUG_EHV_BC_HANDLE
256	int "Byte channel handle for early console (udbg)"
257	depends on PPC_EARLY_DEBUG_EHV_BC
258	default 0
259	help
260	  If you want early console (udbg) output through a byte channel,
261	  specify the handle of the byte channel to use.
262
263	  For this to work, the byte channel driver must be compiled
264	  in-kernel, not as a module.
265
266	  Note that only one early console driver can be enabled, so don't
267	  enable any others if you enable this one.
268
269	  If the number you specify is not a valid byte channel handle, then
270	  there simply will be no early console output.  This is true also
271	  if you don't boot under a hypervisor at all.
272
273config GOLDFISH_TTY
274	tristate "Goldfish TTY Driver"
275	depends on GOLDFISH
276	select SERIAL_CORE
277	select SERIAL_CORE_CONSOLE
278	help
279	  Console and system TTY driver for the Goldfish virtual platform.
280
281config GOLDFISH_TTY_EARLY_CONSOLE
282	bool
283	default y if GOLDFISH_TTY=y
284	select SERIAL_EARLYCON
285
286config N_GSM
287	tristate "GSM MUX line discipline support (EXPERIMENTAL)"
288	depends on NET
289	help
290	  This line discipline provides support for the GSM MUX protocol and
291	  presents the mux as a set of 61 individual tty devices.
292
293config NOZOMI
294	tristate "HSDPA Broadband Wireless Data Card - Globe Trotter"
295	depends on PCI
296	help
297	  If you have a HSDPA driver Broadband Wireless Data Card -
298	  Globe Trotter PCMCIA card, say Y here.
299
300	  To compile this driver as a module, choose M here, the module
301	  will be called nozomi.
302
303config MIPS_EJTAG_FDC_TTY
304	bool "MIPS EJTAG Fast Debug Channel TTY"
305	depends on MIPS_CDMM
306	help
307	  This enables a TTY and console on the MIPS EJTAG Fast Debug Channels,
308	  if they are present. This can be useful when working with an EJTAG
309	  probe which supports it, to get console output and a login prompt via
310	  EJTAG without needing to connect a serial cable.
311
312	  TTY devices are named e.g. ttyFDC3c2 (for FDC channel 2 of the FDC on
313	  CPU3).
314
315	  The console can be enabled with console=fdc1 (for FDC channel 1 on all
316	  CPUs). Do not use the console unless there is a debug probe attached
317	  to drain the FDC TX FIFO.
318
319	  If unsure, say N.
320
321config MIPS_EJTAG_FDC_EARLYCON
322	bool "Early FDC console"
323	depends on MIPS_EJTAG_FDC_TTY
324	help
325	  This registers a console on FDC channel 1 very early during boot (from
326	  MIPS arch code). This is useful for bring-up and debugging early boot
327	  issues.
328
329	  Do not enable unless there is a debug probe attached to drain the FDC
330	  TX FIFO.
331
332	  If unsure, say N.
333
334config MIPS_EJTAG_FDC_KGDB
335	bool "Use KGDB over an FDC channel"
336	depends on MIPS_EJTAG_FDC_TTY && KGDB
337	default y
338	help
339	  This enables the use of KGDB over an FDC channel, allowing KGDB to be
340	  used remotely or when a serial port isn't available.
341
342config MIPS_EJTAG_FDC_KGDB_CHAN
343	int "KGDB FDC channel"
344	depends on MIPS_EJTAG_FDC_KGDB
345	range 2 15
346	default 3
347	help
348	  FDC channel number to use for KGDB.
349
350config NULL_TTY
351	tristate "NULL TTY driver"
352	help
353	  Say Y here if you want a NULL TTY which simply discards messages.
354
355	  This is useful to allow userspace applications which expect a console
356	  device to work without modifications even when no console is
357	  available or desired.
358
359	  In order to use this driver, you should redirect the console to this
360	  TTY, or boot the kernel with console=ttynull.
361
362	  If unsure, say N.
363
364config VCC
365	tristate "Sun Virtual Console Concentrator"
366	depends on SUN_LDOMS
367	help
368	  Support for Sun logical domain consoles.
369
370source "drivers/tty/hvc/Kconfig"
371
372endif # TTY
373
374source "drivers/tty/serdev/Kconfig"
375