summaryrefslogtreecommitdiff
path: root/meta/packages/udev
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2010-06-09 12:04:51 +0100
committerJoshua Lock <josh@linux.intel.com>2010-06-09 12:04:51 +0100
commit1c803f3ffb9effa53dc97478bea301b2dda3e4e6 (patch)
tree17fbba6f3c8dd733429b10f1d7789e76ae56c9f2 /meta/packages/udev
parentefc47a89990aa7fd4f57b42a1d4f21725ae99fee (diff)
downloadopenembedded-core-1c803f3ffb9effa53dc97478bea301b2dda3e4e6.tar.gz
openembedded-core-1c803f3ffb9effa53dc97478bea301b2dda3e4e6.tar.bz2
openembedded-core-1c803f3ffb9effa53dc97478bea301b2dda3e4e6.zip
Fix the boot process udev warning
Phenomena: there is udev warning in boot process tar: can't open '/etc/dev.tar': Read-only file system The reason is that the init script /etc/rcS.d/S04udev will try to tar the /dev as cache to speed up udev at next boot time. Unfortunately, S04udev is too early and the filesystem is not writable yet. To fix it, this patch split the cache action to another init script, and register it as /etc/rcS.d/S36, which is after the S35mountall, and the filesystem is already writable. Signed-off-by: Yu Ke <ke.yu@intel.com>
Diffstat (limited to 'meta/packages/udev')
-rw-r--r--meta/packages/udev/files/udev-cache20
-rw-r--r--meta/packages/udev/udev-115/init1
-rw-r--r--meta/packages/udev/udev-124/init1
-rw-r--r--meta/packages/udev/udev-141/init1
-rw-r--r--meta/packages/udev/udev-145/init1
-rw-r--r--meta/packages/udev/udev.inc14
-rw-r--r--meta/packages/udev/udev_092.bb1
-rw-r--r--meta/packages/udev/udev_115.bb1
-rw-r--r--meta/packages/udev/udev_124.bb1
-rw-r--r--meta/packages/udev/udev_141.bb3
-rw-r--r--meta/packages/udev/udev_145.bb3
11 files changed, 36 insertions, 11 deletions
diff --git a/meta/packages/udev/files/udev-cache b/meta/packages/udev/files/udev-cache
new file mode 100644
index 0000000000..a4e91915bd
--- /dev/null
+++ b/meta/packages/udev/files/udev-cache
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+### BEGIN INIT INFO
+# Provides: udev-cache
+# Required-Start: mountall
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: cache /dev to speedup the udev next boot
+### END INIT INFO
+
+[ -d /sys/class ] || exit 1
+[ -r /proc/mounts ] || exit 1
+[ -x /sbin/udevd ] || exit 1
+
+if [ ! -e /etc/dev.tar ]; then
+ (cd /; tar cf /etc/dev.tar /dev)
+fi
+
+exit 0
diff --git a/meta/packages/udev/udev-115/init b/meta/packages/udev/udev-115/init
index 5711d74b40..c882c75607 100644
--- a/meta/packages/udev/udev-115/init
+++ b/meta/packages/udev/udev-115/init
@@ -42,7 +42,6 @@ kill_udevd > "/dev/null" 2>&1
else
/sbin/udevtrigger
/sbin/udevsettle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
diff --git a/meta/packages/udev/udev-124/init b/meta/packages/udev/udev-124/init
index b78a07b20f..32ab370aa9 100644
--- a/meta/packages/udev/udev-124/init
+++ b/meta/packages/udev/udev-124/init
@@ -53,7 +53,6 @@ kill_udevd > "/dev/null" 2>&1
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
diff --git a/meta/packages/udev/udev-141/init b/meta/packages/udev/udev-141/init
index f38a0aa36e..eb5e50758b 100644
--- a/meta/packages/udev/udev-141/init
+++ b/meta/packages/udev/udev-141/init
@@ -53,7 +53,6 @@ kill_udevd > "/dev/null" 2>&1
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
diff --git a/meta/packages/udev/udev-145/init b/meta/packages/udev/udev-145/init
index f38a0aa36e..eb5e50758b 100644
--- a/meta/packages/udev/udev-145/init
+++ b/meta/packages/udev/udev-145/init
@@ -53,7 +53,6 @@ kill_udevd > "/dev/null" 2>&1
else
/sbin/udevadm trigger
/sbin/udevadm settle
- (cd /; tar cf /etc/dev.tar /dev)
fi
echo
diff --git a/meta/packages/udev/udev.inc b/meta/packages/udev/udev.inc
index 58aa118602..0afd817b8f 100644
--- a/meta/packages/udev/udev.inc
+++ b/meta/packages/udev/udev.inc
@@ -10,20 +10,25 @@ SRC_URI += " \
file://mount.sh \
file://network.sh \
file://local.rules \
+ file://udev-cache \
file://init"
UDEV_DEVFS_RULES ?= "0"
-PACKAGES =+ "udev-utils libvolume-id"
+PACKAGES =+ "udev-utils libvolume-id udev-cache"
FILES_udev-utils = "${usrbindir}/udevinfo ${usrbindir}/udevtest"
FILES_libvolume-id = "${base_libdir}/libvolume_id.so.*"
+FILES_udev-cache = "${sysconfdir}/init.d/udev-cache"
-RRECOMMENDS_${PN} = "udev-extraconf"
+RRECOMMENDS_${PN} += "udev-extraconf udev-cache"
inherit update-rc.d autotools pkgconfig
-INITSCRIPT_NAME = "udev"
-INITSCRIPT_PARAMS = "start 04 S ."
+INITSCRIPT_PACKAGES = "udev udev-cache"
+INITSCRIPT_NAME_udev = "udev"
+INITSCRIPT_PARAMS_udev = "start 04 S ."
+INITSCRIPT_NAME_udev-cache = "udev-cache"
+INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
export CROSS = "${TARGET_PREFIX}"
export HOSTCC = "${BUILD_CC}"
@@ -48,6 +53,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}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/packages/udev/udev_092.bb b/meta/packages/udev/udev_092.bb
index cce65d83da..c8669c3e6f 100644
--- a/meta/packages/udev/udev_092.bb
+++ b/meta/packages/udev/udev_092.bb
@@ -31,6 +31,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}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/packages/udev/udev_115.bb b/meta/packages/udev/udev_115.bb
index 6d9eede57c..835d02b379 100644
--- a/meta/packages/udev/udev_115.bb
+++ b/meta/packages/udev/udev_115.bb
@@ -30,6 +30,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}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/packages/udev/udev_124.bb b/meta/packages/udev/udev_124.bb
index 32f1cd2452..dad25f5253 100644
--- a/meta/packages/udev/udev_124.bb
+++ b/meta/packages/udev/udev_124.bb
@@ -31,6 +31,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}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/packages/udev/udev_141.bb b/meta/packages/udev/udev_141.bb
index 25c6057910..393c9f8778 100644
--- a/meta/packages/udev/udev_141.bb
+++ b/meta/packages/udev/udev_141.bb
@@ -16,8 +16,6 @@ PACKAGE_ARCH_h2200 = "h2200"
require udev.inc
-INITSCRIPT_PARAMS = "start 03 S ."
-
FILES_${PN} += "${base_libdir}/udev/*"
FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/"
@@ -33,6 +31,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}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
diff --git a/meta/packages/udev/udev_145.bb b/meta/packages/udev/udev_145.bb
index 1d04be1af0..d6cc9909d9 100644
--- a/meta/packages/udev/udev_145.bb
+++ b/meta/packages/udev/udev_145.bb
@@ -31,6 +31,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}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
install -d ${D}${sysconfdir}/udev/rules.d/
@@ -64,4 +65,4 @@ do_install_append_h2200() {
do_stage () {
autotools_stage_all
-} \ No newline at end of file
+}