Skip to contentSkip to conversation

udev: Update initscript to check for devtmpfs

PATCH In review Saul Wold 2 participants 2 messages Apr 13, 2013 – Apr 14, 2013

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 udev: Update initscript to check for devtmpfs

This is needed because the udev_182 now requires devtmpfs and will not work correctly with out, so ensure that the kernel contains devtmpfs by checking /proc/filesystems.

[YOCTO #4125]

---
 meta/recipes-core/udev/udev/init | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-core/udev/udev/init +8 -0
index 37b5231..2a95ab7 100644
@@ -35,6 +35,14 @@ case "$1" in
     # propagate /dev from /sys
     echo "Starting udev"
 
+    # Check for requireed devtmpfs before trying to start udev and
+    # mount a no-existant fs.
+    if ! grep -q devtmpfs /proc/filesystems
+    then
+        echo "Missing devtmpfs, which is required for udev to run";
+        echo "Halting..."
+        halt
+    fi
     # mount the tmpfs on /dev, if not already done
     LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
             mount -n -o mode=0755 -t tmpfs none "/dev"
Signature · 1 line
1.8.0.2
#1 lore raw

You could also add some more text on how to enable it for the clueless

Quoted 1 line · Saul Wold

This is needed because the udev_182 now requires devtmpfs and will not

work correctly

Quoted 1 line

with out, so ensure that the kernel contains devtmpfs by checking

/proc/filesystems.

Review

Quoted 9 lines

[YOCTO #4125]

---
 meta/recipes-core/udev/udev/init | 8 ++++++++
 1 file changed, 8 insertions(+)
(quoted diff) +0 -0

b/meta/recipes-core/udev/udev/init

Quoted 7 lines

index 37b5231..2a95ab7 100644

meta/recipes-core/udev/udev/init +0 -0
@@ -35,6 +35,14 @@ case "$1" in
     # propagate /dev from /sys
     echo "Starting udev"
 

meta/recipes-core/udev/udev/init case "$1" in · line 47

Quoted 10 lines
meta/recipes-core/udev/udev/init +8 -0
+    # Check for requireed devtmpfs before trying to start udev and
+    # mount a no-existant fs.
+    if ! grep -q devtmpfs /proc/filesystems
+    then
+        echo "Missing devtmpfs, which is required for udev to run";
+        echo "Halting..."
+        halt
+    fi
     # mount the tmpfs on /dev, if not already done
     LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") {

exit 1 }' /proc/mounts && {

Quoted 10 lines
meta/recipes-core/udev/udev/init +0 -1
             mount -n -o mode=0755 -t tmpfs none "/dev"
--

1.8.0.2

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core