diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/udev/udev-118 | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/udev/udev-118')
-rw-r--r-- | recipes/udev/udev-118/flags.patch | 56 | ||||
-rw-r--r-- | recipes/udev/udev-118/init | 171 | ||||
-rw-r--r-- | recipes/udev/udev-118/local.rules | 31 | ||||
-rw-r--r-- | recipes/udev/udev-118/openmoko/init | 177 | ||||
-rw-r--r-- | recipes/udev/udev-118/permissions.rules | 101 | ||||
-rw-r--r-- | recipes/udev/udev-118/udev.rules | 102 | ||||
-rw-r--r-- | recipes/udev/udev-118/udevtrigger_add_devname_filtering.patch | 104 | ||||
-rw-r--r-- | recipes/udev/udev-118/vol_id_ld.patch | 17 |
8 files changed, 759 insertions, 0 deletions
diff --git a/recipes/udev/udev-118/flags.patch b/recipes/udev/udev-118/flags.patch new file mode 100644 index 0000000000..13f20eb6a8 --- /dev/null +++ b/recipes/udev/udev-118/flags.patch @@ -0,0 +1,56 @@ +--- + Makefile | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +Index: udev-115/Makefile +=================================================================== +--- udev-115.orig/Makefile 2007-08-24 01:29:54.000000000 +0200 ++++ udev-115/Makefile 2007-09-20 17:21:45.000000000 +0200 +@@ -112,39 +112,39 @@ + AR = $(CROSS_COMPILE)ar + RANLIB = $(CROSS_COMPILE)ranlib + +-CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ++override CFLAGS = -g -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 +-CFLAGS += $(WARNINGS) ++override CFLAGS += $(WARNINGS) + + LDFLAGS += -Wl,-warn-common,--as-needed + + OPTFLAGS = -Os +-CFLAGS += $(OPTFLAGS) ++override CFLAGS += $(OPTFLAGS) + + ifeq ($(strip $(USE_LOG)),true) +- CFLAGS += -DUSE_LOG ++ override CFLAGS += -DUSE_LOG + endif + + # if DEBUG is enabled, then we do not strip + ifeq ($(strip $(DEBUG)),true) +- CFLAGS += -DDEBUG ++ override CFLAGS += -DDEBUG + endif + + ifeq ($(strip $(USE_GCOV)),true) +- CFLAGS += -fprofile-arcs -ftest-coverage ++ override CFLAGS += -fprofile-arcs -ftest-coverage + LDFLAGS += -fprofile-arcs + endif + + ifeq ($(strip $(USE_SELINUX)),true) + UDEV_OBJS += udev_selinux.o + LIB_OBJS += -lselinux -lsepol +- CFLAGS += -DUSE_SELINUX ++ override CFLAGS += -DUSE_SELINUX + endif + + ifeq ($(strip $(USE_STATIC)),true) +- CFLAGS += -DUSE_STATIC ++ override CFLAGS += -DUSE_STATIC + LDFLAGS += -static + endif + diff --git a/recipes/udev/udev-118/init b/recipes/udev/udev-118/init new file mode 100644 index 0000000000..e44c675f2f --- /dev/null +++ b/recipes/udev/udev-118/init @@ -0,0 +1,171 @@ +#!/bin/sh -e +### BEGIN INIT INFO +# Provides: udev +# Required-Start: mountvirtfs +# Required-Stop: +# Default-Start: S +# Default-Stop: +# Short-Description: Start udevd, populate /dev and load drivers. +### END INIT INFO + +# we need to unmount /dev/pts/ and remount it later over the tmpfs +unmount_devpts() { + if mountpoint -q /dev/pts/; then + umount -l /dev/pts/ + fi + + if mountpoint -q /dev/shm/; then + umount -l /dev/shm/ + fi +} + +# mount a tmpfs over /dev, if somebody did not already do it +mount_tmpfs() { + if grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then + return + fi + + # /dev/.static/dev/ is used by MAKEDEV to access the real /dev/ directory. + # /etc/udev/ is recycled as a temporary mount point because it's the only + # directory which is guaranteed to be available. + mount -n -o bind /dev /etc/udev + + if ! mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs udev /dev; then + umount /etc/udev + echo "udev requires tmpfs support, not started." + exit 1 + fi + + mkdir -p /dev/.static/dev + chmod 700 /dev/.static/ + # The mount options in busybox are non-standard... + if test -x /bin/mount.util-linux + then + /bin/mount.util-linux --move /etc/udev /dev/.static/dev + elif test -x /bin/busybox + then + busybox mount -n -o move /etc/udev /dev/.static/dev + else + echo "udev requires an identifiable mount command, not started." + umount /etc/udev + umount /dev + exit 1 + fi +} + +make_extra_nodes() { + [ -c /dev/null ] || mknod -m 666 /dev/null c 1 3 +# I hate this hack. -- Md + if [ "$(echo /lib/udev/devices/*)" != "/lib/udev/devices/*" ]; then + cp -a /lib/udev/devices/* /dev/ + fi + + [ -e /etc/udev/links.conf ] || return 0 + grep '^[^#]' /etc/udev/links.conf | \ + while read type name arg1; do + [ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue + case "$type" in + L) ln -s $arg1 /dev/$name ;; + D) mkdir -p /dev/$name ;; + M) mknod -m 600 /dev/$name $arg1 ;; + *) echo "links.conf: unparseable line ($type $name $arg1)" ;; + esac + done +} + +supported_kernel() { + case "$(uname -r)" in + 2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;; + 2.6.1[0134]|2.6.1[01234][!0-9]*) return 1 ;; + esac + return 0 +} + +# shell version of /usr/bin/tty +my_tty() { + [ -x /bin/readlink ] || return 0 + [ -e /proc/self/fd/0 ] || return 0 + readlink --silent /proc/self/fd/0 || true +} + +############################################################################## + +PATH="/sbin:/bin:/usr/bin" + +[ -x /sbin/udevd ] || exit 0 + +# defaults +tmpfs_size="2M" + +. /etc/udev/udev.conf + +if ! supported_kernel; then + echo "udev requires a kernel >= 2.6.15, not started." + exit 1 +fi + +if [ ! -e /proc/filesystems ]; then + echo "udev requires a mounted procfs, not started." + exit 1 +fi + +if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then + echo "udev requires tmpfs support, not started." + exit 1 +fi + +if [ ! -d /sys/class/ ]; then + echo "udev requires a mounted sysfs, not started." + exit 1 +fi + +############################################################################## + +# When modifying this script, do not forget that between the time that +# the new /dev has been mounted and udevsynthesize has been run there will be +# no /dev/null. This also means that you cannot use the "&" shell command. +case "$1" in + start) + unmount_devpts + mount_tmpfs + [ -d /proc/1 ] || mount -n /proc + + # /dev/null must be created before udevd is started + make_extra_nodes + + # It's all over netlink now + if [ -e /proc/sys/kernel/hotplug ]; then + echo "" > /proc/sys/kernel/hotplug + fi + + echo "Starting the hotplug events dispatcher" "udevd" + udevd --daemon + + echo "Synthesizing the initial hotplug events" + udevtrigger + udevsettle + ;; + + stop) + echo "Stopping the hotplug events dispatcher" "udevd" + start-stop-daemon --stop --name udevd --quiet + ;; + + restart|force-reload) + echo "Stopping the hotplug events dispatcher" "udevd" + if start-stop-daemon --stop --name udevd --quiet ; then + exit 1 + fi + + echo "Starting the hotplug events dispatcher" "udevd" + udevd --daemon + ;; + + *) + echo "Usage: /etc/init.d/udev {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 + diff --git a/recipes/udev/udev-118/local.rules b/recipes/udev/udev-118/local.rules new file mode 100644 index 0000000000..5b926018f5 --- /dev/null +++ b/recipes/udev/udev-118/local.rules @@ -0,0 +1,31 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +# Media automounting +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" + +# Handle network interface setup +SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" +SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" + +# The first rtc device is symlinked to /dev/rtc +KERNEL=="rtc0", SYMLINK+="rtc" + +# Try and modprobe for drivers for new hardware +ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" + +# Create a symlink to any touchscreen input device +SUBSYSTEM=="input", KERNEL=="event[0-9]*", SYSFS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" diff --git a/recipes/udev/udev-118/openmoko/init b/recipes/udev/udev-118/openmoko/init new file mode 100644 index 0000000000..e8b2cc57f0 --- /dev/null +++ b/recipes/udev/udev-118/openmoko/init @@ -0,0 +1,177 @@ +#!/bin/sh -e +### BEGIN INIT INFO +# Provides: udev +# Required-Start: mountkernfs +# Required-Stop: +# Default-Start: S +# Default-Stop: +# Short-Description: Start udevd, populate /dev and load drivers. +### END INIT INFO + +# This script is based on Debian's. + +COLDPLUG=no +COLDPLUG_TARBALL="/lib/udev/devices.tar.gz" + +for x in $(cat /proc/cmdline); do + case $x in + coldplug) + COLDPLUG=yes + ;; + esac +done + +# we need to unmount /dev/pts/ and remount it later over the tmpfs +unmount_devpts() { + if mountpoint -q /dev/pts/; then + umount -n -l /dev/pts/ + fi + + if mountpoint -q /dev/shm/; then + umount -n -l /dev/shm/ + fi +} + +# mount a tmpfs over /dev, if somebody did not already do it +mount_tmpfs() { + if grep -q "/dev tmpfs" /proc/mounts; then + return + fi + + if ! mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs udev /dev; then + echo "udev requires tmpfs support, not started." + exit 1 + fi + + return 0 +} + +create_dev_makedev() { + if [ -e /sbin/MAKEDEV ]; then + ln -sf /sbin/MAKEDEV /dev/MAKEDEV + else + ln -sf /bin/true /dev/MAKEDEV + fi +} + +make_extra_nodes() { + ret=1 + if [ "$(echo /lib/udev/devices/*)" != "/lib/udev/devices/*" ]; then + cp -a /lib/udev/devices/* /$1/ + ret=0 + fi + + [ -e /etc/udev/links.conf ] || return $ret + + grep '^[^#]' /etc/udev/links.conf | \ + while read type name arg1; do + [ "$type" -a "$name" -a ! -e "/$1/$name" -a ! -L "/$1/$name" ] || continue + case "$type" in + L) ln -s $arg1 /$1/$name ;; + D) mkdir -p /$1/$name ;; + M) mknod -m 600 /$1/$name $arg1 ;; + *) echo "links.conf: unparseable line ($type $name $arg1)" >&2 ;; + esac + done + + return $ret +} + +############################################################################## + +[ -x /sbin/udevd ] || exit 0 + +PATH="/sbin:/bin" + +# defaults +tmpfs_size="2M" +udev_root="/dev" + +if [ -e /etc/udev/udev.conf ]; then + . /etc/udev/udev.conf +fi + +############################################################################## + +# When modifying this script, do not forget that between the time that the +# new /dev has been mounted and udevadm trigger has been run there will be +# no /dev/null. This also means that you cannot use the "&" shell command. + +case "$1" in + start) + if [ -e "$udev_root/.udev/" ]; then + if mountpoint -q $udev_root/; then + TMPFS_MOUNTED=1 + else + echo ".udev/ already exists on the static $udev_root!" + fi + fi + + echo > /sys/kernel/uevent_helper + + if [ -z "$TMPFS_MOUNTED" ]; then + unmount_devpts + mount_tmpfs + else + # and clean up the database of the initramfs udev + rm -rf /dev/.udev/ + fi + + # /dev/null must be created before udevd is started + if ! make_extra_nodes "$udev_root"; then + COLDPLUG=yes + fi + if [ ! -f "$COLDPLUG_TARBALL" ]; then + COLDPLUG=yes + fi + + # if this directory is not present /dev will not be updated by udev + mkdir -p /dev/.udev/db/ + + echo "Startting the hotplug events dispatcher" + udevd --daemon + + mkdir -p /dev/.udev/queue/ /dev/.udev/rules.d/ + + create_dev_makedev + + if [ $COLDPLUG != "no" ]; then + echo "Synthesizing the initial hotplug events" + udevadm trigger + + # wait for the udevd childs to finish + echo "Waiting for /dev to be fully populated" + if udevadm settle; then + echo 'done' + else + echo 'timeout' + fi + fi + + ;; + + stop) + echo "Stopping the hotplug events dispatcher" + start-stop-daemon --stop --name udevd --quiet --oknodo + ;; + + restart) + echo "Stopping the hotplug events dispatcher" + start-stop-daemon --stop --name udevd --quiet --oknodo + + echo "Startting the hotplug events dispatcher" + udevd --daemon + ;; + + reload|force-reload) + udevadm control --reload_rules + ;; + + *) + echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload}" + exit 1 + ;; +esac + +exit 0 + diff --git a/recipes/udev/udev-118/permissions.rules b/recipes/udev/udev-118/permissions.rules new file mode 100644 index 0000000000..99e03b1036 --- /dev/null +++ b/recipes/udev/udev-118/permissions.rules @@ -0,0 +1,101 @@ +ACTION!="add", GOTO="permissions_end" + +# workarounds needed to synchronize with sysfs +DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt" +# only needed for kernels < 2.6.16 +SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" +# only needed for kernels < 2.6.17 +SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" + +# default permissions for block devices +SUBSYSTEM=="block", GROUP="disk" +SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy" + +# IDE devices +BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", DRIVER=="ide-cdrom|pcd", \ + IMPORT{program}="cdrom_id --export $tempnode" +ENV{ID_CDROM}=="?*", GROUP="cdrom" +BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape" +BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape" + +# SCSI devices +BUS=="scsi", SYSFS{type}=="1", GROUP="tape" +BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom" + +# USB devices +BUS=="usb", KERNEL=="legousbtower*", MODE="0666" +BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp" + +# usbfs-like devices +SUBSYSTEM=="usb_device", MODE="0664" + +# iRiver music players +SUBSYSTEM=="usb_device", GROUP="plugdev", \ + SYSFS{idVendor}=="4102", SYSFS{idProduct}=="10[01][135789]" + +# serial devices +SUBSYSTEM=="tty", GROUP="dialout" +SUBSYSTEM=="capi", GROUP="dialout" +SUBSYSTEM=="slamr", GROUP="dialout" +SUBSYSTEM=="zaptel", GROUP="dialout" + +# vc devices (all members of the tty subsystem) +KERNEL=="ptmx", MODE="0666", GROUP="root" +KERNEL=="console", MODE="0600", GROUP="root" +KERNEL=="tty", MODE="0666", GROUP="root" +KERNEL=="tty[0-9]*", GROUP="root" +KERNEL=="pty*", MODE="0666", GROUP="tty" + +# video devices +SUBSYSTEM=="video4linux", GROUP="video" +SUBSYSTEM=="drm", GROUP="video" +SUBSYSTEM=="dvb", GROUP="video" +SUBSYSTEM=="em8300", GROUP="video" +SUBSYSTEM=="graphics", GROUP="video" +SUBSYSTEM=="nvidia", GROUP="video" + +# misc devices +KERNEL=="random", MODE="0666" +KERNEL=="urandom", MODE="0666" +KERNEL=="mem", MODE="0640", GROUP="kmem" +KERNEL=="kmem", MODE="0640", GROUP="kmem" +KERNEL=="port", MODE="0640", GROUP="kmem" +KERNEL=="full", MODE="0666" +KERNEL=="null", MODE="0666" +KERNEL=="zero", MODE="0666" +KERNEL=="inotify", MODE="0666" +KERNEL=="sgi_fetchop", MODE="0666" +KERNEL=="sonypi", MODE="0666" +KERNEL=="agpgart", GROUP="video" +KERNEL=="rtc", GROUP="audio" + +KERNEL=="cdemu[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd", MODE="0644" + +# printers and parallel devices +SUBSYSTEM=="printer", GROUP="lp" +SUBSYSTEM=="ppdev", GROUP="lp" +KERNEL=="pt[0-9]*", GROUP="tape" +KERNEL=="pht[0-9]*", GROUP="tape" + +# sound devices +SUBSYSTEM=="sound", GROUP="audio" + +# ieee1394 devices +KERNEL=="raw1394", GROUP="disk" +KERNEL=="dv1394*", GROUP="video" +KERNEL=="video1394*", GROUP="video" + +# input devices +KERNEL=="event[0-9]*", SYSFS{name}=="*dvb*|*DVB*|* IR *" \ + MODE="0664", GROUP="video" +KERNEL=="js[0-9]*", MODE="0664" + +# AOE character devices +SUBSYSTEM=="aoe", MODE="0220", GROUP="disk" +SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" + +LABEL="permissions_end" + diff --git a/recipes/udev/udev-118/udev.rules b/recipes/udev/udev-118/udev.rules new file mode 100644 index 0000000000..72be706e84 --- /dev/null +++ b/recipes/udev/udev-118/udev.rules @@ -0,0 +1,102 @@ +# There are a number of modifiers that are allowed to be used in some +# of the different fields. They provide the following subsitutions: +# +# %n the "kernel number" of the device. +# For example, 'sda3' has a "kernel number" of '3' +# %e the smallest number for that name which does not matches an existing node +# %k the kernel name for the device +# %M the kernel major number for the device +# %m the kernel minor number for the device +# %b the bus id for the device +# %c the string returned by the PROGRAM +# %s{filename} the content of a sysfs attribute +# %% the '%' char itself +# + +# SCSI devices +BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n" + +# USB devices +BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k" +BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k" +BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k" +BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k" +BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k" +BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k" +BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \ + SYMLINK+="pilot" + +# usbfs-like devices +SUBSYSTEM=="usb_device", \ + PROGRAM="/bin/sh -c 'export X=%k; export X=$${X#usbdev}; export B=$${X%%%%.*}; export D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c" + +# serial devices +KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20" +KERNEL=="capi[0-9]*", NAME="capi/%n" + +# video devices +KERNEL=="card[0-9]*", NAME="dri/%k" + +# misc devices +KERNEL=="hw_random", NAME="hwrng" +KERNEL=="tun", NAME="net/%k" + +KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" +KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" +KERNEL=="pktcdvd", NAME="pktcdvd/control" + +KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" +KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" +KERNEL=="microcode", NAME="cpu/microcode" + +KERNEL=="umad*", NAME="infiniband/%k" +KERNEL=="issm*", NAME="infiniband/%k" +KERNEL=="uverbs*", NAME="infiniband/%k" +KERNEL=="ucm", NAME="infiniband/%k" + +KERNEL=="buzzer", NAME="misc/buzzer" + +# ALSA devices +KERNEL=="controlC[0-9]*", NAME="snd/%k" +KERNEL=="hwC[D0-9]*", NAME="snd/%k" +KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" +KERNEL=="midiC[D0-9]*", NAME="snd/%k" +KERNEL=="timer", NAME="snd/%k" +KERNEL=="seq", NAME="snd/%k" + +# ieee1394 devices +KERNEL=="dv1394*", NAME="dv1394/%n" +KERNEL=="video1394*", NAME="video1394/%n" + +# input devices +KERNEL=="mice", NAME="input/%k" +KERNEL=="mouse[0-9]*", NAME="input/%k" +KERNEL=="event[0-9]*", NAME="input/%k" +KERNEL=="js[0-9]*", NAME="input/%k" +KERNEL=="ts[0-9]*", NAME="input/%k" +KERNEL=="uinput", NAME="input/%k" + +# Zaptel +KERNEL=="zapctl", NAME="zap/ctl" +KERNEL=="zaptimer", NAME="zap/timer" +KERNEL=="zapchannel", NAME="zap/channel" +KERNEL=="zappseudo", NAME="zap/pseudo" +KERNEL=="zap[0-9]*", NAME="zap/%n" + +# AOE character devices +SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k" +SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k" +SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k" + +# device mapper creates its own device nodes, so ignore these +KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device" +KERNEL=="device-mapper", NAME="mapper/control" + +KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660" + +# Firmware Helper +ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware_helper" + +# Samsung UARTS +KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n" + diff --git a/recipes/udev/udev-118/udevtrigger_add_devname_filtering.patch b/recipes/udev/udev-118/udevtrigger_add_devname_filtering.patch new file mode 100644 index 0000000000..87cafcaa9d --- /dev/null +++ b/recipes/udev/udev-118/udevtrigger_add_devname_filtering.patch @@ -0,0 +1,104 @@ +--- + udevtrigger.c | 40 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) + +Index: udev-115/udevtrigger.c +=================================================================== +--- udev-115.orig/udevtrigger.c 2007-08-24 01:29:54.000000000 +0200 ++++ udev-115/udevtrigger.c 2007-09-21 18:45:28.000000000 +0200 +@@ -39,6 +39,8 @@ + LIST_HEAD(device_list); + LIST_HEAD(filter_subsystem_match_list); + LIST_HEAD(filter_subsystem_nomatch_list); ++LIST_HEAD(filter_kernel_match_list); ++LIST_HEAD(filter_kernel_nomatch_list); + LIST_HEAD(filter_attr_match_list); + LIST_HEAD(filter_attr_nomatch_list); + +@@ -218,6 +220,26 @@ + return 0; + } + ++static int kernel_filtered(const char *kernel) ++{ ++ struct name_entry *loop_name; ++ ++ /* skip devices matching the prohibited kernel device names */ ++ list_for_each_entry(loop_name, &filter_kernel_nomatch_list, node) ++ if (fnmatch(loop_name->name, kernel, 0) == 0) ++ return 1; ++ ++ /* skip devices not matching the listed kernel device names */ ++ if (!list_empty(&filter_kernel_match_list)) { ++ list_for_each_entry(loop_name, &filter_kernel_match_list, node) ++ if (fnmatch(loop_name->name, kernel, 0) == 0) ++ return 0; ++ return 1; ++ } ++ ++ return 0; ++} ++ + static int attr_filtered(const char *path) + { + struct name_entry *loop_name; +@@ -296,6 +318,9 @@ + if (dent2->d_name[0] == '.') + continue; + ++ if (kernel_filtered(dent2->d_name)) ++ continue; ++ + strlcpy(dirname2, dirname, sizeof(dirname2)); + strlcat(dirname2, "/", sizeof(dirname2)); + strlcat(dirname2, dent2->d_name, sizeof(dirname2)); +@@ -402,6 +427,9 @@ + if (!strcmp(dent2->d_name, "device")) + continue; + ++ if (kernel_filtered(dent2->d_name)) ++ continue; ++ + strlcpy(dirname2, dirname, sizeof(dirname2)); + strlcat(dirname2, "/", sizeof(dirname2)); + strlcat(dirname2, dent2->d_name, sizeof(dirname2)); +@@ -458,6 +486,8 @@ + { "subsystem-nomatch", 1, NULL, 'S' }, + { "attr-match", 1, NULL, 'a' }, + { "attr-nomatch", 1, NULL, 'A' }, ++ { "kernel-match", 1, NULL, 'k' }, ++ { "kernel-nomatch", 1, NULL, 'K' }, + {} + }; + +@@ -496,6 +526,12 @@ + case 'A': + name_list_add(&filter_attr_nomatch_list, optarg, 0); + break; ++ case 'k': ++ name_list_add(&filter_kernel_match_list, optarg, 0); ++ break; ++ case 'K': ++ name_list_add(&filter_kernel_nomatch_list, optarg, 0); ++ break; + case 'h': + printf("Usage: udevtrigger OPTIONS\n" + " --verbose print the list of devices while running\n" +@@ -504,6 +540,8 @@ + " marked as failed during a previous run\n" + " --subsystem-match=<subsystem> trigger devices from a matching subystem\n" + " --subsystem-nomatch=<subsystem> exclude devices from a matching subystem\n" ++ " --kernel-match=<subsystem> trigger devices from a matching kernel device name\n" ++ " --kernel-nomatch=<subsystem> exclude devices from a matching kernel device name\n" + " --attr-match=<file[=<value>]> trigger devices with a matching sysfs\n" + " attribute\n" + " --attr-nomatch=<file[=<value>]> exclude devices with a matching sysfs\n" +@@ -549,6 +587,8 @@ + exit: + name_list_cleanup(&filter_subsystem_match_list); + name_list_cleanup(&filter_subsystem_nomatch_list); ++ name_list_cleanup(&filter_kernel_match_list); ++ name_list_cleanup(&filter_kernel_nomatch_list); + name_list_cleanup(&filter_attr_match_list); + name_list_cleanup(&filter_attr_nomatch_list); + diff --git a/recipes/udev/udev-118/vol_id_ld.patch b/recipes/udev/udev-118/vol_id_ld.patch new file mode 100644 index 0000000000..11126eef8d --- /dev/null +++ b/recipes/udev/udev-118/vol_id_ld.patch @@ -0,0 +1,17 @@ +--- + extras/volume_id/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: udev-115/extras/volume_id/Makefile +=================================================================== +--- udev-115.orig/extras/volume_id/Makefile 2007-09-20 18:17:59.000000000 +0200 ++++ udev-115/extras/volume_id/Makefile 2007-09-20 18:18:08.000000000 +0200 +@@ -44,7 +44,7 @@ + ifeq ($(strip $(VOLUME_ID_STATIC)),true) + $(Q) $(LD) $(LDFLAGS) -o $@ $@.o $(LIBUDEV) lib/libvolume_id.a $(LIB_OBJS) + else +- $(Q) $(LD) $(LDFLAGS) -o $@ $@.o $(LIBUDEV) -Llib -lvolume_id $(LIB_OBJS) ++ $(Q) $(LD) -Llib $(LDFLAGS) -o $@ $@.o $(LIBUDEV) -lvolume_id $(LIB_OBJS) + endif + + # man pages |