summaryrefslogtreecommitdiff
path: root/package/udev/Makefile
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-08-24 20:19:26 +0000
committerGeoff Levand <geoffrey.levand@am.sony.com>2009-08-24 20:19:26 +0000
commit525d86686e5c30ca60666b4f8a83315b34a289d8 (patch)
treee85522c0c5fe9f59f04d2d500acb864849147a20 /package/udev/Makefile
parent0ff31d848f715c7f9c3100d4e41994ef33f1fc61 (diff)
downloadmtk-20170518-525d86686e5c30ca60666b4f8a83315b34a289d8.zip
mtk-20170518-525d86686e5c30ca60666b4f8a83315b34a289d8.tar.gz
mtk-20170518-525d86686e5c30ca60666b4f8a83315b34a289d8.tar.bz2
udev: Update udev package from udev-106 to udev-142
Update the init scripts have to use udevadm where appropriate. The udev package no longer provides separate udev utilities like udevtrigger and udevsettle. These have been incorporated into the udev admin program udevadm. Replace the udevextras sub package with config options to the udev package. Update the preinit script to check for '/lib/udev/devices', and copy it to '/dev/ if it is found, then to conditionaly setup /dev the old way with mknod etc. Udev now recommends using the directory '/lib/udev/devices' to initialize the '/dev' directory at startup. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> SVN-Revision: 17378
Diffstat (limited to 'package/udev/Makefile')
-rw-r--r--package/udev/Makefile142
1 files changed, 87 insertions, 55 deletions
diff --git a/package/udev/Makefile b/package/udev/Makefile
index 95115a2..b2b31c3 100644
--- a/package/udev/Makefile
+++ b/package/udev/Makefile
@@ -1,4 +1,4 @@
-#
+#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
@@ -8,80 +8,112 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=udev
-PKG_VERSION:=106
+PKG_VERSION:=142
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/
-PKG_MD5SUM:=320ccd2d0f4540d10e021bafa14f8985
+PKG_MD5SUM:=3edc4cf383dccb06d866c5156d59ddd5
include $(INCLUDE_DIR)/package.mk
+PKG_INSTALL=1
+
define Package/udev
- SECTION:=utils
- CATEGORY:=Utilities
- DEPENDS:=@LINUX_2_6
- TITLE:=Dynamic device management subsystem
- URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
+ SECTION:=base
+ CATEGORY:=Base system
+ TITLE:=Dynamic device management subsystem
+ URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
+ MAINTAINER:=Geoff Levand <geoffrey.levand@am.sony.com>
endef
define Package/udev/description
- udev provides a dynamic device directory containing only the files for
- actually present devices. It creates or removes device node files in
- the /dev directory, or it renames network interfaces.
+ udev allows Linux users to have a dynamic /dev directory and it
+ provides the ability to have persistent device names.
endef
-define Package/udevextras
-$(call Package/udev)
- TITLE:=Utilities for udev scripts, for general device discovery
- MENU:=1
+define Package/udev/config
+ source "$(SOURCE)/udev-config.in"
endef
-define Package/udevextras/config
- source "$(SOURCE)/udevextras-config.in"
-endef
+udev-args-$(CONFIG_UDEV_DISABLE_LOGGING) += --disable-logging
+udev-args-$(CONFIG_UDEV_ENABLE_DEBUG) += --enable-debug
-UDEV_ALL_EXTRAS=ata_id cdrom_id dasd_id edd_id scsi_id path_id usb_id volume_id
-UDEV_EXTRAS=$(strip $(foreach e, $(UDEV_ALL_EXTRAS), \
- $(if $(CONFIG_UDEVEXTRAS_$(e)),extras/$(e))))
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- STRIP="/bin/true" \
- OPTFLAGS="$(TARGET_CFLAGS)" \
- DESTDIR="$(PKG_INSTALL_DIR)" \
- INSTALL="install -c" \
- EXTRAS="$(UDEV_EXTRAS)" \
- VOLUME_ID_STATIC=true \
- all install
-endef
+CONFIGURE_ARGS += --prefix=/usr --exec-prefix= --sysconfdir=/etc \
+ --sbindir=/sbin $(udev-args-y)
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_ata_id) += ata_id
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_cdrom_id) += cdrom_id
+udev-extra-rules-$(CONFIG_UDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_collect) += collect
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_edd_id) += edd_id
+udev-extra-rules-$(CONFIG_UDEV_EXTRA_edd_id) += 61-persistent-storage-edd.rules
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_firmware) += firmware.sh
+udev-extra-rules-$(CONFIG_UDEV_EXTRA_firmware) += 50-firmware.rules
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_floppy) += create_floppy_devices
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_fstab_import) += fstab_import
+udev-extra-rules-$(CONFIG_UDEV_EXTRA_fstab_import) += 79-fstab_import.rules
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_path_id) += path_id
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_rule_generator) += \
+ write_cd_rules write_net_rules
+udev-extra-lib-data-$(CONFIG_UDEV_EXTRA_rule_generator) += \
+ rule_generator.functions
+udev-extra-rules-$(CONFIG_UDEV_EXTRA_rule_generator) += \
+ 75-cd-aliases-generator.rules 75-persistent-net-generator.rules
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_scsi_id) += scsi_id
+
+udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_usb_id) += usb_id
define Package/udev/install
- install -d -m0775 $(1)/etc/udev
- $(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/
- install -d -m0775 $(1)/lib/udev
- install -d -m0775 $(1)/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/
- install -d -m0775 $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/
- install -d -m0775 $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/
- install -d -m0775 $(1)/etc/udev/rules.d
- $(CP) files/20-input-grouping.rules $(1)/etc/udev/rules.d/
-endef
+ $(INSTALL_DIR) $(1)/etc/udev/rules.d
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
+
+ $(INSTALL_DIR) $(1)/sbin
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/sbin/udevadm \
+ $(PKG_INSTALL_DIR)/sbin/udevd \
+ $(1)/sbin
+
+ $(INSTALL_DIR) $(1)/lib/udev/rules.d
+ $(INSTALL_DATA) \
+ $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
+ $(udev-extra-rules-y)) \
+ $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
+ 50-udev-default.rules \
+ 60-persistent-input.rules \
+ 60-persistent-serial.rules \
+ 60-persistent-storage.rules \
+ 80-drivers.rules \
+ 95-udev-late.rules) \
+ $(1)/lib/udev/rules.d
+
+ $(INSTALL_DIR) $(1)/lib
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/lib/libudev.so.* \
+ $(1)/lib
-define Package/udevextras/install
- $(INSTALL_DIR) $(1)/etc/udev
- $(CP) $(PKG_BUILD_DIR)/etc/udev/rules.d $(1)/etc/udev/
$(INSTALL_DIR) $(1)/lib/udev
- $$(foreach f, $$(shell $(FIND) $(PKG_INSTALL_DIR)/lib/udev/ -type f), \
- $(CP) $$(f) $(1)/lib/udev/ ; \
- )
+ifneq ($(udev-extra-lib-bin-y),)
+ $(INSTALL_BIN) \
+ $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
+ $(udev-extra-lib-bin-y)) \
+ $(1)/lib/udev/
+endif
+ifneq ($(udev-extra-lib-data-y),)
+ $(INSTALL_DATA) \
+ $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \
+ $(udev-extra-lib-data-y)) \
+ $(1)/lib/udev/
+endif
endef
$(eval $(call BuildPackage,udev))
-$(eval $(call BuildPackage,udevextras))