[oe] [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm
Andrea Adami
andrea.adami at gmail.com
Mon Sep 19 21:56:29 UTC 2011
* At this point in the boot process we may not have a writable /tmp
* directory. We will have a writable /dev/shm and the data we need
* is small enough that we use this directory.
*
* Patch was committed in the openembedded git server with commit id
* ca688dd2de58dbec865ac7e70fab4d2c373ad822
Signed-off-by: Tom Rini <tom_rini at mentor.com>
Signed-off-by: Andrea Adami <andrea.adami at gmail.com>
---
meta-oe/recipes-core/udev/udev/cache | 16 ++++++++--------
meta-oe/recipes-core/udev/udev/init | 16 ++++++++--------
meta-oe/recipes-core/udev/udev_173.bb | 2 +-
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/meta-oe/recipes-core/udev/udev/cache b/meta-oe/recipes-core/udev/udev/cache
index 6936170..62673ad 100644
--- a/meta-oe/recipes-core/udev/udev/cache
+++ b/meta-oe/recipes-core/udev/udev/cache
@@ -9,16 +9,16 @@ echo "Caching udev devnodes"
if [ "$DEVCACHE" != "" ]; then
echo -n "Populating dev cache"
(cd /; tar cf $DEVCACHE dev)
- mv /tmp/uname /etc/udev/saved.uname
- mv /tmp/cmdline /etc/udev/saved.cmdline
- mv /tmp/devices /etc/udev/saved.devices
- mv /tmp/atags /etc/udev/saved.atags
+ mv /dev/shm/uname /etc/udev/saved.uname
+ mv /dev/shm/cmdline /etc/udev/saved.cmdline
+ mv /dev/shm/devices /etc/udev/saved.devices
+ mv /dev/shm/atags /etc/udev/saved.atags
echo
else
- rm -f /tmp/uname
- rm -f /tmp/cmdline
- rm -f /tmp/devices
- rm -f /tmp/atags
+ rm -f /dev/shm/uname
+ rm -f /dev/shm/cmdline
+ rm -f /dev/shm/devices
+ rm -f /dev/shm/atags
fi
exit 0
diff --git a/meta-oe/recipes-core/udev/udev/init b/meta-oe/recipes-core/udev/udev/init
index ecc357d..b059fe2 100644
--- a/meta-oe/recipes-core/udev/udev/init
+++ b/meta-oe/recipes-core/udev/udev/init
@@ -37,15 +37,15 @@ LANG=C awk "\$2 == \"/dev\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
if [ "$DEVCACHE" != "" ]; then
# Invalidate udev cache if the kernel or its bootargs/cmdline have changed
- [ -x /bin/uname ] && /bin/uname -mrspv > /tmp/uname || touch /tmp/uname
- [ -r /proc/cmdline ] && cat /proc/cmdline > /tmp/cmdline || touch /tmp/cmdline
- [ -r /proc/devices ] && cat /proc/devices > /tmp/devices || touch /tmp/devices
- [ -r /proc/atags ] && cat /proc/atags > /tmp/atags || touch /tmp/atags
+ [ -x /bin/uname ] && /bin/uname -mrspv > /dev/shm/uname || touch /dev/shm/uname
+ [ -r /proc/cmdline ] && cat /proc/cmdline > /dev/shm/cmdline || touch /dev/shm/cmdline
+ [ -r /proc/devices ] && cat /proc/devices > /dev/shm/devices || touch /dev/shm/devices
+ [ -r /proc/atags ] && cat /proc/atags > /dev/shm/atags || touch /dev/shm/atags
if [ -e $DEVCACHE ] && \
- cmp -s /tmp/uname /etc/udev/saved.uname && \
- cmp -s /tmp/cmdline /etc/udev/saved.cmdline && \
- cmp -s /tmp/devices /etc/udev/saved.devices && \
- cmp -s /tmp/atags /etc/udev/saved.atags; then
+ cmp -s /dev/shm/uname /etc/udev/saved.uname && \
+ cmp -s /dev/shm/cmdline /etc/udev/saved.cmdline && \
+ cmp -s /dev/shm/devices /etc/udev/saved.devices && \
+ cmp -s /dev/shm/atags /etc/udev/saved.atags; then
(cd /; tar xf $DEVCACHE > /dev/null 2>&1)
not_first_boot=1
fi
diff --git a/meta-oe/recipes-core/udev/udev_173.bb b/meta-oe/recipes-core/udev/udev_173.bb
index df39d42..8ace629 100644
--- a/meta-oe/recipes-core/udev/udev_173.bb
+++ b/meta-oe/recipes-core/udev/udev_173.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
# Needed for udev-extras
DEPENDS = "gperf-native usbutils acl glib-2.0"
-PR = "r0"
+PR = "r1"
# version specific SRC_URI
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
--
1.7.3.4
More information about the Openembedded-devel
mailing list