* [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
@ 2014-01-17 14:02 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 ` [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Eric Nelson
0 siblings, 2 replies; 11+ messages in thread
From: Mario Domenech Goulart @ 2014-01-17 14:02 UTC (permalink / raw)
To: meta-freescale
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
+
+ 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
}
FILES_${PN} += "${datadir}/${DEMO} ${datadir}/icons"
@@ -25,3 +31,6 @@ RDEPENDS_${PN} += " \
${QT_BASE_NAME}-qml-plugins \
${QT_BASE_NAME}-plugin-imageformat-svg \
"
+
+INITSCRIPT_NAME = "smarthome"
+INITSCRIPT_PARAMS = "defaults"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [meta-fsl-demos][PATCH 2/2] qt-in-industrial-embedded-common: add patch to run demos in fullscreen mode
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 ` Mario Domenech Goulart
2014-01-28 0:41 ` [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Eric Nelson
1 sibling, 0 replies; 11+ messages in thread
From: Mario Domenech Goulart @ 2014-01-17 14:02 UTC (permalink / raw)
To: meta-freescale
Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
---
recipes-qt/qt-in-use/files/fullscreen.patch | 13 +++++++++++++
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc | 1 +
2 files changed, 14 insertions(+)
create mode 100644 recipes-qt/qt-in-use/files/fullscreen.patch
diff --git a/recipes-qt/qt-in-use/files/fullscreen.patch b/recipes-qt/qt-in-use/files/fullscreen.patch
new file mode 100644
index 0000000..e1c67db
--- /dev/null
+++ b/recipes-qt/qt-in-use/files/fullscreen.patch
@@ -0,0 +1,13 @@
+diff --git a/smarthome/main.cpp b/smarthome/main.cpp
+index 89c60f3..bed47e8 100644
+--- a/smarthome/main.cpp
++++ b/smarthome/main.cpp
+@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
+ QmlApplicationViewer viewer;
+ viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
+ viewer.setMainQmlFile(QLatin1String("qml/smarthome/smarthome.qml"));
+- viewer.show();
++ viewer.showFullScreen();
+
+ return app.exec();
+ }
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 ad879c5..405794d 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
@@ -5,6 +5,7 @@ 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 \
+ file://fullscreen.patch;striplevel=2 \
file://smarthome \
"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
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
2014-01-28 0:44 ` Otavio Salvador
2014-01-31 13:26 ` Mario Domenech Goulart
1 sibling, 2 replies; 11+ messages in thread
From: Eric Nelson @ 2014-01-28 0:41 UTC (permalink / raw)
To: Mario Domenech Goulart, meta-freescale
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-01-28 0:41 ` [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Eric Nelson
@ 2014-01-28 0:44 ` Otavio Salvador
2014-01-31 13:26 ` Mario Domenech Goulart
1 sibling, 0 replies; 11+ messages in thread
From: Otavio Salvador @ 2014-01-28 0:44 UTC (permalink / raw)
To: Eric Nelson; +Cc: meta-freescale@yoctoproject.org
Hello,
On Mon, Jan 27, 2014 at 10:41 PM, Eric Nelson
<eric.nelson@boundarydevices.com> wrote:
> 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.
We'll test it again tomorrow but in theory it wouldn't be called if
tslib is not installed and this should be the case for X11 based
images.
--
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-01-28 0:41 ` [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Eric Nelson
2014-01-28 0:44 ` Otavio Salvador
@ 2014-01-31 13:26 ` Mario Domenech Goulart
2014-02-03 14:44 ` Rogerio Nunes
1 sibling, 1 reply; 11+ messages in thread
From: Mario Domenech Goulart @ 2014-01-31 13:26 UTC (permalink / raw)
To: Eric Nelson; +Cc: meta-freescale
Hi Eric,
Sorry for taking so long to reply. Please, see some comments below.
On Mon, 27 Jan 2014 17:41:37 -0700 Eric Nelson <eric.nelson@boundarydevices.com> wrote:
> 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?
I'm not sure. I actually haven't touched that recipe part.
>> +
>> + 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,
It seems that packagegroup-core-tools-testapps is dragging
tslib-calibrate into the image (via RDEPENDS).
packagegroup-core-tools-testapps is added to the image because
fsl-image-gui.bb has
SOC_EXTRA_IMAGE_FEATURES ?= "tools-testapps"
EXTRA_IMAGE_FEATURES += " \
${SOC_EXTRA_IMAGE_FEATURES} \
...
The "tools-testapps" feature makes core-image.bbclass add
packagegroup-core-tools-testapps to the image.
To work around that, you can add
EXTRA_IMAGE_FEATURES_remove = "tools-testapps"
to local.conf. However, a bunch of other packages will be removed from
the image (don't know if they are relevant for your purposes, though --
they sould be "testapps").
I suppose packagegroup-core-tools-testapps should check for
"touchscreen" in MACHINE_FEATURES to avoid the dependency on tslib for
boards that don't have touch devices.
Best wishes.
Mario
--
http://www.ossystems.com.br
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-01-31 13:26 ` Mario Domenech Goulart
@ 2014-02-03 14:44 ` Rogerio Nunes
2014-02-03 17:29 ` Eric Nelson
0 siblings, 1 reply; 11+ messages in thread
From: Rogerio Nunes @ 2014-02-03 14:44 UTC (permalink / raw)
To: Mario Domenech Goulart; +Cc: meta-freescale@yoctoproject.org
On Fri, Jan 31, 2014 at 8:26 AM, Mario Domenech Goulart
<mario@ossystems.com.br> wrote:
> Hi Eric,
>
> Sorry for taking so long to reply. Please, see some comments below.
>
> On Mon, 27 Jan 2014 17:41:37 -0700 Eric Nelson <eric.nelson@boundarydevices.com> wrote:
>
>> 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?
>
> I'm not sure. I actually haven't touched that recipe part.
>
>
>>> +
>>> + 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,
>
> It seems that packagegroup-core-tools-testapps is dragging
> tslib-calibrate into the image (via RDEPENDS).
> packagegroup-core-tools-testapps is added to the image because
> fsl-image-gui.bb has
>
> SOC_EXTRA_IMAGE_FEATURES ?= "tools-testapps"
>
> EXTRA_IMAGE_FEATURES += " \
> ${SOC_EXTRA_IMAGE_FEATURES} \
> ...
>
> The "tools-testapps" feature makes core-image.bbclass add
> packagegroup-core-tools-testapps to the image.
>
> To work around that, you can add
>
> EXTRA_IMAGE_FEATURES_remove = "tools-testapps"
>
> to local.conf. However, a bunch of other packages will be removed from
> the image (don't know if they are relevant for your purposes, though --
> they sould be "testapps").
Actually packagegroup-fsl-tools-testapps is explicitly included in
IMAGE_INSTALL...
>
> I suppose packagegroup-core-tools-testapps should check for
> "touchscreen" in MACHINE_FEATURES to avoid the dependency on tslib for
> boards that don't have touch devices.
Agree.
>
> Best wishes.
> Mario
> --
> http://www.ossystems.com.br
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-02-03 14:44 ` Rogerio Nunes
@ 2014-02-03 17:29 ` Eric Nelson
2014-02-03 17:38 ` Otavio Salvador
0 siblings, 1 reply; 11+ messages in thread
From: Eric Nelson @ 2014-02-03 17:29 UTC (permalink / raw)
To: Rogerio Nunes, Mario Domenech Goulart; +Cc: meta-freescale@yoctoproject.org
Hi Rogerio,
On 02/03/2014 07:44 AM, Rogerio Nunes wrote:
> On Fri, Jan 31, 2014 at 8:26 AM, Mario Domenech Goulart
> <mario@ossystems.com.br> wrote:
>> Hi Eric,
>>
>> Sorry for taking so long to reply. Please, see some comments below.
>>
>> On Mon, 27 Jan 2014 17:41:37 -0700 Eric Nelson <eric.nelson@boundarydevices.com> wrote:
>>
>>> 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.
>>>>
>>>> <snip>
>>>>
>>>> +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?
>>
>> I'm not sure. I actually haven't touched that recipe part.
>>
>>
>>>> +
>>>> + 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,
>>
>> It seems that packagegroup-core-tools-testapps is dragging
>> tslib-calibrate into the image (via RDEPENDS).
>> packagegroup-core-tools-testapps is added to the image because
>> fsl-image-gui.bb has
>>
>> SOC_EXTRA_IMAGE_FEATURES ?= "tools-testapps"
>>
>> EXTRA_IMAGE_FEATURES += " \
>> ${SOC_EXTRA_IMAGE_FEATURES} \
>> ...
>>
>> The "tools-testapps" feature makes core-image.bbclass add
>> packagegroup-core-tools-testapps to the image.
>>
>> To work around that, you can add
>>
>> EXTRA_IMAGE_FEATURES_remove = "tools-testapps"
>>
>> to local.conf. However, a bunch of other packages will be removed from
>> the image (don't know if they are relevant for your purposes, though --
>> they sould be "testapps").
>
> Actually packagegroup-fsl-tools-testapps is explicitly included in
> IMAGE_INSTALL...
>
>>
>> I suppose packagegroup-core-tools-testapps should check for
>> "touchscreen" in MACHINE_FEATURES to avoid the dependency on tslib for
>> boards that don't have touch devices.
>
> Agree.
>
I suspect that this leaves us in the same position, since essentially
all i.MX6 boards support some form of touch screen, yet they can
also be used without touch (e.g. with HDMI + mouse/keyboard), right?
It seems that a run-time test may be the right thing here for the
most common case. On our Nitrogen boards, and I expect on Freescale
boards with Hannstar displays, we could test /dev/input/ to see
whether a a touch screen is present because the I2C touch controller
is essentially a part of the display.
This doesn't work on other boards like our Nitrogen6_Lite though.
On that board, a resistive touch controller is a part of the main
board, so a touch-screen input device will be present even if no
touch screen is physically connected.
Regards,
Eric
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-02-03 17:29 ` Eric Nelson
@ 2014-02-03 17:38 ` Otavio Salvador
2014-02-03 18:11 ` Eric Nelson
0 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2014-02-03 17:38 UTC (permalink / raw)
To: Eric Nelson; +Cc: meta-freescale@yoctoproject.org
Hello Eric,
On Mon, Feb 3, 2014 at 3:29 PM, Eric Nelson
<eric.nelson@boundarydevices.com> wrote:
> On 02/03/2014 07:44 AM, Rogerio Nunes wrote:
>> On Fri, Jan 31, 2014 at 8:26 AM, Mario Domenech Goulart
>> <mario@ossystems.com.br> wrote:
>>> I suppose packagegroup-core-tools-testapps should check for
>>> "touchscreen" in MACHINE_FEATURES to avoid the dependency on tslib for
>>> boards that don't have touch devices.
>>
>>
>> Agree.
>>
>
> I suspect that this leaves us in the same position, since essentially
> all i.MX6 boards support some form of touch screen, yet they can
> also be used without touch (e.g. with HDMI + mouse/keyboard), right?
>
> It seems that a run-time test may be the right thing here for the
> most common case. On our Nitrogen boards, and I expect on Freescale
> boards with Hannstar displays, we could test /dev/input/ to see
> whether a a touch screen is present because the I2C touch controller
> is essentially a part of the display.
This is handled already. If no /dev/input/touchscreen0 is found it
will not start the ts_calibrate.
> This doesn't work on other boards like our Nitrogen6_Lite though.
> On that board, a resistive touch controller is a part of the main
> board, so a touch-screen input device will be present even if no
> touch screen is physically connected.
This complicates things. I also see another missing point in the
puzzle ... we cannot decide if we intend to use tslib or xinput.
Do you have any idea how we can workaround it in Nitrogen6_Lite case?
--
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-02-03 17:38 ` Otavio Salvador
@ 2014-02-03 18:11 ` Eric Nelson
2014-02-05 8:31 ` Eric Bénard
0 siblings, 1 reply; 11+ messages in thread
From: Eric Nelson @ 2014-02-03 18:11 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org
Hi Otavio,
On 02/03/2014 10:38 AM, Otavio Salvador wrote:
> Hello Eric,
>
> On Mon, Feb 3, 2014 at 3:29 PM, Eric Nelson
> <eric.nelson@boundarydevices.com> wrote:
>> On 02/03/2014 07:44 AM, Rogerio Nunes wrote:
>>> On Fri, Jan 31, 2014 at 8:26 AM, Mario Domenech Goulart
>>> <mario@ossystems.com.br> wrote:
>>>> I suppose packagegroup-core-tools-testapps should check for
>>>> "touchscreen" in MACHINE_FEATURES to avoid the dependency on tslib for
>>>> boards that don't have touch devices.
>>>
>>>
>>> Agree.
>>>
>>
>> I suspect that this leaves us in the same position, since essentially
>> all i.MX6 boards support some form of touch screen, yet they can
>> also be used without touch (e.g. with HDMI + mouse/keyboard), right?
>>
>> It seems that a run-time test may be the right thing here for the
>> most common case. On our Nitrogen boards, and I expect on Freescale
>> boards with Hannstar displays, we could test /dev/input/ to see
>> whether a a touch screen is present because the I2C touch controller
>> is essentially a part of the display.
>
> This is handled already. If no /dev/input/touchscreen0 is found it
> will not start the ts_calibrate.
>
Hmmm. I'll have to re-test this. I thought I saw ts_calibrate
running on a Nitrogen6X, though it may have been Nitrogen6_Lite.
>> This doesn't work on other boards like our Nitrogen6_Lite though.
>> On that board, a resistive touch controller is a part of the main
>> board, so a touch-screen input device will be present even if no
>> touch screen is physically connected.
>
> This complicates things. I also see another missing point in the
> puzzle ... we cannot decide if we intend to use tslib or xinput.
>
Right. Does a machine saying it **supports** tslib mean that it
always wants it?
> Do you have any idea how we can workaround it in Nitrogen6_Lite case?
>
In general, we've been moving away from tslib for use with X.
Since all of our machines support Android, we've added kernel-driver
calibration to each of the resistive touch drivers we support,
and only want tslib when the target image doesn't include X
(Qt, DirectFB).
It seems that at a minimum, there should be a way to disable
the automatic ts_calibrate in X startup.
Regards,
Eric
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-02-03 18:11 ` Eric Nelson
@ 2014-02-05 8:31 ` Eric Bénard
2014-02-05 15:20 ` Eric Nelson
0 siblings, 1 reply; 11+ messages in thread
From: Eric Bénard @ 2014-02-05 8:31 UTC (permalink / raw)
To: Eric Nelson; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador
Hi Eric,
Le Mon, 03 Feb 2014 11:11:45 -0700,
Eric Nelson <eric.nelson@boundarydevices.com> a écrit :
> It seems that at a minimum, there should be a way to disable
> the automatic ts_calibrate in X startup.
>
as you detect the display in u-boot, you can use the command line
to pass a parameter that you can parse in the script which launch
ts_calibrate to enable/disable calibration based on a white list of
display.
Eric
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo
2014-02-05 8:31 ` Eric Bénard
@ 2014-02-05 15:20 ` Eric Nelson
0 siblings, 0 replies; 11+ messages in thread
From: Eric Nelson @ 2014-02-05 15:20 UTC (permalink / raw)
To: Eric Bénard; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador
Hi Eric,
On 02/05/2014 01:31 AM, Eric Bénard wrote:
> Hi Eric,
>
> Le Mon, 03 Feb 2014 11:11:45 -0700,
> Eric Nelson <eric.nelson@boundarydevices.com> a écrit :
>> It seems that at a minimum, there should be a way to disable
>> the automatic ts_calibrate in X startup.
>>
> as you detect the display in u-boot, you can use the command line
> to pass a parameter that you can parse in the script which launch
> ts_calibrate to enable/disable calibration based on a white list of
> display.
>
:) Sometimes we can have too many tools!
In the case of the Nitrogen6_Lite, the auto-detection of
displays doesn't quite work, since a touch controller
is soldered onto the board.
Also, the ts_calibrate decision might depend on whether
the image uses X or Qt-Embedded.
That said, we could (and have) done table-lookups based
on screen resolution and connection type (parallel, LVDS, HDMI)
to determine which touch screen goes with which display for
multi-display setups like this:
http://boundarydevices.com/timesys-2013-03-release/
All of this is relatively straightforward when working
for a specific target. It only gets difficult when trying
to balance the needs of multiple boards, displays from
multiple vendors, etc.
Regards,
Eric
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-02-05 15:20 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [meta-fsl-demos][PATCH 1/2] qt-in-industrial-embedded-common: add init script for the smarthome demo Eric Nelson
2014-01-28 0:44 ` 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
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.