[OE-core] [PATCH] Remove ttyS* from /etc/inittab that are not present
Otavio Salvador
otavio at ossystems.com.br
Fri Nov 18 00:08:02 UTC 2011
NACK!
This enforces online use so won't work for read-only-fs.
Please use SERIAL_CONSOLE value to write iniitab but supporting offline use
On Thu, Nov 17, 2011 at 20:47, Matthew McClintock <msm at freescale.com> wrote:
> This will prevent error message that pop up when the serial
> port is not present
> ---
> This seems quite hacky to me, but we have an issue where if we remove
> a serial port from the device tree the serial port won't work.
>
> It seems link it's still in /dev/ttySN but it's not configured properly.
> I looked for udev rules and items in /proc and /sys to try to use but
> I did not see anything...
>
> Is there a better approach than this?
>
> .../sysvinit/sysvinit-inittab_2.88dsf.bb | 19 ++++++++++++++++++-
> 1 files changed, 18 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> index 3a716d7..3031442 100644
> --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
> @@ -2,7 +2,7 @@ DESCRIPTION = "Inittab for sysvinit"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
>
> -PR = "r6"
> +PR = "r7"
>
> SRC_URI = "file://COPYING \
> file://inittab"
> @@ -56,6 +56,23 @@ EOF
> fi
> }
>
> +pkg_postinst_${PN} () {
> +# run this on the target
> +if [ "x$D" == "x" ]; then
> + tmp="${SERIAL_CONSOLES}"
> + for i in $tmp
> + do
> + j=`echo ${i} | sed s/^.*\;//g`
> + if [ -z "`dmesg | grep ${j}`" ]; then
> + sed -i /^.*${j}$/d /etc/inittab
> + fi
> + done
> + kill -HUP 1
> +fi
> +
> +exit 1
> +}
> +
> # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
> # Set PACKAGE_ARCH appropriately.
> PACKAGE_ARCH = "${MACHINE_ARCH}"
> --
> 1.7.6.1
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
More information about the Openembedded-core
mailing list