udev: make the dev cache work with /dev/shm
PATCH 1/3 udev: make the dev cache work with /dev/shm
* 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
--- 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(-)
meta-oe/recipes-core/udev/udev/cache +8 -8
@@ -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
meta-oe/recipes-core/udev/udev/init +8 -8
@@ -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
meta-oe/recipes-core/udev/udev_173.bb +1 -1
@@ -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 \
Signature · 1 line
1.7.3.4
PATCH 2/3 udev: Fix cache problem
* 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
--- meta-oe/recipes-core/udev/udev/cache | 13 ++++--------- meta-oe/recipes-core/udev/udev_173.bb | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-)
meta-oe/recipes-core/udev/udev/cache +4 -9
@@ -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
meta-oe/recipes-core/udev/udev_173.bb +1 -1
@@ -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 \
Signature · 1 line
1.7.3.4
PATCH 3/3 udev: avoid udev stopping persistent ppd connections
In reply to Andrea Adami* 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
--- .../recipes-core/udev/udev-extra-rules/network.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
meta-oe/recipes-core/udev/udev-extra-rules/network.sh +2 -0
@@ -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
Signature · 1 line
1.7.3.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 19-09-11 23:56, Andrea Adami schreef:
Quoted 8 lines
* At this point in the boot process we may not have a writable /tmp * directory. We will have a writable
/dev/shmand the data we need * is small enough that we use this directory. * * Patch was committed in the openembedded git server with commit id *ca688dd2de58dbec865ac7e70fab4d2c373ad822Signed-off-by Tom Rini <[email protected]> Signed-off-by: Andrea Adami
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-----