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
master
Geoff Levand 15 years ago
parent 0ff31d848f
commit 525d86686e
  1. 12
      package/base-files/files/etc/preinit
  2. 142
      package/udev/Makefile
  3. 9
      package/udev/files/20-input-grouping.rules
  4. 22
      package/udev/patches/001-no_debug.patch
  5. 12
      package/udev/patches/002-udevtrigger_no_config.patch
  6. 51
      package/udev/patches/003-portability.patch
  7. 94
      package/udev/udev-config.in
  8. 57
      package/udev/udevextras-config.in

@ -40,15 +40,19 @@ elif [ -x /sbin/hotplug2 ]; then
elif [ -x /sbin/udevd ]; then elif [ -x /sbin/udevd ]; then
mount -n -t tmpfs -o mode=0755 udev /dev mount -n -t tmpfs -o mode=0755 udev /dev
/sbin/udevd --daemon [ -d /lib/udev/devices ] && cp -af /lib/udev/devices/* /dev/
/sbin/udevtrigger [ -c /dev/console ] || mknod -m 0600 /dev/console c 5 1
/sbin/udevsettle [ -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 M0=/dev/pty/ptmx
M1=/dev/pty/ptmx M1=/dev/pty/ptmx
HOTPLUG= HOTPLUG=
fi 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 mount devpts /dev/pts -t devpts
# the shell really doesn't like having stdin/out closed # the shell really doesn't like having stdin/out closed

@ -1,4 +1,4 @@
# #
# Copyright (C) 2006-2008 OpenWrt.org # Copyright (C) 2006-2008 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
@ -8,80 +8,112 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=udev PKG_NAME:=udev
PKG_VERSION:=106 PKG_VERSION:=142
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/ PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/hotplug/
PKG_MD5SUM:=320ccd2d0f4540d10e021bafa14f8985 PKG_MD5SUM:=3edc4cf383dccb06d866c5156d59ddd5
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
PKG_INSTALL=1
define Package/udev define Package/udev
SECTION:=utils SECTION:=base
CATEGORY:=Utilities CATEGORY:=Base system
DEPENDS:=@LINUX_2_6 TITLE:=Dynamic device management subsystem
TITLE:=Dynamic device management subsystem URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
URL:=http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html MAINTAINER:=Geoff Levand <geoffrey.levand@am.sony.com>
endef endef
define Package/udev/description define Package/udev/description
udev provides a dynamic device directory containing only the files for udev allows Linux users to have a dynamic /dev directory and it
actually present devices. It creates or removes device node files in provides the ability to have persistent device names.
the /dev directory, or it renames network interfaces.
endef endef
define Package/udevextras define Package/udev/config
$(call Package/udev) source "$(SOURCE)/udev-config.in"
TITLE:=Utilities for udev scripts, for general device discovery
MENU:=1
endef endef
define Package/udevextras/config udev-args-$(CONFIG_UDEV_DISABLE_LOGGING) += --disable-logging
source "$(SOURCE)/udevextras-config.in" udev-args-$(CONFIG_UDEV_ENABLE_DEBUG) += --enable-debug
endef
UDEV_ALL_EXTRAS=ata_id cdrom_id dasd_id edd_id scsi_id path_id usb_id volume_id CONFIGURE_ARGS += --prefix=/usr --exec-prefix= --sysconfdir=/etc \
UDEV_EXTRAS=$(strip $(foreach e, $(UDEV_ALL_EXTRAS), \ --sbindir=/sbin $(udev-args-y)
$(if $(CONFIG_UDEVEXTRAS_$(e)),extras/$(e))))
udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_ata_id) += ata_id
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \ udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_cdrom_id) += cdrom_id
CROSS_COMPILE="$(TARGET_CROSS)" \ udev-extra-rules-$(CONFIG_UDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules
STRIP="/bin/true" \
OPTFLAGS="$(TARGET_CFLAGS)" \ udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_collect) += collect
DESTDIR="$(PKG_INSTALL_DIR)" \
INSTALL="install -c" \ udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_edd_id) += edd_id
EXTRAS="$(UDEV_EXTRAS)" \ udev-extra-rules-$(CONFIG_UDEV_EXTRA_edd_id) += 61-persistent-storage-edd.rules
VOLUME_ID_STATIC=true \
all install udev-extra-lib-bin-$(CONFIG_UDEV_EXTRA_firmware) += firmware.sh
endef 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 define Package/udev/install
install -d -m0775 $(1)/etc/udev $(INSTALL_DIR) $(1)/etc/udev/rules.d
$(CP) $(PKG_INSTALL_DIR)/etc/udev/* $(1)/etc/udev/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev
install -d -m0775 $(1)/lib/udev
install -d -m0775 $(1)/sbin/ $(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevcontrol $(1)/sbin/ $(INSTALL_BIN) \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevd $(1)/sbin/ $(PKG_INSTALL_DIR)/sbin/udevadm \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/udevsettle $(1)/sbin/ $(PKG_INSTALL_DIR)/sbin/udevd \
install -d -m0775 $(1)/usr/bin/ $(1)/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udevtest $(1)/usr/bin/ $(INSTALL_DIR) $(1)/lib/udev/rules.d
install -d -m0775 $(1)/usr/sbin/ $(INSTALL_DATA) \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(1)/usr/sbin/ $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
install -d -m0775 $(1)/etc/udev/rules.d $(udev-extra-rules-y)) \
$(CP) files/20-input-grouping.rules $(1)/etc/udev/rules.d/ $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \
endef 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 $(INSTALL_DIR) $(1)/lib/udev
$$(foreach f, $$(shell $(FIND) $(PKG_INSTALL_DIR)/lib/udev/ -type f), \ ifneq ($(udev-extra-lib-bin-y),)
$(CP) $$(f) $(1)/lib/udev/ ; \ $(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 endef
$(eval $(call BuildPackage,udev)) $(eval $(call BuildPackage,udev))
$(eval $(call BuildPackage,udevextras))

@ -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"

@ -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)

@ -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();

@ -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;

@ -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

@ -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
Loading…
Cancel
Save