Skip to contentSkip to conversation

Gou, Hongmei : weston-init: update init scripts related to restarting Weston

arago-commits Denys Dmytriyenko 2 participants 4 messages Apr 28, 2016 – May 4, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

So, I was looking into Weston init script lately for another reason and noticed there was a hole in its logic. From the logs I came to this commit made few months ago. Particularly, I'm interested why the first part of the change was made:

* Bypass restarting Weston if SD card has calibration file already

This seems incorrect, because if calibration file is only available on SD card, it has to be copied to /etc and in order to take immediate effect, udev has to be reloaded and weston has to be restarted, which how it used to be before. Why is this now bypassed? Please provide details of what this change is meant to address and how is it supposed to work. Thanks.

Signature · 1 line
Denys
Quoted 76 lines · Arago Project git
Module: meta-arago
Branch: master
Commit: b057be5db06e0f2e0ebb649841e64f60a997c2c1
URL:    http://arago-project.org/git/meta-arago.git?a=commit;h=b057be5db06e0f2e0ebb649841e64f60a997c2c1
Author: Gou, Hongmei <[email protected]>
Date:   Thu Jan 28 01:48:05 2016 +0000

weston-init: update init scripts related to restarting Weston

* Bypass restarting Weston if SD card has calibration file already

* Increase the sleep time before Weston is restarted
It takes some time to complete the Weston termination procedure. If Weston is restarted before the previous instance is fully terminated, the restart of Weston will fail.

---

 .../recipes-graphics/wayland/weston-init.bbappend  |    2 +-
 .../recipes-graphics/wayland/weston-init/init      |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +1 -1
index d9e15b6..4b5ad93 100644
@@ -1,4 +1,4 @@
-PR_append = "-arago4"
+PR_append = "-arago5"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
meta-arago-distro/recipes-graphics/wayland/weston-init/init +4 -3
index 2e2ae36..494584f 100644
@@ -63,8 +63,9 @@ case "$1" in
         # 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
+            # Copy it over to udev location, and done
             cp "$SD_CALUDEV_FILE" "$WS_CALUDEV_FILE"
+            exit 0
         else
             # Run a calibration app and save output to udev rules
             echo    "Calibrating touchscreen (first time only)"
@@ -85,7 +86,7 @@ case "$1" in
         udevadm control --reload
         udevadm trigger
         killproc weston
-        sleep 1
+        sleep 2
         openvt -c 4 -f runWeston
   ;;
 
@@ -96,7 +97,7 @@ case "$1" in
 
   restart)
 	$0 stop
-        sleep 1
+        sleep 2
         $0 start
   ;;
 

_______________________________________________
arago-commits mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/arago-commits

#2 lore raw

Ping.

Quoted 98 lines · Denys Dmytriyenko

So, I was looking into Weston init script lately for another reason and noticed there was a hole in its logic. From the logs I came to this commit made few months ago. Particularly, I'm interested why the first part of the change was made:

* Bypass restarting Weston if SD card has calibration file already

This seems incorrect, because if calibration file is only available on SD card, it has to be copied to /etc and in order to take immediate effect, udev has to be reloaded and weston has to be restarted, which how it used to be before. Why is this now bypassed? Please provide details of what this change is meant to address and how is it supposed to work. Thanks.

Signature · 1 line
Denys
Quoted 71 lines · Arago Project git
Module: meta-arago
Branch: master
Commit: b057be5db06e0f2e0ebb649841e64f60a997c2c1
URL:    http://arago-project.org/git/meta-arago.git?a=commit;h=b057be5db06e0f2e0ebb649841e64f60a997c2c1
Author: Gou, Hongmei <[email protected]>
Date:   Thu Jan 28 01:48:05 2016 +0000

weston-init: update init scripts related to restarting Weston

* Bypass restarting Weston if SD card has calibration file already

* Increase the sleep time before Weston is restarted
It takes some time to complete the Weston termination procedure. If Weston is restarted before the previous instance is fully terminated, the restart of Weston will fail.

---

 .../recipes-graphics/wayland/weston-init.bbappend  |    2 +-
 .../recipes-graphics/wayland/weston-init/init      |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +1 -1
