Skip to contentSkip to conversation

qt-in-industrial-embedded-common: add init script for the smarthome demo

PATCH In review Mario Domenech Goulart 5 participants 11 messages Jan 17, 2014 – Feb 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 qt-in-industrial-embedded-common: add init script for the smarthome demo

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.

---
 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
recipes-qt/qt-in-use/files/smarthome new file +37 -0
new file mode 100644
index 0000000..c0aa575
@@ -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
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +11 -2
index ea4feef..ad879c5 100644
@@ -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"
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 qt-in-industrial-embedded-common: add patch to run demos in fullscreen mode

---
 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
recipes-qt/qt-in-use/files/fullscreen.patch new file +13 -0
new file mode 100644
index 0000000..e1c67db
@@ -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();
+ }
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +1 -0
index ad879c5..405794d 100644
@@ -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 \
           "
 
Signature · 1 line
1.7.10.4
#2 lore raw
In reply to Mario Domenech Goulart

Hi Mario,

Quoted 74 lines · Mario Domenech Goulart

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.

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

recipes-qt/qt-in-use/files/smarthome new file +37 -0
new file mode 100644
index 0000000..c0aa575
@@ -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
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -2
index ea4feef..ad879c5 100644
@@ -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"
 

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 22

Quoted 3 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +0 -0
@@ -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?

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 28

Quoted 6 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -0
+
+    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

#3 lore raw

Hello,

Quoted 96 lines · Eric Nelson
Quoted 81 lines · Mario Domenech Goulart

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.

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

recipes-qt/qt-in-use/files/smarthome new file +18 -0
new file mode 100644
index 0000000..c0aa575
@@ -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 &

recipes-qt/qt-in-use/files/smarthome new file +19 -0
+       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
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -2
index ea4feef..ad879c5 100644
@@ -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'
Quoted 1 line

${D}${datadir}/applications/smarthome.desktop

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

Quoted 7 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -0
+
+    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
}

Quoted 3 lines

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.

Signature · 3 lines
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
#4 lore raw
In reply to Eric Nelson

Hi Eric,

Sorry for taking so long to reply. Please, see some comments below.

Quoted 72 lines · On Mon, 27 Jan 2014 17:41:37 -0700 Eric Nelson…
Quoted 71 lines · Mario Domenech Goulart

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.

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

recipes-qt/qt-in-use/files/smarthome new file +37 -0
new file mode 100644
index 0000000..c0aa575
@@ -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
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -2
index ea4feef..ad879c5 100644
@@ -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 \
+          "
 
Quoted 8 lines

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 22

Quoted 6 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +0 -0
  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.

Quoted 7 lines

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 28

Quoted 6 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -0
+
+    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
  }
 
Quoted 5 lines

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

Signature · 1 line
http://www.ossystems.com.br
#5 lore raw
Quoted 117 lines · Mario Domenech Goulart

Hi Eric,

Sorry for taking so long to reply. Please, see some comments below.

Quoted 72 lines · On Mon, 27 Jan 2014 17:41:37 -0700 Eric Nelson…
Quoted 71 lines · Mario Domenech Goulart

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.

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

recipes-qt/qt-in-use/files/smarthome new file +37 -0
new file mode 100644
index 0000000..c0aa575
@@ -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
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -2
index ea4feef..ad879c5 100644
@@ -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 \
+          "
 
Quoted 8 lines

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 22

Quoted 6 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +0 -0
  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.

Quoted 7 lines

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 28

Quoted 6 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -0
+
+    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
  }
 
Quoted 5 lines

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.

Quoted 7 lines

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

Quoted 4 lines

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.

Quoted 9 lines

Best wishes.
Mario
--
http://www.ossystems.com.br
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

#6 lore raw

Hi Rogerio,

Quoted 70 lines · Rogerio Nunes
Quoted 56 lines · Mario Domenech Goulart

Hi Eric,

Sorry for taking so long to reply. Please, see some comments below.

Quoted 11 lines · On Mon, 27 Jan 2014 17:41:37 -0700 Eric Nelson…
Quoted 10 lines · Mario Domenech Goulart

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>

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +3 -0
+SRC_URI = "git://gitorious.org/qt-in-use/qt-in-industrial-embedded.git \
+           file://smarthome \
+          "
Quoted 8 lines

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 22

Quoted 6 lines
   PR = "r3"
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +0 -0
@@ -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.

Quoted 7 lines

recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc do_configure_prepend() { · line 28

Quoted 6 lines
recipes-qt/qt-in-use/qt-in-industrial-embedded-common.inc +4 -0
+
+    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
   }
 
Quoted 5 lines

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.

Quoted 7 lines

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

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

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

#7 lore raw

Hello Eric,

Quoted 15 lines · Eric Nelson
Quoted 9 lines · Rogerio Nunes
Quoted 3 lines · Mario Domenech Goulart

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?

Quoted 5 lines

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.

Quoted 4 lines

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?

Signature · 3 lines
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
#8 lore raw

Hi Otavio,

Quoted 19 lines · Otavio Salvador

Hello Eric,

Quoted 15 lines · Eric Nelson
Quoted 9 lines · Rogerio Nunes
Quoted 3 lines · Mario Domenech Goulart

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?

Quoted 9 lines
Quoted 5 lines

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.

Quoted 8 lines
Quoted 4 lines

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?

Quoted 2 lines

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

#9 lore raw

Hi Eric,

Quoted 3 lines · Eric Nelson

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

#10 lore raw

Hi Eric,

Quoted 4 lines · Eric Bénard

Hi Eric,

Le Mon, 03 Feb 2014 11:11:45 -0700,
Eric Nelson <[email protected]> a écrit :

Quoted 8 lines
Quoted 3 lines

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