[meta-freescale] [meta-fsl-arm][PATCH] xserver-xorg-extension-viv-hdmi: Add autohdmi utility
Otavio Salvador
otavio at ossystems.com.br
Wed Aug 6 11:21:40 PDT 2014
On Wed, Aug 6, 2014 at 3:06 PM, Neena Busireddy
<neena.busireddy at freescale.com> wrote:
> This utility is used to monitor hdmi display hot plugin and
> reconfigure xserver (through exa driver)if it detects the
Typo. Please use space between ) and if.
Hot plugin? or hotplug?
> display change.
>
> This utility can be disabled if the display is not
> changed dynamically.
>
> Signed-off-by: Neena Busireddy <neena.busireddy at freescale.com>
I think most users do not change the display dynamically in their
products (as I never saw this question here) so it should be /off/ by
default.
> ---
> .../xserver-xorg-extension-viv-hdmi/rc.local.etc | 17 +++++
> .../xserver-xorg-extension-viv-hdmi/rc.local.init | 36 ++++++++++
> ...server-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb | 73 ++++++++++++++++++++
> 3 files changed, 126 insertions(+)
> create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
> create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
> create mode 100644 recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
Neena (Lauren in cc), I already explained that rc.local is NOT
intended to be used this way. Use rc.autohdmi
> diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
> new file mode 100644
> index 0000000..3c55ef5
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.etc
> @@ -0,0 +1,17 @@
> +#!/bin/sh -e
> +#
> +# rc.local
rc.autohdmi
> +# This script is executed at the end of each multiuser runlevel.
> +# Make sure that the script will "exit 0" on success or any other
> +# value on error.
> +#
> +# In order to enable or disable this script just change the execution
> +# bits.
> +#
> +# By default this script does nothing.
> +
> +export DISPLAY=:0
> +autohdmi &
> +
> +exit 0
If user runs this twice? does it fail? proper exit?
> diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
> new file mode 100644
> index 0000000..c897f6d
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi/rc.local.init
> @@ -0,0 +1,36 @@
> +#! /bin/sh
> +### BEGIN INIT INFO
> +# Provides: rc.hdmi
> +# Required-Start: $all
> +# Required-Stop:
> +# Default-Start: 2 3 4 5
> +# Default-Stop:
> +# Short-Description: Run /etc/rc.hdmi if it exist
> +### END INIT INFO
rc.autohdmi
> +PATH=/sbin:/usr/sbin:/bin:/usr/bin
> +
> +do_start() {
> + if [ -x /etc/rc.hdmi ]; then
> + echo -n "Running local boot scripts (/etc/rc.hdmi)"
> + /etc/rc.hdmi
rc.autohdmi and don't need two scripts. Merge the etc and init in a single one.
> + [ $? = 0 ] && echo "." || echo "error"
> + return $ES
> + fi
> +}
> +
> +case "$1" in
> + start)
> + do_start
> + ;;
> + restart|reload|force-reload)
> + echo "Error: argument '$1' not supported" >&2
> + exit 3
> + ;;
> + stop)
> + ;;
> + *)
> + echo "Usage: $0 start|stop" >&2
> + exit 3
> + ;;
> +esac
> diff --git a/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
> new file mode 100644
> index 0000000..0f17507
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xserver-xorg-extension-viv-hdmi_3.10.17-1.0.0.bb
> @@ -0,0 +1,73 @@
> +# Copyright (C) 2014 Freescale Semiconductor
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +DESCRIPTION = "Freescale Extension for HDMI performance"
> +LICENSE = "MIT-X"
> +
> +DEPENDS += "virtual/kernel xf86-video-imxfb-vivante"
> +
> +LIC_FILES_CHKSUM = "file://EXA/src/vivante_fbdev/vivante.h;endline=19;md5=641ac6e6d013833e36290797f4d7089c"
> +
> +SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \
> + file://rc.local.etc \
> + file://rc.local.init"
rc.autohdmi
> +S="${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/"
> +
> +SRC_URI[md5sum] = "697d9a3fb244eb95eae4207bf2d9c321"
> +SRC_URI[sha256sum] = "9178c6b721e55645bedf6d2cfaf836f5c6e2684673215358a6b6845c10a7a085"
> +
> +inherit update-rc.d autotools pkgconfig
> +
> +INITSCRIPT_NAME = "rc.hdmi"
> +INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
> +
> +EXTRA_OEMAKE += "-C ${S}/util/autohdmi -f makefile.linux prefix=${D}/usr \
> + sysroot=${STAGING_DIR_TARGET} \
> + BUSID_HAS_NUMBER=1 \
> + BUILD_IN_YOCTO=1 \
> + XSERVER_GREATER_THAN_13=1"
> +
> +# FIXME: The Freescale provided Makefile has hardcodec include paths
> +# and this does not work in case prefix is different than /usr,
> +# sed it.
> +do_configure_prepend () {
> + sed -i 's,$(sysroot)/usr/include,${STAGING_INCDIR},g' \
> + ${S}FslExt/src/makefile.linux
> +}
> +
> +# FIXME: This is need as Freescale didn't use standard Makefile filename
> +# thus oe_runmame thinks nothing is need to be done, use ln to
> +# workaround it.
> +base_do_compile () {
> + oe_runmake || die "make failed"
> +}
> +
> +do_compile_append () {
> +
> +oe_runmake -C ${S}/FslExt/src
> +
> +}
> +
> +do_install () {
> +
> + install -d ${D}${libdir}
> + cp -axr ${S}/FslExt/src/libfsl_x11_ext.so ${D}${libdir}
> +
> + install -d ${D}${exec_prefix}/sbin
> + cp -axr ${S}/util/autohdmi/autohdmi ${D}${exec_prefix}/sbin
> +
> + install -d ${D}/${sysconfdir}/init.d
> + install -m 755 ${WORKDIR}/rc.local.init ${D}/${sysconfdir}/init.d/rc.hdmi
> + install -m 755 ${WORKDIR}/rc.local.etc ${D}/${sysconfdir}/rc.hdmi
> +
> +}
> +
> +RDEPENDS_${PN} = "xf86-video-imxfb-vivante"
> +
> +REALSOLIBS := "${SOLIBS}"
> +SOLIBS = "${SOLIBSDEV}"
> +
> +FILES_${PN} = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/sbin/autohdmi ${sysconfdir}/init.d ${sysconfdir}/rc.hdmi"
> +
> +PACKAGE_ARCH = "${MACHINE_SOCARCH}"
> +COMPATIBLE_MACHINE = "(mx6)"
Same comments of
http://article.gmane.org/gmane.linux.embedded.yocto.meta-freescale/8198/match=autohdmi
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
More information about the meta-freescale
mailing list