index d9e15b6..4b5ad93 100644
@@ -1,4 +1,4 @@
-PR_append = "-arago4"
+PR_append = "-arago5"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
meta-arago-distro/recipes-graphics/wayland/weston-init/init +4 -3
index 2e2ae36..494584f 100644
@@ -63,8 +63,9 @@ case "$1" in
         # 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
+            # Copy it over to udev location, and done
             cp "$SD_CALUDEV_FILE" "$WS_CALUDEV_FILE"
+            exit 0
         else
             # Run a calibration app and save output to udev rules
             echo    "Calibrating touchscreen (first time only)"
@@ -85,7 +86,7 @@ case "$1" in
         udevadm control --reload
         udevadm trigger
         killproc weston
-        sleep 1
+        sleep 2
         openvt -c 4 -f runWeston
   ;;
 
@@ -96,7 +97,7 @@ case "$1" in
 
   restart)
 	$0 stop
-        sleep 1
+        sleep 2
         $0 start
   ;;
 
Quoted 5 lines

_______________________________________________
arago-commits mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/arago-commits

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#3 lore raw

Hongmei, Eric, Jake,

Ping again. I will be reverting this if not clarified. Thanks.

Signature · 1 line
Denys
Quoted 106 lines · Denys Dmytriyenko

Ping.

Quoted 5 lines · Denys Dmytriyenko

So, I was looking into Weston init script lately for another reason and noticed there was a hole in its logic. From the logs I came to this commit made few months ago. Particularly, I'm interested why the first part of the change was made:

Quoted 93 lines

* Bypass restarting Weston if SD card has calibration file already

This seems incorrect, because if calibration file is only available on SD card, it has to be copied to /etc and in order to take immediate effect, udev has to be reloaded and weston has to be restarted, which how it used to be before. Why is this now bypassed? Please provide details of what this change is meant to address and how is it supposed to work. Thanks.

Signature · 1 line
Denys
Quoted 71 lines · Arago Project git
Module: meta-arago
Branch: master
Commit: b057be5db06e0f2e0ebb649841e64f60a997c2c1
URL:    http://arago-project.org/git/meta-arago.git?a=commit;h=b057be5db06e0f2e0ebb649841e64f60a997c2c1
Author: Gou, Hongmei <[email protected]>
Date:   Thu Jan 28 01:48:05 2016 +0000

weston-init: update init scripts related to restarting Weston

* Bypass restarting Weston if SD card has calibration file already

* Increase the sleep time before Weston is restarted
It takes some time to complete the Weston termination procedure. If Weston is restarted before the previous instance is fully terminated, the restart of Weston will fail.

---

 .../recipes-graphics/wayland/weston-init.bbappend  |    2 +-
 .../recipes-graphics/wayland/weston-init/init      |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +1 -1
index d9e15b6..4b5ad93 100644
@@ -1,4 +1,4 @@
-PR_append = "-arago4"
+PR_append = "-arago5"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
meta-arago-distro/recipes-graphics/wayland/weston-init/init +4 -3
index 2e2ae36..494584f 100644
@@ -63,8 +63,9 @@ case "$1" in
         # 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
+            # Copy it over to udev location, and done
             cp "$SD_CALUDEV_FILE" "$WS_CALUDEV_FILE"
+            exit 0
         else
             # Run a calibration app and save output to udev rules
             echo    "Calibrating touchscreen (first time only)"
@@ -85,7 +86,7 @@ case "$1" in
         udevadm control --reload
         udevadm trigger
         killproc weston
-        sleep 1
+        sleep 2
         openvt -c 4 -f runWeston
   ;;
 
@@ -96,7 +97,7 @@ case "$1" in
 
   restart)
 	$0 stop
-        sleep 1
+        sleep 2
         $0 start
   ;;
 
Quoted 5 lines

_______________________________________________
arago-commits mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/arago-commits

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#4 lore raw

Hi, Denys:

We are sorry for the late response. Hongmei and myself are finally able to discuss this change and reproduce the issue at PSDK 2.0.1 release. Please see our comments below.

Best regards,

Eric

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Tuesday, May 03, 2016 12:17 AM
To: [email protected]
Cc: Gou, Hongmei; Ruei, Eric; Stiffler, Jacob
Subject: Re: [meta-arago] [arago-commits] Gou, Hongmei : weston-init: update init scripts related to restarting Weston

