All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: Mario Domenech Goulart <mario@ossystems.com.br>,
	 meta-freescale@yoctoproject.org
Subject: Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
Date: Mon, 27 Jan 2014 17:41:37 -0700	[thread overview]
Message-ID: <52E6FCC1.3030009@boundarydevices.com> (raw)
In-Reply-To: <1389967366-2718-1-git-send-email-mario@ossystems.com.br>

Hi Mario,

On 01/17/2014 07:02 AM, Mario Domenech Goulart wrote:
> Currently, qt-in-industrial-embedded starts no demo automatically when
> installed.  This patch adds an init script so that the smarthome demo
> can be automatically started on boot.
>
> Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
> ---
>   recipes-qt/qt-in-use/files/smarthome               |   37 ++++++++++++++++++++
>   .../qt-in-use/qt-in-industrial-embedded-common.inc |   13 +++++--
>   2 files changed, 48 insertions(+), 2 deletions(-)
>   create mode 100644 recipes-qt/qt-in-use/files/smarthome
>
> diff --git a/recipes-qt/qt-in-use/files/smarthome b/recipes-qt/qt-in-use/files/smarthome
> new file mode 100644
> index 0000000..c0aa575
> --- /dev/null
> +++ b/recipes-qt/qt-in-use/files/smarthome
> @@ -0,0 +1,37 @@
> +#!/bin/sh
> +
> +set -e
> +
> +SMARTHOME="smarthome"
> +SMARTHOME_ARGS="`[ -x '__BINDIR__/X' ] && echo '' || echo '-qws'`"
> +
> +case "$1" in
> +  start)
> +	echo "Starting $SMARTHOME"
> +	if [ -f __SYSCONFDIR__/profile.d/tslib.sh ]; then
> +		. __SYSCONFDIR__/profile.d/tslib.sh
> +	fi
> +	if [ -e "$TSLIB_TSDEVICE" ]; then
> +		if [ ! -f __SYSCONFDIR__/pointercal ]; then
> +			__BINDIR__/ts_calibrate
> +		fi
> +                QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $SMARTHOME $SMARTHOME_ARGS &
> +	else
> +		$SMARTHOME $SMARTHOME_ARGS &
> +	fi
> +	;;
> +  stop)
> +	echo "Stopping $SMARTHOME"
> +        killall $SMARTHOME
> +	;;
> +  restart)
> +	$0 stop
> +	$0 start
> +	;;
> +  *)
> +	echo "usage: $0 { start | stop | restart }" >&2
> +	exit 1
> +	;;
> +esac
> +
> +exit 0
> diff --git a/recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc b/recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc
> index ea4feef..ad879c5 100644
> --- a/recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc
> +++ b/recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc
> @@ -1,10 +1,12 @@
>   DESCRIPTION = "Demos from the industrial embedded segment"
>
> -inherit autotools
> +inherit autotools update-rc.d
>
>   PV = "0.0+gitr${SRCPV}"
>   SRCREV = "4b10cbfd32391c83251bbc61520eeab03461db0a"
> -SRC_URI = "git://gitorious.org/qt-in-use/qt-in-industrial-embedded.git"
> +SRC_URI = "git://gitorious.org/qt-in-use/qt-in-industrial-embedded.git \
> +           file://smarthome \
> +          "
>
>   PR = "r3"
>
> @@ -18,6 +20,10 @@ do_configure_prepend() {
>   do_install_append () {
>       # Set the correct smarthome binary path
>       sed -i -e 's:Exec=.*:Exec=${bindir}/smarthome:g' ${D}${datadir}/applications/smarthome.desktop

This should only be installed when not using X, right?

> +
> +    install -d ${D}${sysconfdir}/init.d
> +    install -m 755 ${WORKDIR}/smarthome ${D}${sysconfdir}/init.d/
> +    sed -i -e 's:__BINDIR__:${bindir}:g; s:__SYSCONFDIR__:${sysconfdir}:g' ${D}${sysconfdir}/init.d/smarthome
>   }
>

When testing using fsl-image-gui on the master branch today, I
immediately got a ts_calibrate prompt on my HDMI monitor, which was
frustrating since it doesn't happen to have a touch screen.

Please advise,


Eric



  parent reply	other threads:[~2014-01-28  0:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 14:02 [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Mario Domenech Goulart
2014-01-17 14:02 ` [meta-fsl-demos][PATCH 2/2] qt-in-industrial-embedded-common: add patch to run demos in fullscreen mode Mario Domenech Goulart
2014-01-28  0:41 ` Eric Nelson [this message]
2014-01-28  0:44   ` [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Otavio Salvador
2014-01-31 13:26   ` Mario Domenech Goulart
2014-02-03 14:44     ` Rogerio Nunes
2014-02-03 17:29       ` Eric Nelson
2014-02-03 17:38         ` Otavio Salvador
2014-02-03 18:11           ` Eric Nelson
2014-02-05  8:31             ` Eric Bénard
2014-02-05 15:20               ` Eric Nelson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E6FCC1.3030009@boundarydevices.com \
    --to=eric.nelson@boundarydevices.com \
    --cc=mario@ossystems.com.br \
    --cc=meta-freescale@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.