summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile6
-rw-r--r--package/base-files/files/rcdev.mdev7
-rw-r--r--package/base-files/files/rcdev.udev4
-rwxr-xr-xpackage/base-files/src/etc/init.d/rcS11
4 files changed, 20 insertions, 8 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index f25565aa9..84f9a2db1 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -23,6 +23,11 @@ INSTALL_STYLE:= manual
do-install:
$(CP) ./src/* $(IDIR_BASE_FILES)
+ifeq ($(ADK_RUNTIME_DEV_MDEV),y)
+ $(CP) ./files/rcdev.mdev $(IDIR_BASE_FILES)/etc/init.d/rcdev
+else ifeq ($(ADK_RUNTIME_DEV_UDEV),y)
+ $(CP) ./files/rcdev.udev $(IDIR_BASE_FILES)/etc/init.d/rcdev
+endif
ifeq (${ADK_TARGET_ROOTFS_NFSROOT},y)
@echo "#" > $(IDIR_BASE_FILES)/etc/network/interfaces
endif
@@ -73,6 +78,7 @@ endif
ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
rm -rf $(IDIR_BASE_FILES)/var
ln -sf tmp $(IDIR_BASE_FILES)/var
+ ln -sf var/run $(IDIR_BASE_FILES)/run
test -z $(ADK_RUNTIME_SHELL) || \
cat ./files/inittab.shell >> $(IDIR_BASE_FILES)/etc/inittab
ifeq ($(ADK_TARGET_WITH_VGA),y)
diff --git a/package/base-files/files/rcdev.mdev b/package/base-files/files/rcdev.mdev
new file mode 100644
index 000000000..18f9d1128
--- /dev/null
+++ b/package/base-files/files/rcdev.mdev
@@ -0,0 +1,7 @@
+# start mdev dynamic device node management
+echo >/dev/mdev.seq
+if [ -f /proc/sys/kernel/hotplug ];then
+ echo "/sbin/mdev" >/proc/sys/kernel/hotplug
+fi
+# creates f.e. /dev/root
+mdev -s
diff --git a/package/base-files/files/rcdev.udev b/package/base-files/files/rcdev.udev
new file mode 100644
index 000000000..340adffa2
--- /dev/null
+++ b/package/base-files/files/rcdev.udev
@@ -0,0 +1,4 @@
+# start udev dynamic device node management
+udevd --daemon
+udevadm trigger
+udevadm settle
diff --git a/package/base-files/src/etc/init.d/rcS b/package/base-files/src/etc/init.d/rcS
index 3e65d0967..3c46c976b 100755
--- a/package/base-files/src/etc/init.d/rcS
+++ b/package/base-files/src/etc/init.d/rcS
@@ -13,14 +13,6 @@ fi
# remount /dev with smaller size
mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev
-# start mdev dynamic device node management
-echo >/dev/mdev.seq
-if [ -f /proc/sys/kernel/hotplug ];then
- echo "/sbin/mdev" >/proc/sys/kernel/hotplug
-fi
-# creates f.e. /dev/root
-mdev -s
-
# seed some random
cat /etc/.rnd >/dev/urandom 2>&1
@@ -42,6 +34,9 @@ mkdir -p /var/tmp
touch /var/log/lastlog
touch /var/log/wtmp
+# start dynamic device node management
+[ -f /etc/init.d/rcdev ] && . /etc/init.d/rcdev
+
HOSTNAME=
[[ -s /etc/hostname ]] && HOSTNAME=$(cat /etc/hostname)
HOSTNAME=${HOSTNAME%%.*}