From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 3608AE006D3 for ; Mon, 27 Jan 2014 16:41:41 -0800 (PST) Received: by mail-pb0-f42.google.com with SMTP id jt11so6636351pbb.1 for ; Mon, 27 Jan 2014 16:41:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=e92pogeMYh8S01B2UoWb5qnZyJovU44QsPSA/cpxnvw=; b=cGfKVEd7qTooA8sLD1J6M0ba6Zhp5DIQcWDy2JpZenI/nq+FqRto5yfhYUeU/xE1aI gwv0JT7nGiTAi1oCD2/wRMIqKZgzmqdIEZcVe/VtQ74As/Voz6XUm0s2nuP9a7y41fMn nkyqW9aXkYXL2SzNsVj5hTz133IG41Zl+3V/c0A5se597DzGuy+3dlQUamjr2XSOJ3Mi o59ZsEPypSC4moXfmJb8bpRcKfM89lO6Now/cWGAfGnCCNaH/qnSG5OQrNex6dQcLKLA StPdEXzPZZr31pjRa2SpdXaMku/oZieCj8kOp/uFV4XQjKHxlAaUf8FmfMyd9pbv9C/U ppyw== X-Gm-Message-State: ALoCoQlwyuEvzXEzJlMl3fdlp8mYjDrHtk7IdD7dekpVOX4g+aCV0ei5zhWnW4HxygA1n0cxy4CF X-Received: by 10.68.135.137 with SMTP id ps9mr5972307pbb.160.1390869701226; Mon, 27 Jan 2014 16:41:41 -0800 (PST) Received: from [192.168.0.53] ([63.226.49.26]) by mx.google.com with ESMTPSA id de3sm35886956pbb.33.2014.01.27.16.41.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 16:41:40 -0800 (PST) Message-ID: <52E6FCC1.3030009@boundarydevices.com> Date: Mon, 27 Jan 2014 17:41:37 -0700 From: Eric Nelson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Mario Domenech Goulart , meta-freescale@yoctoproject.org References: <1389967366-2718-1-git-send-email-mario@ossystems.com.br> In-Reply-To: <1389967366-2718-1-git-send-email-mario@ossystems.com.br> Subject: Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jan 2014 00:41:42 -0000 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > --- > 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