Skip to contentSkip to conversation

package/eudev: tweak initscript

PATCH New Gustavo Zacarias 3 participants 3 messages Oct 20, 2014 – Oct 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/eudev: tweak initscript

Make the udev initscript trigger in a coherent way, i.e. first set subsystems, then device and then let the whole thing settle. Otherwise for usb_modeswitch udev rules they never kick in since the storage aspect (device) gets claimed first and the switch ignored. Also set the settle timeout to a smaller value than the default 120 seconds to avoid stalling too much.

---
 package/eudev/S10udev | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/eudev/S10udev +3 -2
index 107dfd5..c3eafce 100755
@@ -30,8 +30,9 @@ case "$1" in
         printf "Populating ${udev_root:-/dev} using udev: "
         printf '\000\000\000\000' > /proc/sys/kernel/hotplug
         $UDEV_BIN -d || (echo "FAIL" && exit 1)
-        udevadm trigger --action=add
-        udevadm settle
+        udevadm trigger --type=subsystems --action=add
+        udevadm trigger --type=devices --action=add
+        udevadm settle --timeout=30 || echo "udevadm settle failed"
         echo "done"
         ;;
     stop)
Signature · 1 line
2.0.4
#1 lore raw

PATCH v2 1/1 package/eudev: tweak initscript

Gustavo, All,

On 2014-10-20 15:26 -0300, Gustavo Zacarias spake thusly:

Quoted 8 lines

Make the udev initscript trigger in a coherent way, i.e. first set subsystems, then device and then let the whole thing settle. Otherwise for usb_modeswitch udev rules they never kick in since the storage aspect (device) gets claimed first and the switch ignored. Also set the settle timeout to a smaller value than the default 120 seconds to avoid stalling too much.

Regards,
Yann E. MORIN.

Quoted 27 lines
---
 package/eudev/S10udev | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/eudev/S10udev +3 -2
index 107dfd5..c3eafce 100755
@@ -30,8 +30,9 @@ case "$1" in
         printf "Populating ${udev_root:-/dev} using udev: "
         printf '\000\000\000\000' > /proc/sys/kernel/hotplug
         $UDEV_BIN -d || (echo "FAIL" && exit 1)
-        udevadm trigger --action=add
-        udevadm settle
+        udevadm trigger --type=subsystems --action=add
+        udevadm trigger --type=devices --action=add
+        udevadm settle --timeout=30 || echo "udevadm settle failed"
         echo "done"
         ;;
     stop)
Signature · 6 lines
2.0.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v2 1/1 package/eudev: tweak initscript

In reply to Gustavo Zacarias

Dear Gustavo Zacarias,

Quoted 11 lines · Gustavo Zacarias

Make the udev initscript trigger in a coherent way, i.e. first set subsystems, then device and then let the whole thing settle. Otherwise for usb_modeswitch udev rules they never kick in since the storage aspect (device) gets claimed first and the switch ignored. Also set the settle timeout to a smaller value than the default 120 seconds to avoid stalling too much.

---
 package/eudev/S10udev | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com