Hongmei, Eric, Jake,

Ping again. I will be reverting this if not clarified. Thanks.

Signature · 1 line
Denys
Quoted 20 lines · Denys Dmytriyenko

Ping.

Quoted 16 lines · Denys Dmytriyenko

So, I was looking into Weston init script lately for another reason and noticed there was a hole in its logic. From the logs I came to this commit made few months ago. Particularly, I'm interested why the first part of the change was made:

* Bypass restarting Weston if SD card has calibration file already

This seems incorrect, because if calibration file is only available on SD card, it has to be copied to /etc and in order to take immediate effect, udev has to be reloaded and weston has to be restarted, which how it used to be before. Why is this now bypassed? Please provide details of what this change is meant to address and how is it supposed to work. Thanks.

Signature · 1 line
Denys

You are right. It is incorrect and we need toi restart weston to pick up the calibration data. Therefore, we need to undo the change by removing "exit 0".
However, we may need to keep the "sleep 2" change, which is required for PSDK 2.0.1 AM437x. Please see my comments close to the changes below.

Eric

Quoted 39 lines
Quoted 39 lines · Arago Project git
Quoted 37 lines
Module: meta-arago
Branch: master
Commit: b057be5db06e0f2e0ebb649841e64f60a997c2c1
URL:    http://arago-project.org/git/meta-arago.git?a=commit;h=b057be5db06e0f2e0ebb649841e64f60a997c2c1
Author: Gou, Hongmei <[email protected]>
Date:   Thu Jan 28 01:48:05 2016 +0000

weston-init: update init scripts related to restarting Weston

* Bypass restarting Weston if SD card has calibration file already

* Increase the sleep time before Weston is restarted
It takes some time to complete the Weston termination procedure. If Weston is restarted before the previous instance is fully terminated, the restart of Weston will fail.

---

 .../recipes-graphics/wayland/weston-init.bbappend  |    2 +-
 .../recipes-graphics/wayland/weston-init/init      |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)
meta-arago-distro/recipes-graphics/wayland/weston-init.bbappend +1 -1
index d9e15b6..4b5ad93 100644
@@ -1,4 +1,4 @@
-PR_append = "-arago4"
+PR_append = "-arago5"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
meta-arago-distro/recipes-graphics/wayland/weston-init/init +0 -0
index 2e2ae36..494584f 100644
Quoted 8 lines

meta-arago-distro/recipes-graphics/wayland/weston-init/init case "$1" in · line 68

Quoted 8 lines
meta-arago-distro/recipes-graphics/wayland/weston-init/init +2 -1
@@ -63,8 +63,9 @@ case "$1" in
         # 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
+            # Copy it over to udev location, and done
             cp "$SD_CALUDEV_FILE" "$WS_CALUDEV_FILE"
+            exit 0

Undo both changes.

Eric

Quoted 9 lines
Quoted 9 lines

meta-arago-distro/recipes-graphics/wayland/weston-init/init case "$1" in · line 89

Quoted 9 lines
meta-arago-distro/recipes-graphics/wayland/weston-init/init +1 -1
         else
             # Run a calibration app and save output to udev rules
             echo    "Calibrating touchscreen (first time only)"
@@ -85,7 +86,7 @@ case "$1" in
         udevadm control --reload
         udevadm trigger
         killproc weston
-        sleep 1
+        sleep 2

This change is needed for PDSK 2.0.1 AM437x (Weston 1.6 and DDK 1.9)

Eric

Quoted 10 lines
Quoted 10 lines

meta-arago-distro/recipes-graphics/wayland/weston-init/init case "$1" in · line 101

Quoted 10 lines
meta-arago-distro/recipes-graphics/wayland/weston-init/init +1 -1
         openvt -c 4 -f runWeston
   ;;
 
@@ -96,7 +97,7 @@ case "$1" in
 
   restart)
 	$0 stop
-        sleep 1
+        sleep 2
         $0 start

I believe that this change is also not required.

Eric

Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
meta-arago-distro/recipes-graphics/wayland/weston-init/init +0 -0
   ;;
 

_______________________________________________
arago-commits mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/arago-commits

Quoted 4 lines

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago