[meta-freescale] [meta-fsl-arm][PATCH 15/16] xf86-video-imxfb-vivante: Add autohdmi utility

Otavio Salvador otavio at ossystems.com.br
Thu Jan 22 07:13:35 PST 2015


Hello Lauren, Hello Neena,

Some comments below ...

On Wed, Jan 21, 2015 at 12:44 PM, Lauren Post <lauren.post at freescale.com> wrote:
> From: Neena Busireddy <neena.busireddy at freescale.com>
>
> This utility is used to monitor hdmi display hot plug and reconfigure
> xserver (through exa driver) if it detects the display change.
>
> Signed-off-by: Neena Busireddy <neena.busireddy at freescale.com>
...
> +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/rc.autohdmi
> @@ -0,0 +1,32 @@
> +#! /bin/sh
> +### BEGIN INIT INFO
> +# Provides:          rc.autohdmi
> +# Required-Start:    $all
> +# Required-Stop:
> +# Default-Start:     2 3 4 5
> +# Default-Stop:
> +### END INIT INFO
> +
> +PATH=/sbin:/usr/sbin:/bin:/usr/bin
> +
> +do_start() {
> +       export DISPLAY=:0
> +       autohdmi &
> +       exit 0
> +}
> +
> +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
> +        ;;

You should implement the stop and restart commands. You can rely on
the killproc function to kill the application and start it again.

It is available in
http://git.openembedded.org/openembedded-core/tree/meta/recipes-core/initscripts/initscripts-1.0/functions#n25

> +esac
> diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.10.53-1.1.0.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.10.53-1.1.0.bb
> index 0b5e9ff..8e428ab 100644
> --- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.10.53-1.1.0.bb
> +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_3.10.53-1.1.0.bb
> @@ -6,17 +6,22 @@ require recipes-graphics/xorg-driver/xorg-driver-video.inc
>
>  PE = "3"
>
> -inherit autotools-brokensep
> +inherit autotools-brokensep update-rc.d pkgconfig
>
>  DEPENDS += "virtual/xserver virtual/libx11 virtual/libgal-x11 imx-gpu-viv pixman"
>
>  LIC_FILES_CHKSUM = "file://EXA/src/vivante_fbdev/vivante.h;endline=19;md5=95cf961a2ceacdf7cf43caef25766779"
>
> -SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz"
> +SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \
> +            file://rc.autohdmi"
> +
>  SRC_URI[md5sum] = "3ffa0f66bc0935a50cda9ebd5240ee2d"
>  SRC_URI[sha256sum] = "f5836d86944a667f9fd1789911cdb7d8c54f6158a7776d28124942c4a94ddff6"
>
> -EXTRA_OEMAKE += "-C EXA/src -f makefile.linux prefix=${D}/usr \
> +INITSCRIPT_NAME = "rc.autohdmi"
> +INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
> +
> +EXTRA_OEMAKE += "-C ${S} -d -f Makefile prefix=${D}/usr \
>                   sysroot=${STAGING_DIR_TARGET} \
>                   BUSID_HAS_NUMBER=1 \
>                   BUILD_IN_YOCTO=1 \
> @@ -28,6 +33,8 @@ CFLAGS += "-I${STAGING_INCDIR}/xorg \
>
>  S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/"
>
> +PACKAGES =+ "xserver-xorg-extension-viv-hdmi xserver-xorg-extension-viv-hdmi-dev xserver-xorg-extension-viv-hdmi-dbg"

Please replace xserver-xorg with ${PN} otherwise it is hard to make a
relation where this came from when looking at installed packages.

>  # FIXME: The Freescale provided Makefile has hardcodec include paths
>  #        and this does not work in case prefix is different than /usr,
>  #        sed it.
> @@ -47,6 +54,10 @@ do_install_append () {
>         install -d ${D}${includedir}
>         cp -axr ${S}/EXA/src/vivante_gal/vivante_priv.h ${D}${includedir}
>         cp -axr ${S}/EXA/src/vivante_gal/vivante_gal.h ${D}${includedir}
> +
> +       install -d ${D}/${sysconfdir}/init.d
> +       install -m 755 ${WORKDIR}/rc.autohdmi ${D}/${sysconfdir}/init.d/rc.autohdmi
> +
>         find ${D}${includedir} -type f -exec chmod 660 {} \;
>  }
>
> @@ -57,5 +68,16 @@ RDEPENDS_${PN} += "libvivante-dri-mx6 \
>                     xserver-xorg-extension-dri2 \
>                     xserver-xorg-extension-glx"
>
> +REALSOLIBS := "${SOLIBS}"
> +SOLIBS = "${SOLIBSDEV}"
> +
> +FILES_${PN} = "${libdir}/*/*/*/vivante_drv${SOLIBS}"
> +FILES_${PN}-dev = "${includedir} /usr/src"
> +FILES_${PN}-dbg = "${libdir}/*/*/*/.debug"
> +
> +FILES_xserver-xorg-extension-viv-hdmi = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi ${sysconfdir}/init.d ${sysconfdir}/rc.autohdmi"

${sysconfdir}/rc.autohdmi does not seem to exist. Use
${sysconfdir}/init.d/rc.autohdmi

> +FILES_xserver-xorg-extension-viv-hdmi-dev = " ${libdir}/libfsl_x11_ext${SOLIBSDEV}"
> +FILES_xserver-xorg-extension-viv-hdmi-dbg = " ${libdir}/.debug/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/.debug/autohdmi ${sysconfdir}/init.d"

${sysconfdir}/init.d here?

>  PACKAGE_ARCH = "${MACHINE_SOCARCH}"
>  COMPATIBLE_MACHINE = "(mx6)"
> --
> 1.7.9.5


-- 
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