All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Update SERIAL_CONSOLES_CHECK to allow aliasing
@ 2016-08-04  2:36 California Sullivan
  2016-08-04  2:36 ` [PATCH 1/2] sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK California Sullivan
  2016-08-04  2:36 ` [PATCH 2/2] documentation/ref-manual: Update SERIAL_CONSOLES_CHECK description California Sullivan
  0 siblings, 2 replies; 3+ messages in thread
From: California Sullivan @ 2016-08-04  2:36 UTC (permalink / raw)
  To: openembedded-core

This patch set fixes the corner case described in [YOCTO #9440] and
updates its documentation. The documentation was not up to date with
what the code actually does, and I added to its functionality, so it
needed to be completely rewritten.

Scott, please review the documentation patch and feel free to update
it however you see fit. I'm not the best writer and I'm not confident
the description I gave is sufficient.

Thanks,
Cal Sullivan

California Sullivan (2):
  sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK
  documentation/ref-manual: Update SERIAL_CONSOLES_CHECK description

 documentation/ref-manual/ref-variables.xml             | 12 ++++++++----
 meta/conf/documentation.conf                           |  2 +-
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb |  7 +++++--
 3 files changed, 14 insertions(+), 7 deletions(-)

-- 
2.5.5



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK
  2016-08-04  2:36 [PATCH 0/2] Update SERIAL_CONSOLES_CHECK to allow aliasing California Sullivan
@ 2016-08-04  2:36 ` California Sullivan
  2016-08-04  2:36 ` [PATCH 2/2] documentation/ref-manual: Update SERIAL_CONSOLES_CHECK description California Sullivan
  1 sibling, 0 replies; 3+ messages in thread
From: California Sullivan @ 2016-08-04  2:36 UTC (permalink / raw)
  To: openembedded-core

With some hardware the name of the device node and the name in
/proc/console differ. This causes SERIAL_CONSOLES_CHECK to not enable
working consoles in these cases. This patch changes SERIAL_CONSOLES_CHECK
to have an optional alias for the checked consoles. The new format is:

<device>:<alias to check(optional)>

Fixes [YOCTO #9440].

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
---
 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index bdc3416..f136ad8 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -58,9 +58,12 @@ if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
 	tmp="${SERIAL_CONSOLES_CHECK}"
 	for i in $tmp
 	do
-		j=`echo ${i} | sed s/^.*\;//g`
+		j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g`
+		k=`echo ${i} | sed s/^.*\://g`
 		if [ -z "`grep ${j} /proc/consoles`" ]; then
-			sed -i /^.*${j}$/d /etc/inittab
+			if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
+				sed -i /^.*${j}$/d /etc/inittab
+			fi
 		fi
 	done
 	kill -HUP 1
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] documentation/ref-manual: Update SERIAL_CONSOLES_CHECK description
  2016-08-04  2:36 [PATCH 0/2] Update SERIAL_CONSOLES_CHECK to allow aliasing California Sullivan
  2016-08-04  2:36 ` [PATCH 1/2] sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK California Sullivan
@ 2016-08-04  2:36 ` California Sullivan
  1 sibling, 0 replies; 3+ messages in thread
From: California Sullivan @ 2016-08-04  2:36 UTC (permalink / raw)
  To: openembedded-core

The previous description was not accurate. Looking at the code,
SERIAL_CONSOLES_CHECK does not act like SERIAL_CONSOLES, as it will not
add consoles to enable but only check and disable consoles defined by
SERIAL_CONSOLES. Also, the previous patch adds aliasing functionality
that needed to be documented.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
---
 documentation/ref-manual/ref-variables.xml | 12 ++++++++----
 meta/conf/documentation.conf               |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
index 7b1aef0..407b9be 100644
--- a/documentation/ref-manual/ref-variables.xml
+++ b/documentation/ref-manual/ref-variables.xml
@@ -11490,15 +11490,19 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
 
         <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
             <info>
-                SERIAL_CONSOLES_CHECK[doc] = "Similar to SERIAL_CONSOLES except the device is checked for existence before attempting to enable it. Supported only by SysVinit."
+                SERIAL_CONSOLES_CHECK[doc] = "Selected SERIAL_CONSOLES to check against /proc/console before enabling using getty. Supported only by SysVinit."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Similar to
+                    Selected
                     <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
-                    except the device is checked for existence before attempting
-                    to enable it.
+                    to check against /proc/console before enabling using getty. This variable allows aliasing
+                    in the format: &lt;device&gt;:&lt;alias&gt;. If a device was listed as "sclp_line0"
+                    in /dev/ and "ttyS0" in /proc/console, you would do the following:
+                    <literallayout class='monospaced'>
+     SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
+                    </literallayout>
                     This variable is currently only supported with SysVinit
                     (i.e. not with systemd).
                 </para>
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index 51c4116..30edb9d 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -373,7 +373,7 @@ SECTION[doc] = "The section in which packages should be categorized. Package man
 SELECTED_OPTIMIZATION[doc] = "The variable takes the value of FULL_OPTIMIZATION unless DEBUG_BUILD = '1'. In this case, the value of DEBUG_OPTIMIZATION is used."
 SERIAL_CONSOLE[doc] = "The speed and device for the serial port used to attach the serial console. This variable is given to the kernel as the 'console' parameter. After booting occurs, getty is started on that port so remote login is possible."
 SERIAL_CONSOLES[doc] = "Defines the serial consoles (TTYs) to enable using getty."
-SERIAL_CONSOLES_CHECK[doc] = "Similar to SERIAL_CONSOLES except the device is checked for existence before attempting to enable it. Supported only by SysVinit."
+SERIAL_CONSOLES_CHECK[doc] = "Selected SERIAL_CONSOLES to check against /proc/console before enabling using getty. Supported only by SysVinit."
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that should not be used to determine signatures of tasks from one recipe when they depend on tasks from another recipe."
 SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change."
 SITEINFO_BITS[doc] = "Specifies the number of bits for the target system CPU."
-- 
2.5.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-03 23:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-04  2:36 [PATCH 0/2] Update SERIAL_CONSOLES_CHECK to allow aliasing California Sullivan
2016-08-04  2:36 ` [PATCH 1/2] sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECK California Sullivan
2016-08-04  2:36 ` [PATCH 2/2] documentation/ref-manual: Update SERIAL_CONSOLES_CHECK description California Sullivan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.