LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Is devpts configured by CONFIG_UNIX98_PTYS in 2.6.21.5 kernel? (https://www.linuxquestions.org/questions/slackware-14/is-devpts-configured-by-config_unix98_ptys-in-2-6-21-5-kernel-657320/)

raypen 07-21-2008 10:17 PM

Is devpts configured by CONFIG_UNIX98_PTYS in 2.6.21.5 kernel?
 
In menuconfig, CONFIG_UNIX98_PTYS does not appear anywhere, but the
.config file does include it here:

Code:

#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PRINTER=y
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_TIPAR is not set

The only entry in menuconfig relating to PTYS is:
Code:

[ ] Legacy (BSD) PTY support
(256) Maximum number of legacy PTY in use

The help section says you can safely say NO here, which
in fact you can; it has no effect on system operation.

As it turns out, it seems that no setting in menuconfig
removes CONFIG_UNIX98_PTYS=y from .config. This seems to be a
setting built into the configuration. Since this appears to be
related to console operation, it would appear that this is the
kernel support for the "devpts" file system.

If so, is this by design only in Slackware? Other
distributions (Ubuntu) seem to have a menuconfig entry for this.

T3slider 07-21-2008 10:29 PM

The reason you aren't seeing it is because it depends on CONFIG_EMBEDDED. You can search for the UNIX98_PTYS option by pressing the / button in menuconfig and entering the search term. It states that it depends on EMBEDDED, and is located in the Device Drivers -> Character devices section. If you search for EMBEDDED, it indicates that it is located in the General setup section. If you enable the CONFIG_EMBEDDED option ("Configure standard kernel features (for small systems)") in the General setup section, the UNIX98_PTYS option is now available in the Device Drivers -> Character devices section ("Unix98 PTY support").
Quote:

Originally Posted by raypen
If so, is this by design only in Slackware? Other
distributions (Ubuntu) seem to have a menuconfig entry for this.

Slackware uses (almost) vanilla kernels, so nothing should be Slackware-specific. You can take a 100% vanilla kernel and compile it on Slackware and it'll work perfectly (unlike with some other distros).

raypen 07-21-2008 11:17 PM

I thought EMBEDDED was for embedded systems, despite the description.

Regardless, it would seem that UNIX98_PTYS is a necessary kernel function
(Isn't devpts required for the proper functioning of consoles on any 2.6
system?). I suppose you could disable it in favor of legacy PTY support
but that does not seem fitting.

If CONFIG_EMBEDDED is not configured, is UNIX98_PTYS set automatically or
could I select EMBEDDED, turn off UNIX98_PTYS and then turn off EMBEDDED?

T3slider 07-22-2008 08:54 PM

I'm assuming that UNIX98_PTYS is automatically set to Y unless CONFIG_EMBEDDED is selected, in which case you would have to decide whether you want UNIX98_PTYS or not. The help for UNIX98_PTYS says this:
Code:

All modern Linux systems use the Unix98 ptys.  Say Y unless
you're on an embedded system and want to conserve memory.

Therefore, the kernel developers are assuming that everyone would want Unix98 ptys unless they are building a very specific system for a hardware-restricted system (ie an embedded system). I cannot imagine a scenario apart from an embedded system in which I would want to voluntarily disable Unix98 ptys.

raypen 07-22-2008 10:05 PM

I assume we arrived at the conclusion that UNIX98_PTYS enables devpts, which
is the current standard of kernel support for virtual terminals?

It is interesting to note that in every situation except one, UNIX98_PTYS=y
is a default.

After experimenting, it turns out that even setting CONFIG_EMBEDDED does not
turn off UNIX98_PTYS=y. The only way to disable it is to set CONFIG_LEGACY_PTYS=y.

Obviously, there has to be some some setting for virtual terminals and it
seems that the kernel writers have determined that the legacy support is
for embedded systems. As you previously quoted:

Code:

All modern Linux systems use the Unix98 ptys.  Say Y unless
you're on an embedded system and want to conserve memory.

This implies that the devpts system is a memory resident service:
legacy support creates device nodes on the main file system.

I'm not sure this makes any difference to an embedded system assuming that
it must contain all of its code in an imbedded chip. Apparently, the memory
requirements of devpts occupies more space than a single legacy console.

I'm not sure this is correct, but it seems to make some sense. It would
be nice if this was explained in the help section of menuconfig.


All times are GMT -5. The time now is 02:42 PM.