All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] Move udev cache creation after checkroot
@ 2010-01-12 13:54 Koen Kooi
  2010-01-12 14:04 ` Graeme Gregory
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Koen Kooi @ 2010-01-12 13:54 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

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

Hi,

What's your opinion on attached (untested) patch? If there's some
consensus that this is a step in the right direction I'll create a
working & tested patch to commit.

Nota bene: I'm not going to discuss the merits of udev caching, only the
impact of this patch to the current situation.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLTH8oMkyGM64RGpERAqk0AJ4/5rUWj/Ciyfy0lfcDnM1SgqUN9gCeOr9f
QDA6nnADhKgOt6LEQZK+AUA=
=EtI0
-----END PGP SIGNATURE-----

[-- Attachment #2: 0001-udev-141-move-creation-of-etc-dev.tar-to-after-check.patch --]
[-- Type: text/x-patch, Size: 3164 bytes --]

From 1a77c8e64b2ba25e8f08b6b577c59312ed87a9e6 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@openembedded.org>
Date: Tue, 12 Jan 2010 14:48:59 +0100
Subject: [PATCH] udev 141: move creation of /etc/dev.tar to after checkroot

* / isn't always mounted rw when udev runs, so lets create /etc/dev.tar after checkroot has run
---
 recipes/udev/udev-141/cache |   18 ++++++++++++++++++
 recipes/udev/udev-141/init  |    8 --------
 recipes/udev/udev_141.bb    |   10 ++++++++--
 3 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 recipes/udev/udev-141/cache

diff --git a/recipes/udev/udev-141/cache b/recipes/udev/udev-141/cache
new file mode 100644
index 0000000..4db1466
--- /dev/null
+++ b/recipes/udev/udev-141/cache
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+export TZ=/etc/localtime
+
+[ -f /etc/default/udev ] && . /etc/default/udev
+
+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/atags /etc/udev/saved.atags
+				echo
+			fi
+
+exit 0
diff --git a/recipes/udev/udev-141/init b/recipes/udev/udev-141/init
index a0bdf40..24ca9d8 100644
--- a/recipes/udev/udev-141/init
+++ b/recipes/udev/udev-141/init
@@ -68,14 +68,6 @@ kill_udevd > "/dev/null" 2>&1
 		else
 			/sbin/udevadm trigger
 			/sbin/udevadm settle
-			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/atags /etc/udev/saved.atags
-				echo
-			fi
 		fi
 
 exit 0
diff --git a/recipes/udev/udev_141.bb b/recipes/udev/udev_141.bb
index 00ba971..df5e346 100644
--- a/recipes/udev/udev_141.bb
+++ b/recipes/udev/udev_141.bb
@@ -6,7 +6,7 @@ LICENSE = "GPL"
 # Untested
 DEFAULT_PREFERENCE = "-1"
 
-PR = "r19"
+PR = "r20"
 
 # needed for init.d script
 RDEPENDS_${PN} += "udev-utils"
@@ -24,7 +24,9 @@ SRC_URI += " \
        file://network.sh \
        file://local.rules \
        file://default \
-       file://init"
+       file://init \
+       file://cache \
+"
 
 SRC_URI_append_h2200 = " file://50-hostap_cs.rules "
 PACKAGE_ARCH_h2200 = "h2200"
@@ -70,6 +72,7 @@ do_install () {
 	oe_runmake 'DESTDIR=${D}' INSTALL=install install
 	install -d ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+	install -m 0755 ${WORKDIR}/cache ${D}${sysconfdir}/init.d/udev-cache
 
 	install -d ${D}${sysconfdir}/default
 	install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/udev
@@ -112,7 +115,10 @@ do_install_append_bug() {
 	install -m 0644 ${WORKDIR}/bmi_eventpipe.sh ${D}${sysconfdir}/udev/scripts/bmi_eventpipe.sh
 }
 
+# Create the cache after checkroot has run
 pkg_postinst_${PN}_append() {
+update-rc.d $OPT udev-cache start 12 S .
+
 if [ -d $D/lib/udev/rules.d ] ; then
 	echo "$D/lib/udev/rules.d is not a symlink, fixing that"
 	mv $D/lib/udev/rules.d/* $D${sysconfdir}/udev/rules.d/
-- 
1.6.5


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

* Re: [RFC][PATCH] Move udev cache creation after checkroot
  2010-01-12 13:54 [RFC][PATCH] Move udev cache creation after checkroot Koen Kooi
@ 2010-01-12 14:04 ` Graeme Gregory
  2010-01-13  9:51 ` Koen Kooi
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Graeme Gregory @ 2010-01-12 14:04 UTC (permalink / raw)
  To: openembedded-devel

On Tue, Jan 12, 2010 at 02:54:48PM +0100, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> What's your opinion on attached (untested) patch? If there's some
> consensus that this is a step in the right direction I'll create a
> working & tested patch to commit.
> 
> Nota bene: I'm not going to discuss the merits of udev caching, only the
> impact of this patch to the current situation.
> 
That patch seems to match what I have been saying but not had time
to code.

Acked-by: Graeme Gregory <dp@xora.org.uk>





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

* Re: [RFC][PATCH] Move udev cache creation after checkroot
  2010-01-12 13:54 [RFC][PATCH] Move udev cache creation after checkroot Koen Kooi
  2010-01-12 14:04 ` Graeme Gregory
