From: Denys Dmytriyenko <denys@ti.com>
To: Carlos Hernandez <ceh@ti.com>
Cc: meta-arago@arago-project.org
Subject: Re: [PATCH] weston-init: update initscript to store calibration on SD card
Date: Tue, 9 Dec 2014 10:54:03 -0500 [thread overview]
Message-ID: <20141209155403.GO5113@edge> (raw)
In-Reply-To: <5487197A.8020309@ti.com>
On Tue, Dec 09, 2014 at 10:47:06AM -0500, Carlos Hernandez wrote:
> Acked-by: Carlos Hernandez <ceh@ti.com>
Thanks! You can touch $SD_CALUDEV_FILE mentioned below on your farm's SD
cards - once I push it shortly, it will be ready to go for the next nightly.
> On 12/08/2014 09:20 PM, Denys Dmytriyenko wrote:
> >From: Denys Dmytriyenko <denys@ti.com>
> >
> >Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> >---
> > .../recipes-graphics/wayland/weston-init.bbappend | 2 +-
> > .../recipes-graphics/wayland/weston-init/init | 43 +++++++++++++++++-----
> > 2 files changed, 35 insertions(+), 10 deletions(-)
> >
> >diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
> >index 0d76e3b..7825618 100644
> >--- a/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
> >+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend
> >@@ -1,3 +1,3 @@
> >-PR_append = "-arago2"
> >+PR_append = "-arago3"
> > FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/init b/meta-arago-distro/recipes-graphics/wayland/weston-init/init
> >index 834de4d..b2a2567 100644
> >--- a/meta-arago-distro/recipes-graphics/wayland/weston-init/init
> >+++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/init
> >@@ -32,7 +32,7 @@ case "$1" in
> > # This is all a nasty hack
> > if test -z "$XDG_RUNTIME_DIR"; then
> >- export XDG_RUNTIME_DIR=/run/user/root
> >+ export XDG_RUNTIME_DIR=/run/user/root
> > fi
> > if [ ! -d "$XDG_RUNTIME_DIR" ] ; then
> >@@ -42,23 +42,48 @@ case "$1" in
> > openvt -s weston
> >- # Handle touchscreen calibration
> >+ # If there's no touchscreen device available, done
> > if [ ! -e /dev/input/touchscreen0 ] ; then
> >- exit 0
> >+ exit 0
> > fi
> >- if [ ! -f $WS_CALUDEV_FILE ] ; then
> >+ # If it was already calibrated, done
> >+ if [ -f "$WS_CALUDEV_FILE" ] ; then
> >+ exit 0
> >+ fi
> >+
> >+ # Check if SD card is mounted
> >+ mount | grep /run/media/mmcblk0p1 | grep vfat > /dev/null 2>&1
> >+ if [ "$?" = "0" ] ; then
> >+ SD_MOUNTED="1"
> >+ else
> >+ SD_MOUNTED="0"
> >+ fi
> >+
> >+ # Check if SD card has a calibration rules file
> >+ SD_CALUDEV_FILE=/run/media/mmcblk0p1/ws-calibrate.rules
> >+ if [ "$SD_MOUNTED" = "1" -a -f "$SD_CALUDEV_FILE" ] ; then
> >+ # Copy it over to udev location
> >+ cp "$SD_CALUDEV_FILE" "$WS_CALUDEV_FILE"
> >+ else
> >+ # Run a calibration app and save output to udev rules
> > echo -n "Calibrating touchscreen (first time only)"
> > sleep 1
> > CAL_VALUES=`weston-calibrator|cut -c21-`
> > echo 'SUBSYSTEM=="input", ENV{WL_CALIBRATION}="'$CAL_VALUES'"' > $WS_CALUDEV_FILE
> > echo "."
> >- udevadm control --reload
> >- udevadm trigger
> >- killproc weston
> >- sleep 1
> >- openvt -s weston
> >+ # Copy it back to SD
> >+ if [ "$SD_MOUNTED" = "1" ] ; then
> >+ cp "$WS_CALUDEV_FILE" "$SD_CALUDEV_FILE"
> >+ fi
> > fi
> >+
> >+ # Reload and re-run udev rules and restart weston
> >+ udevadm control --reload
> >+ udevadm trigger
> >+ killproc weston
> >+ sleep 1
> >+ openvt -s weston
> > ;;
> > stop)
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
prev parent reply other threads:[~2014-12-09 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 2:20 [PATCH] weston-init: update initscript to store calibration on SD card Denys Dmytriyenko
2014-12-09 15:47 ` Carlos Hernandez
2014-12-09 15:54 ` Denys Dmytriyenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141209155403.GO5113@edge \
--to=denys@ti.com \
--cc=ceh@ti.com \
--cc=meta-arago@arago-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.