All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm
@ 2011-09-19 21:56 Andrea Adami
  2011-09-19 21:56 ` [meta-oe][PATCH 2/3] udev: Fix cache problem Andrea Adami
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrea Adami @ 2011-09-19 21:56 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Tom Rini

* 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@mentor.com>
Signed-off-by: Andrea Adami <andrea.adami@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




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH 2/3] udev: Fix cache problem
  2011-09-19 21:56 [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Andrea Adami
@ 2011-09-19 21:56 ` Andrea Adami
  2011-09-19 21:56 ` [meta-oe][PATCH 3/3] udev: avoid udev stopping persistent ppd connections Andrea Adami
  2011-09-20  6:38 ` [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Koen Kooi
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea Adami @ 2011-09-19 21:56 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Tom Rini

* When /dev/shm is re-mounted we need to re-create the files that end up
* in /etc/udev/saved.*.  In addition, udev 124 wasn't making an initial
* saved.uname file.
*
* Patch was committed in the openembedded git server with commit id
* b6838a476a9c448cd994634688ead0815226b9fe

Signed-off-by: Tom Rini <tom_rini@mentor.com>
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 meta-oe/recipes-core/udev/udev/cache  |   13 ++++---------
 meta-oe/recipes-core/udev/udev_173.bb |    2 +-
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/meta-oe/recipes-core/udev/udev/cache b/meta-oe/recipes-core/udev/udev/cache
index 62673ad..681651d 100644
--- a/meta-oe/recipes-core/udev/udev/cache
+++ b/meta-oe/recipes-core/udev/udev/cache
@@ -9,16 +9,11 @@ echo "Caching udev devnodes"
 if [ "$DEVCACHE" != "" ]; then
 	echo -n "Populating dev cache"
 	(cd /; tar cf $DEVCACHE dev)
-	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
+	[ -x /bin/uname ] && /bin/uname -mrspv > /etc/udev/saved.uname || touch /etc/udev/saved.uname
+	[ -r /proc/cmdline ] && cat /proc/cmdline > /etc/udev/saved.cmdline || touch /etc/udev/saved.cmdline
+	[ -r /proc/devices ] && cat /proc/devices > /etc/udev/saved.devices || touch /etc/udev/saved.devices
+	[ -r /proc/atags ] && cat /proc/atags > /etc/udev/saved.atags || touch /etc/udev/saved.atags
 	echo
-else
-	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_173.bb b/meta-oe/recipes-core/udev/udev_173.bb
index 8ace629..d220395 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 = "r1"
+PR = "r2"
 
 # version specific SRC_URI
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH 3/3] udev: avoid udev stopping persistent ppd connections
  2011-09-19 21:56 [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Andrea Adami
  2011-09-19 21:56 ` [meta-oe][PATCH 2/3] udev: Fix cache problem Andrea Adami
@ 2011-09-19 21:56 ` Andrea Adami
  2011-09-20  6:38 ` [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Koen Kooi
  2 siblings, 0 replies; 4+ messages in thread
From: Andrea Adami @ 2011-09-19 21:56 UTC (permalink / raw)
  To: openembedded-devel

* When a pppd session is disconnected it triggers the udev to ifdown the
* ppp link which kills pppd and inhibits a reconnection.
*
* Now avoid udev stopping ppp connections.
*
* See also:
*  https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/396804
*  https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/78043
*  http://ubuntuforums.org/showthread.php?t=1177021
*
*  http://rants.atmurray.net/2007/01/pppd-persist-not-so-persist-with-udev.html
*
* Patch was committed in the openembedded git server with commit id
* 51cee0c4458d26660622197a0c897829625b0669

Signed-off-by: Mario Schuknecht <schuknecht@dresearch-fe.de>
Acked-by: Steffen Sledz <sledz@dresearch-fe.de>
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 .../recipes-core/udev/udev-extra-rules/network.sh  |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/meta-oe/recipes-core/udev/udev-extra-rules/network.sh b/meta-oe/recipes-core/udev/udev-extra-rules/network.sh
index 182c26d..d287855 100644
--- a/meta-oe/recipes-core/udev/udev-extra-rules/network.sh
+++ b/meta-oe/recipes-core/udev/udev-extra-rules/network.sh
@@ -9,6 +9,8 @@ test -x /sbin/cardctl && exit 0
 # We get two "add" events for hostap cards due to wifi0
 echo "$INTERFACE" | grep -q wifi && exit 0
 
+# Avoid udev stopping persistent ppp connections
+echo "$INTERFACE" | grep -q ppp && exit 0
 
 # Check if /etc/init.d/network has been run yet to see if we are 
 # called by starting /etc/rcS.d/S03udev and not by hotplugging a device
-- 
1.7.3.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm
  2011-09-19 21:56 [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Andrea Adami
  2011-09-19 21:56 ` [meta-oe][PATCH 2/3] udev: Fix cache problem Andrea Adami
  2011-09-19 21:56 ` [meta-oe][PATCH 3/3] udev: avoid udev stopping persistent ppd connections Andrea Adami
@ 2011-09-20  6:38 ` Koen Kooi
  2 siblings, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2011-09-20  6:38 UTC (permalink / raw)
  To: openembedded-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-09-11 23:56, Andrea Adami schreef:
> * 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@mentor.com> Signed-off-by: Andrea Adami
> <andrea.adami@gmail.com>

The caching isn't needed anymore, so I'll take a patch that removes it
completely :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFOeDTRMkyGM64RGpERAo1VAKC89mncrzEj0GhHFbGnxxC6wbEZMwCcDKWJ
V5hYsvrURq1Ox4T681yVH48=
=Dg5h
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-20  6:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-19 21:56 [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Andrea Adami
2011-09-19 21:56 ` [meta-oe][PATCH 2/3] udev: Fix cache problem Andrea Adami
2011-09-19 21:56 ` [meta-oe][PATCH 3/3] udev: avoid udev stopping persistent ppd connections Andrea Adami
2011-09-20  6:38 ` [meta-oe][PATCH 1/3] udev: make the dev cache work with /dev/shm Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.