@ 2010-01-13  9:51 ` Koen Kooi
  2010-01-13  9:58 ` Marcin Juszkiewicz
  2010-01-14 15:08 ` Koen Kooi
  3 siblings, 0 replies; 7+ messages in thread
From: Koen Kooi @ 2010-01-13  9:51 UTC (permalink / raw)
  To: openembedded-devel

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

ping

On 12-01-10 14:54, Koen Kooi wrote:
> Hi,
> 
> What's your opinion on attached (untested) patch? If there's some
> consensus that this is a step in the right direction I'll create a
> working & tested patch to commit.
> 
> Nota bene: I'm not going to discuss the merits of udev caching, only the
> impact of this patch to the current situation.
> 
> regards,
> 
> Koen

_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLTZerMkyGM64RGpERAg9CAKCNetCgK7Xs4b2UFLsn3pOoHRrSpgCgulfl
H2qZxaChQx0kSuc/8Jguhmg=
=4lQ5
-----END PGP SIGNATURE-----




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

* Re: [RFC][PATCH] Move udev cache creation after checkroot
  2010-01-12 13:54 [RFC][PATCH] Move udev cache creation after checkroot Koen Kooi
  2010-01-12 14:04 ` Graeme Gregory
  2010-01-13  9:51 ` Koen Kooi
@ 2010-01-13  9:58 ` Marcin Juszkiewicz
  2010-01-14 15:08 ` Koen Kooi
  3 siblings, 0 replies; 7+ messages in thread
From: Marcin Juszkiewicz @ 2010-01-13  9:58 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: Text/Plain, Size: 456 bytes --]

Dnia wtorek, 12 stycznia 2010 o 14:54:48 Koen Kooi napisał(a):
> Hi,
> 
> What's your opinion on attached (untested) patch? If there's some
> consensus that this is a step in the right direction I'll create a
> working & tested patch to commit.

Acked-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>

Regards, 
-- 
JID:      hrw@jabber.org
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [RFC][PATCH] Move udev cache creation after checkroot
  2010-01-12 13:54 [RFC][PATCH] Move udev cache creation after checkroot Koen Kooi
                   ` (2 preceding siblings ...)
  2010-01-13  9:58 ` Marcin Juszkiewicz
@ 2010-01-14 15:08 ` Koen Kooi
  2010-01-23 17:55   ` gnutoo
  3 siblings, 1 reply; 7+ messages in thread
From: Koen Kooi @ 2010-01-14 15:08 UTC (permalink / raw)
  To: openembedded-devel

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

It received 2 Acks, no NAKs, works well in the field: it's applied now

On 12-01-10 14:54, Koen Kooi wrote:
> Hi,
> 
> What's your opinion on attached (untested) patch? If there's some
> consensus that this is a step in the right direction I'll create a
> working & tested patch to commit.
> 
> Nota bene: I'm not going to discuss the merits of udev caching, only the
> impact of this patch to the current situation.
> 
> regards,
> 
> Koen

_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLTzN0MkyGM64RGpERAj0SAJ9zMcapZJRhN5WqngZ5Xqse9q+jJwCeMTR8
UUtNtGO21HZL99oyBYKQ8ug=
=LmQG
-----END PGP SIGNATURE-----




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

* Re: [RFC][PATCH] Move udev cache creation after checkroot
  2010-01-14 15:08 ` Koen Kooi
@ 2010-01-23 17:55   ` gnutoo
  2010-01-23 18:23     ` Koen Kooi
  0 siblings, 1 reply; 7+ messages in thread
From: gnutoo @ 2010-01-23 17:55 UTC (permalink / raw)
  To: openembedded-devel

On Thu, 2010-01-14 at 16:08 +0100, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> It received 2 Acks, no NAKs, works well in the field: it's applied now
> 
> On 12-01-10 14:54, Koen Kooi wrote:
> > Hi,
> > 
> > What's your opinion on attached (untested) patch? If there's some
> > consensus that this is a step in the right direction I'll create a
> > working & tested patch to commit.
> > 
> > Nota bene: I'm not going to discuss the merits of udev caching, only the
> > impact of this patch to the current situation.
> > 
> > regards,
> > 
> > Koen
I tested it today(sorry for testing late)
And boot still hang with udev + ro
maybe it fixes a different issue then

Denis.





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

* Re: [RFC][PATCH] Move udev cache creation after checkroot
  2010-01-23 17:55   ` gnutoo
@ 2010-01-23 18:23     ` Koen Kooi
  0 siblings, 0 replies; 7+ messages in thread
From: Koen Kooi @ 2010-01-23 18:23 UTC (permalink / raw)
  To: openembedded-devel

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

On 23-01-10 18:55, gnutoo wrote:
> On Thu, 2010-01-14 at 16:08 +0100, Koen Kooi wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> It received 2 Acks, no NAKs, works well in the field: it's applied now
>>
>> On 12-01-10 14:54, Koen Kooi wrote:
>>> Hi,
>>>
>>> What's your opinion on attached (untested) patch? If there's some
>>> consensus that this is a step in the right direction I'll create a
>>> working & tested patch to commit.
>>>
>>> Nota bene: I'm not going to discuss the merits of udev caching, only the
>>> impact of this patch to the current situation.
>>>
>>> regards,
>>>
>>> Koen
> I tested it today(sorry for testing late)
> And boot still hang with udev + ro
> maybe it fixes a different issue then

This wasn't about hangs, this was about trying to write to a RO fs :)

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLWz6GMkyGM64RGpERApVIAJ9GAr80qKR5ZlXfmOTK7byZEcxDiwCfYDi1
MIGa4OyxBXh5XZ9eXfLvNnQ=
=kIp/
-----END PGP SIGNATURE-----




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

end of thread, other threads:[~2010-01-23 18:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 13:54 [RFC][PATCH] Move udev cache creation after checkroot Koen Kooi
2010-01-12 14:04 ` Graeme Gregory
2010-01-13  9:51 ` Koen Kooi
2010-01-13  9:58 ` Marcin Juszkiewicz
2010-01-14 15:08 ` Koen Kooi
2010-01-23 17:55   ` gnutoo
2010-01-23 18:23     ` 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.