* [PATCH 2/6] qtbase: Add global environment variable script
2014-08-13 19:46 [PATCH 1/6] tslib: Use custom tslib.sh Franklin S. Cooper Jr
@ 2014-08-13 19:46 ` Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 3/6] weston: " Franklin S. Cooper Jr
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Franklin S. Cooper Jr @ 2014-08-13 19:46 UTC (permalink / raw)
To: meta-arago; +Cc: Franklin S. Cooper Jr
From: "Franklin S. Cooper Jr" <fcooper@ti.com>
* There are important Qt environment variables that needs to be set and those
variables are only being set within Matrix's init script.
* This causes problems when your trying to manually run a Qt application
outside of Matrix since you need to manually export the proper Qt specific
environment variables again.
* Create a qt_env.sh that contains these Qt specific environment variables and
install it into /etc/profile.d which will insure these environment variables are
global and the default.
Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
---
meta-arago-distro/recipes-qt/qt5/qtbase/qt_env.sh | 12 ++++++++++++
.../recipes-qt/qt5/qtbase_5.2.1.bbappend | 18 +++++++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 meta-arago-distro/recipes-qt/qt5/qtbase/qt_env.sh
diff --git a/meta-arago-distro/recipes-qt/qt5/qtbase/qt_env.sh b/meta-arago-distro/recipes-qt/qt5/qtbase/qt_env.sh
new file mode 100644
index 0000000..51c181f
--- /dev/null
+++ b/meta-arago-distro/recipes-qt/qt5/qtbase/qt_env.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+### QT Environment Variables ###
+export QT_QPA_GENERIC_PLUGINS=Auto
+export QT_QPA_PLATFORM=wayland
+
+
+# Set the QT_QPA_GENERIC_PLUGINS for touchscreen if it exists
+if [ -e /dev/input/touchscreen0 ]
+then
+ export QT_QPA_GENERIC_PLUGINS=Tslib:/dev/input/touchscreen0
+fi
diff --git a/meta-arago-distro/recipes-qt/qt5/qtbase_5.2.1.bbappend b/meta-arago-distro/recipes-qt/qt5/qtbase_5.2.1.bbappend
index f5f772a..446b72a 100644
--- a/meta-arago-distro/recipes-qt/qt5/qtbase_5.2.1.bbappend
+++ b/meta-arago-distro/recipes-qt/qt5/qtbase_5.2.1.bbappend
@@ -1,8 +1,24 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
GLES_EXTRA_DEPS = ""
GLES_EXTRA_DEPS_omap-a15 = "libdrm wayland"
PACKAGECONFIG[gles2] = "-opengl es2 -eglfs,,virtual/libgles2 virtual/egl ${GLES_EXTRA_DEPS}"
-PR_append = "-arago1"
+PR_append = "-arago2"
QT_CONFIG_FLAGS += "-qpa wayland"
+
+SRC_URI += "file://qt_env.sh"
+
+# Add custom Arago Qt 5 Environment script file
+do_install_append () {
+ install -d ${D}${sysconfdir}/profile.d
+ install -m 0644 ${WORKDIR}/qt_env.sh ${D}${sysconfdir}/profile.d/
+}
+
+PACKAGES =+ "${PN}-conf"
+
+FILES_${PN}-conf = "${sysconfdir}/profile.d/qt_env.sh"
+
+RDEPENDS_${PN} += "${PN}-conf"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3/6] weston: Add global environment variable script
2014-08-13 19:46 [PATCH 1/6] tslib: Use custom tslib.sh Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 2/6] qtbase: Add global environment variable script Franklin S. Cooper Jr
@ 2014-08-13 19:46 ` Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 4/6] matrix-gui: Remove environment variables from init script Franklin S. Cooper Jr
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Franklin S. Cooper Jr @ 2014-08-13 19:46 UTC (permalink / raw)
To: meta-arago; +Cc: Franklin S. Cooper Jr
From: "Franklin S. Cooper Jr" <fcooper@ti.com>
* There are important Wayland environment variables that needs to be set and
those variables are only being set within Matrix's init script even though this
should be set globally.
* Create a wayland_env.sh that contains these Qt specific environment variables
and install it into /etc/profile.d which will insure these environment variables
are global and the default.
Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
---
.../recipes-graphics/wayland/files/wayland_env.sh | 6 ++++++
.../recipes-graphics/wayland/weston_1.4.0.bbappend | 17 ++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 meta-arago-extras/recipes-graphics/wayland/files/wayland_env.sh
diff --git a/meta-arago-extras/recipes-graphics/wayland/files/wayland_env.sh b/meta-arago-extras/recipes-graphics/wayland/files/wayland_env.sh
new file mode 100644
index 0000000..201e264
--- /dev/null
+++ b/meta-arago-extras/recipes-graphics/wayland/files/wayland_env.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+### Wayland Environment Variables ###
+
+export XDG_RUNTIME_DIR=/run/user/root
+export WAYLAND_DISPLAY=wayland-0
diff --git a/meta-arago-extras/recipes-graphics/wayland/weston_1.4.0.bbappend b/meta-arago-extras/recipes-graphics/wayland/weston_1.4.0.bbappend
index d9e6108..5b499ba 100644
--- a/meta-arago-extras/recipes-graphics/wayland/weston_1.4.0.bbappend
+++ b/meta-arago-extras/recipes-graphics/wayland/weston_1.4.0.bbappend
@@ -1,4 +1,19 @@
# When configured for fbdev compositor, make it the default
PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor WESTON_NATIVE_BACKEND="fbdev-backend.so",--disable-fbdev-compositor,udev mtdev"
-PR_append = "-arago0"
+PR_append = "-arago1"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://wayland_env.sh"
+
+# Add custom Arago Wayland Environment script file
+do_install_append () {
+ install -d ${D}${sysconfdir}/profile.d
+ install -m 0644 ${WORKDIR}/wayland_env.sh ${D}${sysconfdir}/profile.d/
+}
+
+PACKAGES += "${PN}-conf"
+
+FILES_${PN}-conf += "${sysconfdir}/profile.d/*"
+RDEPENDS_${PN} += "${PN}-conf"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 4/6] matrix-gui: Remove environment variables from init script
2014-08-13 19:46 [PATCH 1/6] tslib: Use custom tslib.sh Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 2/6] qtbase: Add global environment variable script Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 3/6] weston: " Franklin S. Cooper Jr
@ 2014-08-13 19:46 ` Franklin S. Cooper Jr
2014-08-13 19:55 ` Denys Dmytriyenko
2014-08-13 19:46 ` [PATCH 5/6] arago-qt4: Add global environment variable script Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 6/6] ts-calibrate-init: Simplify calibrate logic Franklin S. Cooper Jr
4 siblings, 1 reply; 8+ messages in thread
From: Franklin S. Cooper Jr @ 2014-08-13 19:46 UTC (permalink / raw)
To: meta-arago; +Cc: Franklin S. Cooper Jr
From: "Franklin S. Cooper Jr" <fcooper@ti.com>
* The environment variables located in this init script has been moved to
scripts in various recipes,
* Therefore, remove setting the environment variables and also there is no
longer a need for separate init files (qt4 vs qt5).
Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
---
.../recipes-core/matrix/matrix-gui/init | 31 +++------
.../recipes-core/matrix/matrix-gui/init-qt5 | 66 --------------------
.../recipes-core/matrix/matrix-gui_2.0.bb | 15 ++---
3 files changed, 16 insertions(+), 96 deletions(-)
delete mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init b/meta-arago-extras/recipes-core/matrix/matrix-gui/init
index dab7dc6..00e7a69 100644
--- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init
+++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/init
@@ -1,33 +1,22 @@
#! /bin/sh
matrixgui="/usr/bin/matrix_browser"
-ROTATION=__MATRIX_ROT__
-GUI_OPTS="-qws $ROTATION http://localhost:80/"
+GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
PIDFILE="/var/run/matrix-gui-2.0.pid"
-test -x "$matrixgui" || exit 0
+# Important System Environment Variables
+SCRIPTS=/etc/profile.d/*.sh
+
+for f in $SCRIPTS
+do
+ source $f
+done
-export TSLIB_TSDEVICE=/dev/input/touchscreen0
-export QWS_MOUSE_PROTO=Auto
+test -x "$matrixgui" || exit 0
case "$1" in
start)
- chvt 4
-
- # ARM9 devices get a lot of alignment trap errors with the current
- # version of Qt (4.7.2) that we use. The printing of these messages
- # is causing a severe slowdown with matrix and other Qt applications
- # that matrix launches. The root cause is under investigation and an
- # issue is being filed in the Qt JIRA tracker. For now using the
- # following command will do a software fixup of the alignment trap errors
- # in the kernel. This should have no impact on cortex-A8 devices.
- echo 2 > /proc/cpu/alignment
-
- # Set the QWS_MOUSE_PROTO for touchscreen if it exists
- if [ -e /dev/input/touchscreen0 ]
- then
- export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
- fi
+# chvt 4
#Clear out the the tmp and lock directory
cd __MATRIX_WEB_DIR__
diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5 b/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
deleted file mode 100644
index 6286028..0000000
--- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /bin/sh
-
-matrixgui="/usr/bin/matrix_browser"
-ROTATION=__MATRIX_ROT__
-GUI_OPTS="http://localhost:80/"
-PIDFILE="/var/run/matrix-gui-2.0.pid"
-
-test -x "$matrixgui" || exit 0
-
-export TSLIB_TSDEVICE=/dev/input/touchscreen0
-export QWS_MOUSE_PROTO=Auto
-export QT_QPA_PLATFORM=wayland
-export XDG_RUNTIME_DIR=/run/user/root
-export WAYLAND_DISPLAY=wayland-0
-
-case "$1" in
- start)
-# chvt 4
-
- # ARM9 devices get a lot of alignment trap errors with the current
- # version of Qt (4.7.2) that we use. The printing of these messages
- # is causing a severe slowdown with matrix and other Qt applications
- # that matrix launches. The root cause is under investigation and an
- # issue is being filed in the Qt JIRA tracker. For now using the
- # following command will do a software fixup of the alignment trap errors
- # in the kernel. This should have no impact on cortex-A8 devices.
- echo 2 > /proc/cpu/alignment
-
- # Set the QWS_MOUSE_PROTO for touchscreen if it exists
- if [ -e /dev/input/touchscreen0 ]
- then
- export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
- fi
-
- #Clear out the the tmp and lock directory
- cd __MATRIX_WEB_DIR__
- rm -rf tmp/*
- rm -rf lock/*
- cd -
-
- if [ -e $PIDFILE ]; then
- PIDDIR=/proc/$(cat $PIDFILE)
- if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${matrixgui}" ]; then
- echo "$DESC already started; not starting."
- else
- echo "Removing stale PID file $PIDFILE."
- rm -f $PIDFILE
- fi
- fi
-
- echo -n "Starting Matrix GUI application"
- start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --exec $matrixgui -- $GUI_OPTS
- echo "."
- ;;
-
- stop)
- echo -n "Stopping Matrix GUI application"
- start-stop-daemon --stop --quiet --pidfile $PIDFILE
- echo "."
- ;;
- *)
- echo "Usage: /etc/init.d/matrix-gui-2.0 {start|stop}"
- exit 1
-esac
-
-exit 0
diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
index 4cba926..72250b1 100644
--- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
+++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
SECTION = "multimedia"
-PR = "r17"
+PR = "r18"
INITSCRIPT_NAME = "matrix-gui-2.0"
INITSCRIPT_PARAMS = "defaults 97"
@@ -20,17 +20,14 @@ SRCREV = "d0fcc5ab50c9ecdf7a3cc5610807d16a6c91a850"
SRC_URI = "git://gitorious.org/matrix-gui-v2/matrix-gui-v2.git;protocol=git;branch=${BRANCH} \
file://init \
- file://init-qt5 \
file://php.ini"
require matrix-gui-paths.inc
S = "${WORKDIR}/git"
-INITFILE = "${@base_conditional('QT_PROVIDER', 'qt5', 'init-qt5', 'init', d)}"
-
-MATRIX_ROT = ""
-MATRIX_ROT_am37x-evm = "-display transformed:Rot90"
+MATRIX_FLAGS = "${@base_conditional('QT_PROVIDER','qt5','','-qws',d)}"
+MATRIX_FLAGS_append_am37x-evm = "-display transformed:Rot90"
do_install(){
install -d ${D}${MATRIX_BASE_DIR}
@@ -41,13 +38,13 @@ do_install(){
install -m 0644 ${WORKDIR}/php.ini ${D}${MATRIX_BASE_DIR}/
# Set the proper path in the init script
- sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}= ${WORKDIR}/${INITFILE}
- sed -i -e "s/__MATRIX_ROT__/\"${MATRIX_ROT}\"/" ${WORKDIR}/${INITFILE}
+ sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}= ${WORKDIR}/init
+ sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/" ${WORKDIR}/init
# Install the init script
# TODO: replace init script with systemd files
install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/${INITFILE} ${D}${sysconfdir}/init.d/matrix-gui-2.0
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui-2.0
}
GUIDEPS = "matrix-gui-browser refresh-screen"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 4/6] matrix-gui: Remove environment variables from init script
2014-08-13 19:46 ` [PATCH 4/6] matrix-gui: Remove environment variables from init script Franklin S. Cooper Jr
@ 2014-08-13 19:55 ` Denys Dmytriyenko
2014-08-13 20:10 ` Cooper Jr., Franklin
0 siblings, 1 reply; 8+ messages in thread
From: Denys Dmytriyenko @ 2014-08-13 19:55 UTC (permalink / raw)
To: Franklin S. Cooper Jr; +Cc: meta-arago
Nice! I like how the environment variables are being standardized in to the
/etc/profile.d, which simplifies matrix startup script and allows supporting
Qt4 and Qt5.
Quick question - is there an environment variable for global -qws and/or
display rotation, that we can put into /etc/profile.d?
--
Denys
On Wed, Aug 13, 2014 at 02:46:10PM -0500, Franklin S. Cooper Jr wrote:
> From: "Franklin S. Cooper Jr" <fcooper@ti.com>
>
> * The environment variables located in this init script has been moved to
> scripts in various recipes,
> * Therefore, remove setting the environment variables and also there is no
> longer a need for separate init files (qt4 vs qt5).
>
> Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
> ---
> .../recipes-core/matrix/matrix-gui/init | 31 +++------
> .../recipes-core/matrix/matrix-gui/init-qt5 | 66 --------------------
> .../recipes-core/matrix/matrix-gui_2.0.bb | 15 ++---
> 3 files changed, 16 insertions(+), 96 deletions(-)
> delete mode 100644 meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
>
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init b/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> index dab7dc6..00e7a69 100644
> --- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> @@ -1,33 +1,22 @@
> #! /bin/sh
>
> matrixgui="/usr/bin/matrix_browser"
> -ROTATION=__MATRIX_ROT__
> -GUI_OPTS="-qws $ROTATION http://localhost:80/"
> +GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
> PIDFILE="/var/run/matrix-gui-2.0.pid"
>
> -test -x "$matrixgui" || exit 0
> +# Important System Environment Variables
> +SCRIPTS=/etc/profile.d/*.sh
> +
> +for f in $SCRIPTS
> +do
> + source $f
> +done
>
> -export TSLIB_TSDEVICE=/dev/input/touchscreen0
> -export QWS_MOUSE_PROTO=Auto
> +test -x "$matrixgui" || exit 0
>
> case "$1" in
> start)
> - chvt 4
> -
> - # ARM9 devices get a lot of alignment trap errors with the current
> - # version of Qt (4.7.2) that we use. The printing of these messages
> - # is causing a severe slowdown with matrix and other Qt applications
> - # that matrix launches. The root cause is under investigation and an
> - # issue is being filed in the Qt JIRA tracker. For now using the
> - # following command will do a software fixup of the alignment trap errors
> - # in the kernel. This should have no impact on cortex-A8 devices.
> - echo 2 > /proc/cpu/alignment
> -
> - # Set the QWS_MOUSE_PROTO for touchscreen if it exists
> - if [ -e /dev/input/touchscreen0 ]
> - then
> - export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
> - fi
> +# chvt 4
>
> #Clear out the the tmp and lock directory
> cd __MATRIX_WEB_DIR__
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5 b/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
> deleted file mode 100644
> index 6286028..0000000
> --- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -#! /bin/sh
> -
> -matrixgui="/usr/bin/matrix_browser"
> -ROTATION=__MATRIX_ROT__
> -GUI_OPTS="http://localhost:80/"
> -PIDFILE="/var/run/matrix-gui-2.0.pid"
> -
> -test -x "$matrixgui" || exit 0
> -
> -export TSLIB_TSDEVICE=/dev/input/touchscreen0
> -export QWS_MOUSE_PROTO=Auto
> -export QT_QPA_PLATFORM=wayland
> -export XDG_RUNTIME_DIR=/run/user/root
> -export WAYLAND_DISPLAY=wayland-0
> -
> -case "$1" in
> - start)
> -# chvt 4
> -
> - # ARM9 devices get a lot of alignment trap errors with the current
> - # version of Qt (4.7.2) that we use. The printing of these messages
> - # is causing a severe slowdown with matrix and other Qt applications
> - # that matrix launches. The root cause is under investigation and an
> - # issue is being filed in the Qt JIRA tracker. For now using the
> - # following command will do a software fixup of the alignment trap errors
> - # in the kernel. This should have no impact on cortex-A8 devices.
> - echo 2 > /proc/cpu/alignment
> -
> - # Set the QWS_MOUSE_PROTO for touchscreen if it exists
> - if [ -e /dev/input/touchscreen0 ]
> - then
> - export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
> - fi
> -
> - #Clear out the the tmp and lock directory
> - cd __MATRIX_WEB_DIR__
> - rm -rf tmp/*
> - rm -rf lock/*
> - cd -
> -
> - if [ -e $PIDFILE ]; then
> - PIDDIR=/proc/$(cat $PIDFILE)
> - if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${matrixgui}" ]; then
> - echo "$DESC already started; not starting."
> - else
> - echo "Removing stale PID file $PIDFILE."
> - rm -f $PIDFILE
> - fi
> - fi
> -
> - echo -n "Starting Matrix GUI application"
> - start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --exec $matrixgui -- $GUI_OPTS
> - echo "."
> - ;;
> -
> - stop)
> - echo -n "Stopping Matrix GUI application"
> - start-stop-daemon --stop --quiet --pidfile $PIDFILE
> - echo "."
> - ;;
> - *)
> - echo "Usage: /etc/init.d/matrix-gui-2.0 {start|stop}"
> - exit 1
> -esac
> -
> -exit 0
> diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> index 4cba926..72250b1 100644
> --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
>
> SECTION = "multimedia"
>
> -PR = "r17"
> +PR = "r18"
>
> INITSCRIPT_NAME = "matrix-gui-2.0"
> INITSCRIPT_PARAMS = "defaults 97"
> @@ -20,17 +20,14 @@ SRCREV = "d0fcc5ab50c9ecdf7a3cc5610807d16a6c91a850"
>
> SRC_URI = "git://gitorious.org/matrix-gui-v2/matrix-gui-v2.git;protocol=git;branch=${BRANCH} \
> file://init \
> - file://init-qt5 \
> file://php.ini"
>
> require matrix-gui-paths.inc
>
> S = "${WORKDIR}/git"
>
> -INITFILE = "${@base_conditional('QT_PROVIDER', 'qt5', 'init-qt5', 'init', d)}"
> -
> -MATRIX_ROT = ""
> -MATRIX_ROT_am37x-evm = "-display transformed:Rot90"
> +MATRIX_FLAGS = "${@base_conditional('QT_PROVIDER','qt5','','-qws',d)}"
> +MATRIX_FLAGS_append_am37x-evm = "-display transformed:Rot90"
>
> do_install(){
> install -d ${D}${MATRIX_BASE_DIR}
> @@ -41,13 +38,13 @@ do_install(){
> install -m 0644 ${WORKDIR}/php.ini ${D}${MATRIX_BASE_DIR}/
>
> # Set the proper path in the init script
> - sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}= ${WORKDIR}/${INITFILE}
> - sed -i -e "s/__MATRIX_ROT__/\"${MATRIX_ROT}\"/" ${WORKDIR}/${INITFILE}
> + sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}= ${WORKDIR}/init
> + sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/" ${WORKDIR}/init
>
> # Install the init script
> # TODO: replace init script with systemd files
> install -d ${D}${sysconfdir}/init.d
> - install -m 0755 ${WORKDIR}/${INITFILE} ${D}${sysconfdir}/init.d/matrix-gui-2.0
> + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui-2.0
> }
>
> GUIDEPS = "matrix-gui-browser refresh-screen"
> --
> 1.7.9.5
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 4/6] matrix-gui: Remove environment variables from init script
2014-08-13 19:55 ` Denys Dmytriyenko
@ 2014-08-13 20:10 ` Cooper Jr., Franklin
0 siblings, 0 replies; 8+ messages in thread
From: Cooper Jr., Franklin @ 2014-08-13 20:10 UTC (permalink / raw)
To: Dmytriyenko, Denys; +Cc: meta-arago@arago-project.org
You won't be able to do a global -qws since the -qws basically setups a Qt server and any other Qt application shouldn't use it since its technically a "client" to the server Qt application. And there can only be one server at a time.
The rotation part should be doable.
> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Wednesday, August 13, 2014 2:56 PM
> To: Cooper Jr., Franklin
> Cc: meta-arago@arago-project.org
> Subject: Re: [meta-arago] [PATCH 4/6] matrix-gui: Remove environment
> variables from init script
>
> Nice! I like how the environment variables are being standardized in to the
> /etc/profile.d, which simplifies matrix startup script and allows supporting
> Qt4 and Qt5.
>
> Quick question - is there an environment variable for global -qws and/or
> display rotation, that we can put into /etc/profile.d?
>
> --
> Denys
>
>
> On Wed, Aug 13, 2014 at 02:46:10PM -0500, Franklin S. Cooper Jr wrote:
> > From: "Franklin S. Cooper Jr" <fcooper@ti.com>
> >
> > * The environment variables located in this init script has been moved to
> > scripts in various recipes,
> > * Therefore, remove setting the environment variables and also there is no
> > longer a need for separate init files (qt4 vs qt5).
> >
> > Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
> > ---
> > .../recipes-core/matrix/matrix-gui/init | 31 +++------
> > .../recipes-core/matrix/matrix-gui/init-qt5 | 66 --------------------
> > .../recipes-core/matrix/matrix-gui_2.0.bb | 15 ++---
> > 3 files changed, 16 insertions(+), 96 deletions(-)
> > delete mode 100644 meta-arago-extras/recipes-core/matrix/matrix-
> gui/init-qt5
> >
> > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init b/meta-
> arago-extras/recipes-core/matrix/matrix-gui/init
> > index dab7dc6..00e7a69 100644
> > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui/init
> > @@ -1,33 +1,22 @@
> > #! /bin/sh
> >
> > matrixgui="/usr/bin/matrix_browser"
> > -ROTATION=__MATRIX_ROT__
> > -GUI_OPTS="-qws $ROTATION http://localhost:80/"
> > +GUI_OPTS="http://localhost:80/ __MATRIX_FLAGS__"
> > PIDFILE="/var/run/matrix-gui-2.0.pid"
> >
> > -test -x "$matrixgui" || exit 0
> > +# Important System Environment Variables
> > +SCRIPTS=/etc/profile.d/*.sh
> > +
> > +for f in $SCRIPTS
> > +do
> > + source $f
> > +done
> >
> > -export TSLIB_TSDEVICE=/dev/input/touchscreen0
> > -export QWS_MOUSE_PROTO=Auto
> > +test -x "$matrixgui" || exit 0
> >
> > case "$1" in
> > start)
> > - chvt 4
> > -
> > - # ARM9 devices get a lot of alignment trap errors with the current
> > - # version of Qt (4.7.2) that we use. The printing of these messages
> > - # is causing a severe slowdown with matrix and other Qt applications
> > - # that matrix launches. The root cause is under investigation and an
> > - # issue is being filed in the Qt JIRA tracker. For now using the
> > - # following command will do a software fixup of the alignment trap
> errors
> > - # in the kernel. This should have no impact on cortex-A8 devices.
> > - echo 2 > /proc/cpu/alignment
> > -
> > - # Set the QWS_MOUSE_PROTO for touchscreen if it exists
> > - if [ -e /dev/input/touchscreen0 ]
> > - then
> > - export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
> > - fi
> > +# chvt 4
> >
> > #Clear out the the tmp and lock directory
> > cd __MATRIX_WEB_DIR__
> > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
> b/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
> > deleted file mode 100644
> > index 6286028..0000000
> > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui/init-qt5
> > +++ /dev/null
> > @@ -1,66 +0,0 @@
> > -#! /bin/sh
> > -
> > -matrixgui="/usr/bin/matrix_browser"
> > -ROTATION=__MATRIX_ROT__
> > -GUI_OPTS="http://localhost:80/"
> > -PIDFILE="/var/run/matrix-gui-2.0.pid"
> > -
> > -test -x "$matrixgui" || exit 0
> > -
> > -export TSLIB_TSDEVICE=/dev/input/touchscreen0
> > -export QWS_MOUSE_PROTO=Auto
> > -export QT_QPA_PLATFORM=wayland
> > -export XDG_RUNTIME_DIR=/run/user/root
> > -export WAYLAND_DISPLAY=wayland-0
> > -
> > -case "$1" in
> > - start)
> > -# chvt 4
> > -
> > - # ARM9 devices get a lot of alignment trap errors with the current
> > - # version of Qt (4.7.2) that we use. The printing of these messages
> > - # is causing a severe slowdown with matrix and other Qt applications
> > - # that matrix launches. The root cause is under investigation and an
> > - # issue is being filed in the Qt JIRA tracker. For now using the
> > - # following command will do a software fixup of the alignment trap
> errors
> > - # in the kernel. This should have no impact on cortex-A8 devices.
> > - echo 2 > /proc/cpu/alignment
> > -
> > - # Set the QWS_MOUSE_PROTO for touchscreen if it exists
> > - if [ -e /dev/input/touchscreen0 ]
> > - then
> > - export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
> > - fi
> > -
> > - #Clear out the the tmp and lock directory
> > - cd __MATRIX_WEB_DIR__
> > - rm -rf tmp/*
> > - rm -rf lock/*
> > - cd -
> > -
> > - if [ -e $PIDFILE ]; then
> > - PIDDIR=/proc/$(cat $PIDFILE)
> > - if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${matrixgui}" ];
> then
> > - echo "$DESC already started; not starting."
> > - else
> > - echo "Removing stale PID file $PIDFILE."
> > - rm -f $PIDFILE
> > - fi
> > - fi
> > -
> > - echo -n "Starting Matrix GUI application"
> > - start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE --
> exec $matrixgui -- $GUI_OPTS
> > - echo "."
> > - ;;
> > -
> > - stop)
> > - echo -n "Stopping Matrix GUI application"
> > - start-stop-daemon --stop --quiet --pidfile $PIDFILE
> > - echo "."
> > - ;;
> > - *)
> > - echo "Usage: /etc/init.d/matrix-gui-2.0 {start|stop}"
> > - exit 1
> > -esac
> > -
> > -exit 0
> > diff --git a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > index 4cba926..72250b1 100644
> > --- a/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > +++ b/meta-arago-extras/recipes-core/matrix/matrix-gui_2.0.bb
> > @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM =
> "file://LICENSE;md5=a886c9ef769b2d8271115d2502512e5d"
> >
> > SECTION = "multimedia"
> >
> > -PR = "r17"
> > +PR = "r18"
> >
> > INITSCRIPT_NAME = "matrix-gui-2.0"
> > INITSCRIPT_PARAMS = "defaults 97"
> > @@ -20,17 +20,14 @@ SRCREV =
> "d0fcc5ab50c9ecdf7a3cc5610807d16a6c91a850"
> >
> > SRC_URI = "git://gitorious.org/matrix-gui-v2/matrix-gui-
> v2.git;protocol=git;branch=${BRANCH} \
> > file://init \
> > - file://init-qt5 \
> > file://php.ini"
> >
> > require matrix-gui-paths.inc
> >
> > S = "${WORKDIR}/git"
> >
> > -INITFILE = "${@base_conditional('QT_PROVIDER', 'qt5', 'init-qt5', 'init',
> d)}"
> > -
> > -MATRIX_ROT = ""
> > -MATRIX_ROT_am37x-evm = "-display transformed:Rot90"
> > +MATRIX_FLAGS = "${@base_conditional('QT_PROVIDER','qt5','','-qws',d)}"
> > +MATRIX_FLAGS_append_am37x-evm = "-display transformed:Rot90"
> >
> > do_install(){
> > install -d ${D}${MATRIX_BASE_DIR}
> > @@ -41,13 +38,13 @@ do_install(){
> > install -m 0644 ${WORKDIR}/php.ini ${D}${MATRIX_BASE_DIR}/
> >
> > # Set the proper path in the init script
> > - sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}=
> ${WORKDIR}/${INITFILE}
> > - sed -i -e "s/__MATRIX_ROT__/\"${MATRIX_ROT}\"/"
> ${WORKDIR}/${INITFILE}
> > + sed -i -e s=__MATRIX_WEB_DIR__=${MATRIX_WEB_DIR}=
> ${WORKDIR}/init
> > + sed -i -e "s/__MATRIX_FLAGS__/\"${MATRIX_FLAGS}\"/"
> ${WORKDIR}/init
> >
> > # Install the init script
> > # TODO: replace init script with systemd files
> > install -d ${D}${sysconfdir}/init.d
> > - install -m 0755 ${WORKDIR}/${INITFILE}
> ${D}${sysconfdir}/init.d/matrix-gui-2.0
> > + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/matrix-gui-
> 2.0
> > }
> >
> > GUIDEPS = "matrix-gui-browser refresh-screen"
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > meta-arago mailing list
> > meta-arago@arago-project.org
> > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 5/6] arago-qt4: Add global environment variable script
2014-08-13 19:46 [PATCH 1/6] tslib: Use custom tslib.sh Franklin S. Cooper Jr
` (2 preceding siblings ...)
2014-08-13 19:46 ` [PATCH 4/6] matrix-gui: Remove environment variables from init script Franklin S. Cooper Jr
@ 2014-08-13 19:46 ` Franklin S. Cooper Jr
2014-08-13 19:46 ` [PATCH 6/6] ts-calibrate-init: Simplify calibrate logic Franklin S. Cooper Jr
4 siblings, 0 replies; 8+ messages in thread
From: Franklin S. Cooper Jr @ 2014-08-13 19:46 UTC (permalink / raw)
To: meta-arago; +Cc: Franklin S. Cooper Jr
From: "Franklin S. Cooper Jr" <fcooper@ti.com>
* There are important Qt environment variables that needs to be set and those
variables are only being set within Matrix's init script.
* This causes problems when your trying to manually run a Qt application
outside of Matrix since you need to manually export the proper Qt specific
environment variables again.
* Override the default qte.sh to add additional Arago specific Qt env variables
---
meta-arago-distro/recipes-qt/qt4/arago-qt4.inc | 3 ++-
meta-arago-distro/recipes-qt/qt4/files/qte.sh | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
create mode 100644 meta-arago-distro/recipes-qt/qt4/files/qte.sh
diff --git a/meta-arago-distro/recipes-qt/qt4/arago-qt4.inc b/meta-arago-distro/recipes-qt/qt4/arago-qt4.inc
index 715092e..0f5e117 100644
--- a/meta-arago-distro/recipes-qt/qt4/arago-qt4.inc
+++ b/meta-arago-distro/recipes-qt/qt4/arago-qt4.inc
@@ -1,7 +1,7 @@
# Common file for patches or tweaks that are needed by qt4-embedded and
# qt4-embedded-gles
-PR := "${PR}-arago5"
+PR := "${PR}-arago7"
# look for files in this layer first
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
@@ -16,4 +16,5 @@ LICENSE = "LGPLv2.1"
SRC_URI += "file://0001-PATCH-make-demos-maximized-for-TISDK-use.patch \
file://0002-qwslock-messages.patch \
+ file://qte.sh \
"
diff --git a/meta-arago-distro/recipes-qt/qt4/files/qte.sh b/meta-arago-distro/recipes-qt/qt4/files/qte.sh
new file mode 100644
index 0000000..3d656f3
--- /dev/null
+++ b/meta-arago-distro/recipes-qt/qt4/files/qte.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+### QT Environment Variables ###
+export QWS_MOUSE_PROTO=Auto
+
+
+# Set the QWS_MOUSE_PROTO for touchscreen if it exists
+if [ -e /dev/input/touchscreen0 ]
+then
+ export QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
+fi
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 6/6] ts-calibrate-init: Simplify calibrate logic
2014-08-13 19:46 [PATCH 1/6] tslib: Use custom tslib.sh Franklin S. Cooper Jr
` (3 preceding siblings ...)
2014-08-13 19:46 ` [PATCH 5/6] arago-qt4: Add global environment variable script Franklin S. Cooper Jr
@ 2014-08-13 19:46 ` Franklin S. Cooper Jr
4 siblings, 0 replies; 8+ messages in thread
From: Franklin S. Cooper Jr @ 2014-08-13 19:46 UTC (permalink / raw)
To: meta-arago; +Cc: Franklin S. Cooper Jr
From: "Franklin S. Cooper Jr" <fcooper@ti.com>
* Setting some of the tslib specific environment variable has been added to
tslib's /etc/profile.d script.
* Therefore, remove unneeded logic here.
Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
---
.../recipes-graphics/tslib/ts-calibrate-init/init | 30 +++++++-------------
1 file changed, 10 insertions(+), 20 deletions(-)
diff --git a/meta-arago-extras/recipes-graphics/tslib/ts-calibrate-init/init b/meta-arago-extras/recipes-graphics/tslib/ts-calibrate-init/init
index db5c278..cd59b5b 100644
--- a/meta-arago-extras/recipes-graphics/tslib/ts-calibrate-init/init
+++ b/meta-arago-extras/recipes-graphics/tslib/ts-calibrate-init/init
@@ -10,32 +10,22 @@
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-tsfile=/etc/pointercal
-export TSLIB_TSDEVICE=/dev/input/touchscreen0
-
# First let's check if we even see a touchscreen device node. If not
# then bail out.
-if [ ! -e $TSLIB_TSDEVICE ]
+if [ ! -e /dev/input/touchscreen0 ]
then
exit
fi
-# Check if the SD card is mounted and the first partition is
-# vfat. If so let's write the pointercal file there so that if
-# someone messes up calibration they can just delete the file from
-# any system and reboot the board.
-
-#TODO how can we find the SD card and not eMMC? can we look for a "boot"
-# LABEL?
-mount | grep /run/media/mmcblk0p1 | grep vfat > /dev/null 2>&1
-if [ "$?" = "0" ]
-then
- tsfile=/run/media/mmcblk0p1/pointercal
-fi
+# Import Important System Environment Variables
+SCRIPTS=/etc/profile.d/*.sh
-export TSLIB_CALIBFILE=$tsfile
+for f in $SCRIPTS
+do
+ source $f
+done
-if [ ! -f $tsfile ] ; then
+if [ ! -f $TSLIB_CALIBFILE ] ; then
echo -n "Calibrating touchscreen (first time only)"
ts_calibrate
echo "."
@@ -45,8 +35,8 @@ if [ ! -f $tsfile ] ; then
# that running other applications that look for /etc/pointercal and
# without TSLIB_CALIBFILE set will still get the right calibration.
# TODO: can we just globally export TSLIB_CALIBFILE?
- if [ ! -f /etc/pointercal -a -f $tsfile ]
+ if [ ! -f /etc/pointercal -a -f $TSLIB_CALIBFILE ]
then
- cp $tsfile /etc/pointercal
+ cp $TSLIB_CALIBFILE /etc/pointercal
fi
fi
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread