Bug 9440 - SERIAL_CONSOLES_CHECK doesn't work if kernel console name and device node name differ
Summary: SERIAL_CONSOLES_CHECK doesn't work if kernel console name and device node nam...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.3
Hardware: Other other
: Medium+ normal
Target Milestone: 2.2 M3
Assignee: California Sullivan
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-04-12 12:45 UTC by Sascha Silbe
Modified: 2016-08-12 13:30 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Silbe 2016-04-12 12:45:43 UTC
On some systems, the name of the kernel console (as used for console= on the kernel command line and seen in /proc/consoles) and the name of the corresponding user-space device node can differ. E.g. on s390x (z/Architecture, "mainframes") the kernel consoles are named "ttyS0" and "ttyS1" (probably for historic reasons) but the device nodes are named "sclp_line0" and "ttysclp0".

The postinst script installed by meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb checks the device node name of each TTY listed in SERIAL_CONSOLES_CHECK against /proc/consoles. For the above reason, that fails on s390x and the consoles will be disabled even if they are actually present, working and even in use by the kernel.

Since the purpose of SERIAL_CONSOLES_CHECK is to avoid starting gettys for on device nodes that do not exist, the easiest fix is to check for existence of the device node rather than grepping through /proc/consoles.
Comment 1 California Sullivan 2016-08-10 23:09:13 UTC
Just checking the device node isn't quite right, as it showing up in dev doesn't guarantee its a working serial console. E.g., with the default configuration used in meta-intel, device nodes are created for ttyS0-ttyS3, but on a MinnowBoard Max or Turbot only ttyS0 will be a real working serial port.

Instead, I opted to update the SERIAL_CONSOLES_CHECK variable to allow aliasing.

Patch: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=da72327ab03cbbb72ce999a167e7e3b4b4aa736a

Documentation patch: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/commit/?id=020f927bc01d662601fb44b19e4c6bc70e5e5ee7