summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:36 +0000
commita10edd4cee0f1a6d3fe8af2bb8f3873c1cbcbe21 (patch)
treee7597fbe8042b306bbcad3e80263ef39b21d8917
parentb513ee61a533dea631cb25a1c9ec9ad367b6d0b3 (diff)
downloadmtk-20170518-a10edd4cee0f1a6d3fe8af2bb8f3873c1cbcbe21.zip
mtk-20170518-a10edd4cee0f1a6d3fe8af2bb8f3873c1cbcbe21.tar.gz
mtk-20170518-a10edd4cee0f1a6d3fe8af2bb8f3873c1cbcbe21.tar.bz2
Add udev initilisation
We have a udev package, but no means to start udev at boot. This change adds the necessary startup in /init, and adds the required /sbin/udevsettle to the udev installed files Signed-off-by: Jeremy Kerr <jk@ozlabs.org> SVN-Revision: 9412
-rw-r--r--package/udev/Makefile1
-rwxr-xr-xtarget/linux/generic-2.6/base-files/init14
2 files changed, 15 insertions, 0 deletions
diff --git a/package/udev/Makefile b/package/udev/Makefile
index 0ab8ec8..bde7a61 100644
--- a/package/udev/Makefile
+++ b/package/udev/Makefile
@@ -54,6 +54,7 @@ define Package/udev/install
install -d -m0775 $(1)/sbin/
$(CP) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
$(CP) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
+ $(CP) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/
install -d -m0775 $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
diff --git a/target/linux/generic-2.6/base-files/init b/target/linux/generic-2.6/base-files/init
index 98002ab..73bef61 100755
--- a/target/linux/generic-2.6/base-files/init
+++ b/target/linux/generic-2.6/base-files/init
@@ -14,6 +14,20 @@ elif [ -x /sbin/hotplug2 ]; then
mkdir /dev/pts
mkdir /dev/shm
/sbin/hotplug2 --no-persistent --coldplug --max_children 1
+
+elif [ -x /sbin/udevd ]; then
+ mount -n -t tmpfs -o mode=0755 udev /dev
+ mkdir /dev/pts
+ mkdir /dev/shm
+
+ if [ -e /proc/sys/kernel/hotplug ]; then
+ echo "" > /proc/sys/kernel/hotplug
+ fi
+
+ /sbin/udevd --daemon
+ /sbin/udevtrigger
+ /sbin/udevsettle
+
fi
mount none /dev/pts -t devpts