Patchwork udev: Update initscript to check for devtmpfs

login
register
mail settings
Submitter Saul Wold
Date April 13, 2013, 6:51 a.m.
Message ID <1365835876-28667-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/48055/
State Accepted
Commit b378cb75609d7beade67321036788ea0845dd624
Headers show

Comments

Saul Wold - April 13, 2013, 6:51 a.m.
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]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/udev/udev/init | 8 ++++++++
 1 file changed, 8 insertions(+)
Khem Raj - April 14, 2013, 9:37 p.m.
You could also add some more text on how to enable it for the clueless

On Friday, April 12, 2013, Saul Wold <sgw@linux.intel.com> wrote:
> 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]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta/recipes-core/udev/udev/init | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/meta/recipes-core/udev/udev/init
b/meta/recipes-core/udev/udev/init
> index 37b5231..2a95ab7 100644
> --- a/meta/recipes-core/udev/udev/init
> +++ b/meta/recipes-core/udev/udev/init
> @@ -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"
> --
> 1.8.0.2
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 37b5231..2a95ab7 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -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"