aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2009-08-24 20:19:26 +0000
committerGeoff Levand <geoff@infradead.org>2009-08-24 20:19:26 +0000
commit542045ef6a402cf68d829e0e19888cd627815c9e (patch)
treefeb5845ad2d82cba841d120962d7aefea73af182 /package
parent74ce2e1f78271fd5ce86720cd058c66980ca92d9 (diff)
downloadupstream-542045ef6a402cf68d829e0e19888cd627815c9e.tar.gz
upstream-542045ef6a402cf68d829e0e19888cd627815c9e.tar.bz2
upstream-542045ef6a402cf68d829e0e19888cd627815c9e.zip
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17378 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/etc/preinit12
-rw-r--r--package/udev/Makefile142
-rw-r--r--package/udev/files/20-input-grouping.rules9
-rw-r--r--package/udev/patches/001-no_debug.patch22
-rw-r--r--package/udev/patches/002-udevtrigger_no_config.patch12
-rw-r--r--package/udev/patches/003-portability.patch51
-rw-r--r--package/udev/udev-config.in94
-rw-r--r--package/udev/udevextras-config.in57
8 files changed, 189 insertions, 210 deletions
diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit
index 4e706f182a..d5f02ed891 100755
--- a/package/base-files/files/etc/preinit
+++ b/package/base-files/files/etc/preinit
@@ -40,15 +40,19 @@ elif [ -x /sbin/hotplug2 ]; then
elif [ -x /sbin/udevd ]; then
mount -n -t tmpfs -o mode=0755 udev /dev
- /sbin/udevd --daemon
- /sbin/udevtrigger
- /sbin/udevsettle
+ [ -d /lib/udev/devices ] && cp -af /lib/udev/devices/* /dev/
+ [ -c /dev/console ] || mknod -m 0600 /dev/console c 5 1
+ [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3
+ /sbin/udevd --daemon --resolve-names=never
+ /sbin/udevadm trigger
+ /sbin/udevadm settle
M0=/dev/pty/ptmx
M1=/dev/pty/ptmx
HOTPLUG=
fi
-mkdir -p /dev/pts /dev/shm
+[ -d /dev/pts ] || mkdir -p /dev/pts
+[ -d /dev/shm ] || mkdir -p /dev/shm
mount devpts /dev/pts -t devpts
# the shell really doesn't like having stdin/out closed
diff --git a/package/udev/Makefile b/package/udev/Makefile
index 95115a2446..b2b31c37a6 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))
diff --git a/package/udev/files/20-input-grouping.rules b/package/udev/files/20-input-grouping.rules
deleted file mode 100644
index b124a1747a..0000000000
--- a/package/udev/files/20-input-grouping.rules
+++ /dev/null
@@ -1,9 +0,0 @@
-# Input devices, group under /dev/input
-SUBSYSTEM!="input", GOTO="input_grouping_end"
-
-KERNEL=="event[0-9]*", NAME="input/%k"
-KERNEL=="mice", NAME="input/%k"
-KERNEL=="mouse[0-9]*", NAME="input/%k"
-KERNEL=="js[0-9]*", NAME="input/%k"
-
-LABEL="input_grouping_end"
diff --git a/package/udev/patches/001-no_debug.patch b/package/udev/patches/001-no_debug.patch
deleted file mode 100644
index 626181e478..0000000000
--- a/package/udev/patches/001-no_debug.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: udev-106/Makefile
-===================================================================
---- udev-106.orig/Makefile 2007-06-04 13:22:17.765154568 +0200
-+++ udev-106/Makefile 2007-06-04 13:22:17.831144536 +0200
-@@ -113,7 +113,7 @@
- AR = $(CROSS_COMPILE)ar
- RANLIB = $(CROSS_COMPILE)ranlib
-
--CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-+CFLAGS = -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
- WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
- -Wchar-subscripts -Wmissing-declarations -Wnested-externs \
- -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes
-@@ -130,7 +130,7 @@
-
- # if DEBUG is enabled, then we do not strip
- ifeq ($(strip $(DEBUG)),true)
-- CFLAGS += -DDEBUG
-+ CFLAGS += -g -DDEBUG
- endif
-
- ifeq ($(strip $(USE_GCOV)),true)
diff --git a/package/udev/patches/002-udevtrigger_no_config.patch b/package/udev/patches/002-udevtrigger_no_config.patch
deleted file mode 100644
index db68ebf760..0000000000
--- a/package/udev/patches/002-udevtrigger_no_config.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: udev-106/udevtrigger.c
-===================================================================
---- udev-106.orig/udevtrigger.c 2007-06-04 13:22:17.745157608 +0200
-+++ udev-106/udevtrigger.c 2007-06-04 13:22:18.022115504 +0200
-@@ -446,7 +446,6 @@
- };
-
- logging_init("udevtrigger");
-- udev_config_init();
- dbg("version %s", UDEV_VERSION);
- sysfs_init();
-
diff --git a/package/udev/patches/003-portability.patch b/package/udev/patches/003-portability.patch
deleted file mode 100644
index f11f969bbc..0000000000
--- a/package/udev/patches/003-portability.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: udev-106/Makefile
-===================================================================
---- udev-106.orig/Makefile 2007-06-04 13:22:17.831144536 +0200
-+++ udev-106/Makefile 2007-06-04 13:22:18.210086928 +0200
-@@ -246,13 +246,15 @@
- .PHONY: install-config
-
- install-man:
-- $(INSTALL_DATA) -D udev.7 $(DESTDIR)$(mandir)/man7/udev.7
-- $(INSTALL_DATA) -D udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
-- $(INSTALL_DATA) -D udevtest.8 $(DESTDIR)$(mandir)/man8/udevtest.8
-- $(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
-- $(INSTALL_DATA) -D udevtrigger.8 $(DESTDIR)$(mandir)/man8/udevtrigger.8
-- $(INSTALL_DATA) -D udevsettle.8 $(DESTDIR)$(mandir)/man8/udevsettle.8
-- $(INSTALL_DATA) -D udevmonitor.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8
-+ $(INSTALL) -d $(DESTDIR)$(mandir)/man7
-+ $(INSTALL) -d $(DESTDIR)$(mandir)/man8
-+ $(INSTALL_DATA) udev.7 $(DESTDIR)$(mandir)/man7/udev.7
-+ $(INSTALL_DATA) udevinfo.8 $(DESTDIR)$(mandir)/man8/udevinfo.8
-+ $(INSTALL_DATA) udevtest.8 $(DESTDIR)$(mandir)/man8/udevtest.8
-+ $(INSTALL_DATA) udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8
-+ $(INSTALL_DATA) udevtrigger.8 $(DESTDIR)$(mandir)/man8/udevtrigger.8
-+ $(INSTALL_DATA) udevsettle.8 $(DESTDIR)$(mandir)/man8/udevsettle.8
-+ $(INSTALL_DATA) udevmonitor.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8
- - ln -f -s udevd.8 $(DESTDIR)$(mandir)/man8/udevcontrol.8
- @extras="$(EXTRAS)"; for target in $$extras; do \
- $(MAKE) -C $$target $@ || exit 1; \
-@@ -275,13 +277,16 @@
-
- install-bin:
- $(INSTALL) -d $(DESTDIR)$(udevdir)
-- $(INSTALL_PROGRAM) -D udevd $(DESTDIR)$(sbindir)/udevd
-- $(INSTALL_PROGRAM) -D udevtrigger $(DESTDIR)$(sbindir)/udevtrigger
-- $(INSTALL_PROGRAM) -D udevsettle $(DESTDIR)$(sbindir)/udevsettle
-- $(INSTALL_PROGRAM) -D udevcontrol $(DESTDIR)$(sbindir)/udevcontrol
-- $(INSTALL_PROGRAM) -D udevmonitor $(DESTDIR)$(usrsbindir)/udevmonitor
-- $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo
-- $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest
-+ $(INSTALL) -d $(DESTDIR)$(sbindir)
-+ $(INSTALL) -d $(DESTDIR)$(usrbindir)
-+ $(INSTALL) -d $(DESTDIR)$(usrsbindir)
-+ $(INSTALL_PROGRAM) udevd $(DESTDIR)$(sbindir)/udevd
-+ $(INSTALL_PROGRAM) udevtrigger $(DESTDIR)$(sbindir)/udevtrigger
-+ $(INSTALL_PROGRAM) udevsettle $(DESTDIR)$(sbindir)/udevsettle
-+ $(INSTALL_PROGRAM) udevcontrol $(DESTDIR)$(sbindir)/udevcontrol
-+ $(INSTALL_PROGRAM) udevmonitor $(DESTDIR)$(usrsbindir)/udevmonitor
-+ $(INSTALL_PROGRAM) udevinfo $(DESTDIR)$(usrbindir)/udevinfo
-+ $(INSTALL_PROGRAM) udevtest $(DESTDIR)$(usrbindir)/udevtest
- @extras="$(EXTRAS)"; for target in $$extras; do \
- $(MAKE) -C $$target $@ || exit 1; \
- done;
diff --git a/package/udev/udev-config.in b/package/udev/udev-config.in
new file mode 100644
index 0000000000..c10bb9cc4e
--- /dev/null
+++ b/package/udev/udev-config.in
@@ -0,0 +1,94 @@
+# udev package config
+
+menu "udev configuration"
+depends on PACKAGE_udev
+
+config UDEV_DISABLE_LOGGING
+ bool "Disable udev logging to syslog"
+ depends on PACKAGE_udev
+ default n
+ help
+ Disable logging of udev messages to the syslog. If
+ unsure, choose the default N.
+
+config UDEV_ENABLE_DEBUG
+ bool "Enable debug build of the udev package"
+ depends on PACKAGE_udev
+ default n
+ help
+ Compile in udev debug messages. If unsure, choose
+ the default N.
+
+config UDEV_EXTRA_ata_id
+ bool "Install udev ata_id callout"
+ default y
+ help
+ ata_id - udev callout to read product/serial number
+ from ATA drives
+
+config UDEV_EXTRA_cdrom_id
+ bool "Install udev cdrom_id callout"
+ default y
+ help
+ cdrom_id - udev callout to determine the capabilities
+ of optical drives and media
+
+config UDEV_EXTRA_collect
+ bool "Install udev collect"
+ default n
+ help
+ Adds ID to the list governed by <checkpoint>
+
+config UDEV_EXTRA_edd_id
+ bool "Install udev edd_id callout"
+ default n
+ help
+ edd_id - udev callout to identify BIOS disk drives
+ via EDD
+
+config UDEV_EXTRA_firmware
+ bool "Install firmware support"
+ default n
+ help
+ udev firmware loader
+ via EDD
+
+config UDEV_EXTRA_floppy
+ bool "Install create_floppy_devices callout"
+ default n
+ help
+ create_floppy_devices - udev callout to create all
+ possible floppy device based on the CMOS type
+
+config UDEV_EXTRA_fstab_import
+ bool "Install fstab import"
+ default y
+ help
+ find matching entry in fstab and export it
+
+config UDEV_EXTRA_path_id
+ bool "Install udev path_id callout"
+ default y
+ help
+ path_id - udev callout to create a device path based
+ unique name for a device to implement the Linux
+ Persistent Device Naming scheme
+
+config UDEV_EXTRA_rule_generator
+ bool "Install udev rule_generator"
+ default y
+ help
+
+config UDEV_EXTRA_scsi_id
+ bool "Install udev scsi_id callout"
+ default y
+ help
+ scsi_id - retrieve and generate a unique SCSI identifier
+
+config UDEV_EXTRA_usb_id
+ bool "Install udev usb_id callout"
+ default y
+ help
+ usb_id - can find the unique id of USB devices
+
+endmenu
diff --git a/package/udev/udevextras-config.in b/package/udev/udevextras-config.in
deleted file mode 100644
index 20ac1bbc0d..0000000000
--- a/package/udev/udevextras-config.in
+++ /dev/null
@@ -1,57 +0,0 @@
-
-config UDEVEXTRAS_ata_id
- bool
- prompt "ata_id" if PACKAGE_udevextras
- default n
- help
- ata_id can find unique identifiers for ATA devices
-
-config UDEVEXTRAS_cdrom_id
- bool
- prompt "cdrom_id" if PACKAGE_udevextras
- default n
- help
- cdrom_id can find unique identifiers for CDROM devices
-
-config UDEVEXTRAS_dasd_id
- bool
- prompt "dasd_id" if PACKAGE_udevextras
- default n
- help
- dasd_id can find unique identifiers for DASD devices
-
-config UDEVEXTRAS_edd_id
- bool
- prompt "edd_id" if PACKAGE_udevextras
- default n
- help
- edd_id can find unique identifiers for EDD devices
-
-config UDEVEXTRAS_path_id
- bool
- prompt "path_id" if PACKAGE_udevextras
- default n
- help
- path_id can find the full path (eg. bus-device-partition)
- of devices
-
-config UDEVEXTRAS_scsi_id
- bool
- prompt "scsi_id" if PACKAGE_udevextras
- default n
- help
- scsi_id can find unique identifiers for SCSI devices
-
-config UDEVEXTRAS_usb_id
- bool
- prompt "usb_id" if PACKAGE_udevextras
- default n
- help
- usb_id can find the unique id of USB devices
-
-config UDEVEXTRAS_volume_id
- bool
- prompt "volume_id" if PACKAGE_udevextras
- default n
- help
- volume_id can find the volume label of storage devices