summaryrefslogtreecommitdiff
path: root/package/busybox/busybox.mk
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2011-07-11 12:25:51 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-07-11 13:41:25 +0200
commitfc71f7e6f27829a389dacc38622eb687109133f6 (patch)
tree244006625c1be3cf982d8c27d124b12d0c39aff7 /package/busybox/busybox.mk
parentbd76bc5f80b963570e8eda92efc961e683264402 (diff)
busybox: provide /etc/mdev.conf if mdev is used
Without an mdev.conf file installed, mdev generates some /dev entries in an incorrect or non-standard way. Some examples: 1. /dev/null has permissions 660, but it should be accessible to normal users; 2. alsa devices get created in /dev, not /dev/snd as is more common, and as the default value of BR2_PACKAGE_ALSA_LIB_DEVDIR suggests; 3. event<N> files are created in /dev, not /dev/input. This mdev.conf is a selection from the examples provided in the busybox sources with minor tweaks. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/busybox/busybox.mk')
-rw-r--r--package/busybox/busybox.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 509c3bb9f..8998ca083 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -33,6 +33,11 @@ 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_INSTALL_MDEV_CONF
+ [ -f $(TARGET_DIR)/etc/mdev.conf ] || \
+ install -D -m 0644 package/busybox/mdev.conf \
+ $(TARGET_DIR)/etc/mdev.conf
+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))
@@ -159,6 +164,7 @@ define BUSYBOX_INSTALL_TARGET_CMDS
$(TARGET_DIR)/usr/share/udhcpc/default.script; \
fi
$(BUSYBOX_INSTALL_MDEV_SCRIPT)
+ $(BUSYBOX_INSTALL_MDEV_CONF)
$(BUSYBOX_INSTALL_LOGGING_SCRIPT)
endef