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