summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/busybox/S10mdev20
-rw-r--r--package/busybox/busybox.mk15
2 files changed, 35 insertions, 0 deletions
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev
new file mode 100644
index 000000000..d2643d023
--- /dev/null
+++ b/package/busybox/S10mdev
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Start mdev....
+#
+
+case "$1" in
+ start)
+ echo "Starting mdev..."
+ /sbin/mdev -s
+ ;;
+ stop)
+ ;;
+ restart|reload)
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index ffd66679e..711d11b0f 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -28,6 +28,19 @@ ifndef BUSYBOX_CONFIG_FILE
BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
endif
+# If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d
+ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y)
+define BUSYBOX_INSTALL_MDEV_SCRIPT
+ install -m 0755 package/busybox/S10mdev $(TARGET_DIR)/etc/init.d
+endef
+define BUSYBOX_SET_MDEV
+ $(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG))
+ $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_CONF,$(BUSYBOX_BUILD_CONFIG))
+ $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_EXEC,$(BUSYBOX_BUILD_CONFIG))
+ $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_LOAD_FIRMWARE,$(BUSYBOX_BUILD_CONFIG))
+endef
+endif
+
# If we have external syslogd, force busybox to use it
ifeq ($(BR2_PACKAGE_SYSKLOGD),y)
define BUSYBOX_SET_SYSKLOGD
@@ -122,6 +135,7 @@ define BUSYBOX_CONFIGURE_CMDS
$(BUSYBOX_SET_IPV6)
$(BUSYBOX_SET_RPC)
$(BUSYBOX_PREFER_STATIC)
+ $(BUSYBOX_SET_MDEV)
$(BUSYBOX_NETKITBASE)
$(BUSYBOX_NETKITTELNET)
@yes "" | $(MAKE) ARCH=$(KERNEL_ARCH) CROSS_COMPILE="$(TARGET_CROSS)" \
@@ -138,6 +152,7 @@ define BUSYBOX_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
$(TARGET_DIR)/usr/share/udhcpc/default.script; \
fi
+ $(BUSYBOX_INSTALL_MDEV_SCRIPT)
endef
define BUSYBOX_UNINSTALL_TARGET_CMDS