mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-08 05:29:22 +00:00
udev: update to 168
This also removes machine specific files Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
# Default for /etc/init.d/udev
|
|
||||||
|
|
||||||
# Comment this out to disable device cache
|
|
||||||
#DEVCACHE="/etc/dev.tar"
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
KERNEL=="ttyS[0-9]", NAME="tts/%n", SYMLINK+="tts%n"
|
|
||||||
KERNEL=="ttymxc[0-9]", NAME="ttymxc/%n", SYMLINK+="ttymxc%n"
|
|
||||||
|
|
||||||
KERNEL=="mxc_mu[0-9]", NAME="mxc_mu/%n", SYMLINK+="mxc_mu%n"
|
|
||||||
KERNEL=="fb*", NAME="fb/%n", SYMLINK+="fb%n"
|
|
||||||
KERNEL=="i2c*", NAME="i2c/%n"
|
|
||||||
KERNEL=="mxc_ipc*", NAME="mxc_ipc/%n"
|
|
||||||
KERNEL=="video*", NAME="v4l/video%n"
|
|
||||||
|
|
||||||
KERNEL=="rtc", NAME="misc/rtc"
|
|
||||||
KERNEL=="watchdog", NAME="misc/watchdog"
|
|
||||||
|
|
||||||
KERNEL=="mc13783_adc", NAME="mc13783_adc", SYMLINK+="ts"
|
|
||||||
KERNEL=="pmic_adc", NAME="pmic_adc", SYMLINK+="ts"
|
|
||||||
|
|
||||||
# The long class name gets cut off to be mc13783_connectiv in
|
|
||||||
# /sys/class/mc13783_connectivity/mc13783_connectivit
|
|
||||||
KERNEL=="mc13783_connectiv*", NAME="mc13783_connectivity"
|
|
||||||
|
|
||||||
KERNEL=="mxc_ssi[0-9]*", NAME="mxc_ssi/%n", SYMLINK+="mxc_ssi%n"
|
|
||||||
KERNEL=="spi[0-9]*", NAME="spi/%n", SYMLINK+="spi%n"
|
|
||||||
|
|
||||||
KERNEL=="mtdblock*", NAME="mtdblock/%n" SYMLINK+="mtdblock%n"
|
|
||||||
KERNEL=="mtd[0-9]", NAME="mtd/%n"
|
|
||||||
|
|
||||||
# A more elegant way of doing this must exist...
|
|
||||||
KERNEL=="mtd0ro", NAME="mtd/0ro"
|
|
||||||
KERNEL=="mtd1ro", NAME="mtd/1ro"
|
|
||||||
KERNEL=="mtd2ro", NAME="mtd/2ro"
|
|
||||||
KERNEL=="mtd3ro", NAME="mtd/3ro"
|
|
||||||
KERNEL=="mtd4ro", NAME="mtd/4ro"
|
|
||||||
KERNEL=="mtd5ro", NAME="mtd/5ro"
|
|
||||||
KERNEL=="mtd6ro", NAME="mtd/6ro"
|
|
||||||
KERNEL=="mtd7ro", NAME="mtd/7ro"
|
|
||||||
KERNEL=="mtd8ro", NAME="mtd/8ro"
|
|
||||||
KERNEL=="mtd9ro", NAME="mtd/9ro"
|
|
||||||
|
|
||||||
# Note that we want /dev/dsp linked to /dev/sound/dsp1...
|
|
||||||
KERNEL=="dsp", NAME="sound/dsp"
|
|
||||||
KERNEL=="dspW", NAME="sound/dspW"
|
|
||||||
KERNEL=="dsp1", NAME="sound/dsp1", SYMLINK+="dsp"
|
|
||||||
KERNEL=="mixer", NAME="sound/mixer", SYMLINK+="mixer"
|
|
||||||
KERNEL=="sequencer", NAME="sound/sequencer"
|
|
||||||
KERNEL=="sequencer2", NAME="sound/sequencer2"
|
|
||||||
|
|
||||||
KERNEL=="ram[0-9]*", NAME="ram/%n", SYMLINK+="ram%n"
|
|
||||||
|
|
||||||
KERNEL=="dvfs_dptc", NAME="dvfs_dptc", SYMLINK+="dptc dvfs"
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
##
|
|
||||||
## BUG/BMI specific
|
|
||||||
##
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bugnav", SYMLINK+="input/bugnav"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_motion", SYMLINK+="input/bmi_motion"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bug_cam", SYMLINK+="input/bmi_cam"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m1", SYMLINK+="input/bmi_audio_m1"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m2", SYMLINK+="input/bmi_audio_m2"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m3", SYMLINK+="input/bmi_audio_m3"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_audio_status_m4", SYMLINK+="input/bmi_audio_m4"
|
|
||||||
DEVPATH=="/devices/platform/bugfb.0", SYMLINK+="bugfb"
|
|
||||||
KERNEL=="rtc0", SYMLINK+="rtc"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts0", SYMLINK+="input/bmi_lcd_ts0"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts1", SYMLINK+="input/bmi_lcd_ts1"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts2", SYMLINK+="input/bmi_lcd_ts2"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts3", SYMLINK+="input/bmi_lcd_ts3"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts4", SYMLINK+="input/bmi_lcd_ts4"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts5", SYMLINK+="input/bmi_lcd_ts5"
|
|
||||||
KERNEL=="event*", ATTRS{name}=="bmi_lcd_ts6", SYMLINK+="input/bmi_lcd_ts6"
|
|
||||||
ACTION=="add", DEVPATH=="/devices/conn*", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
|
||||||
ACTION=="remove", DEVPATH=="/devices/conn*", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
|
||||||
#
|
|
||||||
# For USB PBPSD, which we've arbitrarily decided will be module F001
|
|
||||||
#
|
|
||||||
ACTION=="remove", SUBSYSTEM=="usb", DRIVERS=="psd_driver", ENV{BMIBUS_PRODUCT}="F001", ENV{BMIBUS_SLOT}="%n", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
|
||||||
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="psd_driver", ENV{BMIBUS_PRODUCT}="F001", ENV{BMIBUS_SLOT}="%n", RUN+="/bin/sh /etc/udev/scripts/bmi_eventpipe.sh"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# This script passes BMI state variables to the running JVM.
|
|
||||||
#
|
|
||||||
if [ ${BMIBUS_PRODUCT} != "" ] && [ ${BMIBUS_SLOT} != "" ] && [ ${ACTION} != "" ];
|
|
||||||
then
|
|
||||||
echo $BMIBUS_PRODUCT 0 $BMIBUS_SLOT $ACTION > /tmp/eventpipe
|
|
||||||
fi
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Default for /etc/init.d/udev
|
|
||||||
|
|
||||||
# Comment this out to disable device cache
|
|
||||||
#DEVCACHE="/etc/dev.tar"
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
#!/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
|
|
||||||
|
|
||||||
export TZ=/etc/localtime
|
|
||||||
|
|
||||||
[ -d /sys/class ] || exit 1
|
|
||||||
[ -r /proc/mounts ] || exit 1
|
|
||||||
[ -x /sbin/udevd ] || exit 1
|
|
||||||
[ -f /etc/default/udev ] && . /etc/default/udev
|
|
||||||
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
|
|
||||||
|
|
||||||
kill_udevd() {
|
|
||||||
if [ -x /sbin/pidof ]; then
|
|
||||||
pid=`/sbin/pidof -x udevd`
|
|
||||||
[ -n "$pid" ] && kill $pid
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
export ACTION=add
|
|
||||||
# propagate /dev from /sys
|
|
||||||
echo "Starting udev"
|
|
||||||
|
|
||||||
# mount the tmpfs on /dev, if not already done
|
|
||||||
LANG=C awk "\$2 == \"/dev\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
|
|
||||||
mount -n -o mode=0755 -t tmpfs none "/dev"
|
|
||||||
mkdir -m 0755 /dev/pts
|
|
||||||
mkdir -m 1777 /dev/shm
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$DEVCACHE" != "" ]; then
|
|
||||||
# Invalidate udev cache if the kernel or its bootargs/cmdline have changed
|
|
||||||
[ -x /bin/uname ] && /bin/uname -mrspv > /tmp/uname || touch /tmp/uname
|
|
||||||
[ -r /proc/cmdline ] && cat /proc/cmdline > /tmp/cmdline || touch /tmp/cmdline
|
|
||||||
[ -r /proc/atags ] && cat /proc/atags > /tmp/atags || touch /tmp/atags
|
|
||||||
if [ -e $DEVCACHE ] && \
|
|
||||||
cmp -s /tmp/uname /etc/udev/saved.uname && \
|
|
||||||
cmp -s /tmp/cmdline /etc/udev/saved.cmdline && \
|
|
||||||
cmp -s /tmp/atags /etc/udev/saved.atags; then
|
|
||||||
(cd /; tar xf $DEVCACHE > /dev/null 2>&1)
|
|
||||||
not_first_boot=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e "/lib/modules/$(uname -r)"/modules.dep ] ; then
|
|
||||||
mkdir -p /lib/modules/$(uname -r)
|
|
||||||
depmod -ae
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make_extra_nodes
|
|
||||||
kill_udevd > "/dev/null" 2>&1
|
|
||||||
|
|
||||||
# trigger the sorted events
|
|
||||||
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
|
||||||
/sbin/udevd -d
|
|
||||||
|
|
||||||
/sbin/udevadm control --env STARTUP=1
|
|
||||||
if [ "$not_first_boot" != "" ];then
|
|
||||||
/sbin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
|
|
||||||
(/sbin/udevadm settle --timeout=8; /sbin/udevadm control --env STARTUP=)&
|
|
||||||
else
|
|
||||||
/sbin/udevadm trigger
|
|
||||||
/sbin/udevadm settle
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
# 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"
|
|
||||||
|
|
||||||
#The first framebuffer is symlinked to /dev/fb
|
|
||||||
KERNEL=="fb0", SYMLINK+="fb"
|
|
||||||
|
|
||||||
# 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]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
|
|
||||||
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# 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"
|
|
||||||
|
|
||||||
#The first framebuffer is symlinked to /dev/fb
|
|
||||||
KERNEL=="fb0", SYMLINK+="fb"
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
SUBSYSTEM=="input", KERNEL=="event[0-9]*", SYSFS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
|
|
||||||
|
|
||||||
# Local UDEV rule changes for the Pandora system.
|
|
||||||
|
|
||||||
# Let all users access the event devices using EVDEV (the OpenPandora is not multiuser after all).
|
|
||||||
KERNEL=="event[0-9]",MODE="0666"
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
ACTION!="add", GOTO="permissions_end"
|
|
||||||
|
|
||||||
# devices needed to load the drivers providing them
|
|
||||||
KERNEL=="tun", OPTIONS+="ignore_remove"
|
|
||||||
KERNEL=="ppp", OPTIONS+="ignore_remove"
|
|
||||||
KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove"
|
|
||||||
|
|
||||||
# default permissions for block devices
|
|
||||||
SUBSYSTEM=="block", GROUP="disk"
|
|
||||||
# the aacraid driver is broken and reports that disks removable (see #404927)
|
|
||||||
SUBSYSTEM=="block", ATTRS{removable}=="1", \
|
|
||||||
DRIVERS!="aacraid", GROUP="floppy"
|
|
||||||
# all block devices on these buses are "removable"
|
|
||||||
SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
|
|
||||||
|
|
||||||
# IDE devices
|
|
||||||
KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
|
|
||||||
IMPORT{program}="cdrom_id --export $tempnode"
|
|
||||||
ENV{ID_CDROM}=="?*", GROUP="cdrom"
|
|
||||||
KERNEL=="ht[0-9]*", GROUP="tape"
|
|
||||||
KERNEL=="nht[0-9]*", GROUP="tape"
|
|
||||||
|
|
||||||
# SCSI devices
|
|
||||||
KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
|
|
||||||
SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
|
|
||||||
SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom"
|
|
||||||
SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
|
|
||||||
SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
|
|
||||||
|
|
||||||
# USB devices
|
|
||||||
KERNEL=="legousbtower*", MODE="0666"
|
|
||||||
KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
|
|
||||||
|
|
||||||
# usbfs-like devices
|
|
||||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
|
|
||||||
MODE="0664"
|
|
||||||
|
|
||||||
# iRiver music players
|
|
||||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \
|
|
||||||
ATTRS{idVendor}=="4102", ATTRS{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|rtc[0-9]*", GROUP="audio"
|
|
||||||
KERNEL=="kqemu", MODE="0666"
|
|
||||||
KERNEL=="tun", MODE="0666",
|
|
||||||
|
|
||||||
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=="irlpt*", 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]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
|
|
||||||
MODE="0664", GROUP="video"
|
|
||||||
KERNEL=="js[0-9]*", MODE="0664"
|
|
||||||
KERNEL=="lirc[0-9]*", GROUP="video"
|
|
||||||
|
|
||||||
# AOE character devices
|
|
||||||
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
|
|
||||||
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
|
|
||||||
|
|
||||||
LABEL="permissions_end"
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Default for /etc/init.d/udev
|
|
||||||
|
|
||||||
# Comment this out to disable device cache
|
|
||||||
#DEVCACHE="/etc/dev.tar"
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Default for /etc/init.d/udev
|
|
||||||
|
|
||||||
# Comment this out to disable device cache
|
|
||||||
#DEVCACHE="/etc/dev.tar"
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
# 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
|
|
||||||
#
|
|
||||||
|
|
||||||
# workaround for devices which do not report media changes
|
|
||||||
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
|
|
||||||
ENV{ID_MODEL}=="IOMEGA_ZIP*", OPTIONS+="all_partitions"
|
|
||||||
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
|
|
||||||
OPTIONS+="all_partitions"
|
|
||||||
|
|
||||||
# SCSI devices
|
|
||||||
SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
|
|
||||||
|
|
||||||
# USB devices
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
|
|
||||||
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
|
|
||||||
ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
|
|
||||||
SYMLINK+="pilot"
|
|
||||||
|
|
||||||
# usbfs-like devices
|
|
||||||
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
|
|
||||||
NAME="%c"
|
|
||||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
|
|
||||||
|
|
||||||
# serial devices
|
|
||||||
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
|
|
||||||
KERNEL=="capi[0-9]*", NAME="capi/%n"
|
|
||||||
|
|
||||||
# video devices
|
|
||||||
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
|
|
||||||
NAME="%c"
|
|
||||||
KERNEL=="card[0-9]*", NAME="dri/%k"
|
|
||||||
|
|
||||||
# misc devices
|
|
||||||
KERNEL=="hw_random", NAME="hwrng"
|
|
||||||
KERNEL=="tun", NAME="net/%k"
|
|
||||||
KERNEL=="evtchn", NAME="xen/%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=="rdma_ucm", NAME="infiniband/%k"
|
|
||||||
|
|
||||||
# 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"
|
|
||||||
SUBSYSTEM=="aoe", KERNEL=="revalidate", 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]*", GROUP="users", MODE="0660"
|
|
||||||
|
|
||||||
# Samsung UARTS
|
|
||||||
KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n"
|
|
||||||
|
|
||||||
# MXC UARTs
|
|
||||||
KERNEL=="ttymxc[0-4]", NAME="ttymxc%n"
|
|
||||||
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# hostap_cs needs ignore_cis_vcc=1 set - this should handle all cards
|
|
||||||
#
|
|
||||||
ACTION=="add", DEVICE=="hostap_cs", \
|
|
||||||
SYSFS{func_id}=="0x06", RUN+="/sbin/modprobe hostap_cs ignore_cis_vcc=1"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# This is a grep pattern matched against the device name
|
|
||||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
|
||||||
|
|
||||||
/dev/mtdblock
|
|
||||||
/dev/loop
|
|
||||||
/dev/ram
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Called from udev
|
|
||||||
# Attemp to mount any added block devices
|
|
||||||
# and remove any removed devices
|
|
||||||
#
|
|
||||||
|
|
||||||
MOUNT="/bin/mount"
|
|
||||||
PMOUNT="/usr/bin/pmount"
|
|
||||||
UMOUNT="/bin/umount"
|
|
||||||
name="`basename "$DEVNAME"`"
|
|
||||||
|
|
||||||
for line in `cat /etc/udev/mount.blacklist | grep -v ^#`
|
|
||||||
do
|
|
||||||
if ( echo "$DEVNAME" | grep -q "$line" )
|
|
||||||
then
|
|
||||||
logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
automount() {
|
|
||||||
! test -d "/media/$name" && mkdir -p "/media/$name"
|
|
||||||
|
|
||||||
if ! $MOUNT -t auto -o async,relatime $DEVNAME "/media/$name"
|
|
||||||
then
|
|
||||||
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
|
||||||
rm_dir "/media/$name"
|
|
||||||
else
|
|
||||||
logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
|
|
||||||
touch "/tmp/.automount-$name"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
rm_dir() {
|
|
||||||
# We do not want to rm -r populated directories
|
|
||||||
if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
|
|
||||||
then
|
|
||||||
! test -z "$1" && rm -r "$1"
|
|
||||||
else
|
|
||||||
logger "mount.sh/automount" "Not removing non-empty directory [$1]"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
|
|
||||||
if [ -x "$PMOUNT" ]; then
|
|
||||||
$PMOUNT $DEVNAME 2> /dev/null
|
|
||||||
elif [ -x $MOUNT ]; then
|
|
||||||
$MOUNT $DEVNAME 2> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If the device isn't mounted at this point, it isn't configured in fstab
|
|
||||||
# 20061107: Small correction: The rootfs partition may be called just "rootfs" and not by
|
|
||||||
# its true device name so this would break. If the rootfs is mounted on two places
|
|
||||||
# during boot, it confuses the heck out of fsck. So Im auto-adding the root-partition
|
|
||||||
# to /etc/udev/mount.blacklist via postinst
|
|
||||||
|
|
||||||
cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
|
|
||||||
for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
|
|
||||||
do
|
|
||||||
$UMOUNT -l $mnt
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove empty directories from auto-mounter
|
|
||||||
test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
|
|
||||||
fi
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# This is a grep pattern matched against the device name
|
|
||||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
|
||||||
|
|
||||||
/dev/mtdblock
|
|
||||||
/dev/loop
|
|
||||||
/dev/ram
|
|
||||||
@@ -11,11 +11,13 @@ if [ "$DEVCACHE" != "" ]; then
|
|||||||
(cd /; tar cf $DEVCACHE dev)
|
(cd /; tar cf $DEVCACHE dev)
|
||||||
mv /tmp/uname /etc/udev/saved.uname
|
mv /tmp/uname /etc/udev/saved.uname
|
||||||
mv /tmp/cmdline /etc/udev/saved.cmdline
|
mv /tmp/cmdline /etc/udev/saved.cmdline
|
||||||
|
mv /tmp/devices /etc/udev/saved.devices
|
||||||
mv /tmp/atags /etc/udev/saved.atags
|
mv /tmp/atags /etc/udev/saved.atags
|
||||||
echo
|
echo
|
||||||
else
|
else
|
||||||
rm -f /tmp/uname
|
rm -f /tmp/uname
|
||||||
rm -f /tmp/cmdline
|
rm -f /tmp/cmdline
|
||||||
|
rm -f /tmp/devices
|
||||||
rm -f /tmp/atags
|
rm -f /tmp/atags
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1,108 +0,0 @@
|
|||||||
# The use of these rules is not recommended or supported.
|
|
||||||
# In a world where devices can come and go at any time, the devfs scheme
|
|
||||||
# of simple device enumeration does not help _anything_. Just forget about
|
|
||||||
# it. Use custom rules to name your device or look at the persistent device
|
|
||||||
# naming scheme, which is implemented for disks and add your subsystem.
|
|
||||||
|
|
||||||
# ide block devices
|
|
||||||
BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK="%c{1} %c{2}"
|
|
||||||
|
|
||||||
# md block devices
|
|
||||||
KERNEL="md[0-9]*", NAME="md/%n"
|
|
||||||
|
|
||||||
# floppy devices
|
|
||||||
KERNEL="fd[0-9]*", NAME="floppy/%n"
|
|
||||||
|
|
||||||
# tty devices
|
|
||||||
KERNEL="tty[0-9]*", NAME="vc/%n", SYMLINK="%k"
|
|
||||||
KERNEL="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k"
|
|
||||||
KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
|
|
||||||
|
|
||||||
# vc devices
|
|
||||||
KERNEL="vcs", NAME="vcc/0"
|
|
||||||
KERNEL="vcs[0-9]*", NAME="vcc/%n"
|
|
||||||
KERNEL="vcsa", NAME="vcc/a0"
|
|
||||||
KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
|
|
||||||
|
|
||||||
# v4l devices
|
|
||||||
KERNEL="video[0-9]*", NAME="v4l/video%n"
|
|
||||||
KERNEL="radio[0-9]*", NAME="v4l/radio%n"
|
|
||||||
KERNEL="vbi[0-9]*", NAME="v4l/vbi%n"
|
|
||||||
KERNEL="vtx[0-9]*", NAME="v4l/vtx%n"
|
|
||||||
|
|
||||||
# dm devices (ignore them)
|
|
||||||
KERNEL="dm-[0-9]*", NAME=""
|
|
||||||
|
|
||||||
# i2c devices
|
|
||||||
KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
|
|
||||||
|
|
||||||
# loop devices
|
|
||||||
KERNEL="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
|
|
||||||
|
|
||||||
# ramdisks
|
|
||||||
KERNEL="ram[0-9]*", NAME="rd/%n", SYMLINK="%k"
|
|
||||||
|
|
||||||
# framebuffer devices
|
|
||||||
KERNEL="fb[0-9]*", NAME="fb/%n", SYMLINK="%k"
|
|
||||||
|
|
||||||
# misc
|
|
||||||
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
|
|
||||||
KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
|
|
||||||
KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k"
|
|
||||||
KERNEL="rtc", NAME="misc/%k", SYMLINK="%k"
|
|
||||||
KERNEL="psaux", NAME="misc/%k", SYMLINK="%k"
|
|
||||||
KERNEL="uinput", NAME="misc/%k", SYMLINK="%k"
|
|
||||||
|
|
||||||
# alsa devices
|
|
||||||
KERNEL="controlC[0-9]*", NAME="snd/%k"
|
|
||||||
KERNEL="hw[CD0-9]*", NAME="snd/%k"
|
|
||||||
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
|
|
||||||
KERNEL="midi[CD0-9]*", NAME="snd/%k"
|
|
||||||
KERNEL="timer", NAME="snd/%k"
|
|
||||||
KERNEL="seq", NAME="snd/%k"
|
|
||||||
|
|
||||||
# oss devices
|
|
||||||
KERNEL="audio*", NAME="sound/%k", SYMLINK="%k"
|
|
||||||
KERNEL="dmmidi", NAME="sound/%k", SYMLINK="%k"
|
|
||||||
KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k"
|
|
||||||
KERNEL="midi*", NAME="sound/%k", SYMLINK="%k"
|
|
||||||
KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k"
|
|
||||||
KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k"
|
|
||||||
|
|
||||||
# input devices
|
|
||||||
KERNEL="mice", NAME="input/%k"
|
|
||||||
KERNEL="mouse*", NAME="input/%k"
|
|
||||||
KERNEL="event*", NAME="input/%k"
|
|
||||||
KERNEL="js*", NAME="input/%k"
|
|
||||||
KERNEL="ts*", NAME="input/%k"
|
|
||||||
|
|
||||||
# USB devices
|
|
||||||
KERNEL="hiddev*", NAME="usb/%k"
|
|
||||||
KERNEL="auer*", NAME="usb/%k"
|
|
||||||
KERNEL="legousbtower*", NAME="usb/%k"
|
|
||||||
KERNEL="dabusb*", NAME="usb/%k"
|
|
||||||
BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k"
|
|
||||||
|
|
||||||
# netlink devices
|
|
||||||
KERNEL="route", NAME="netlink/%k"
|
|
||||||
KERNEL="skip", NAME="netlink/%k"
|
|
||||||
KERNEL="usersock", NAME="netlink/%k"
|
|
||||||
KERNEL="fwmonitor", NAME="netlink/%k"
|
|
||||||
KERNEL="tcpdiag", NAME="netlink/%k"
|
|
||||||
KERNEL="nflog", NAME="netlink/%k"
|
|
||||||
KERNEL="xfrm", NAME="netlink/%k"
|
|
||||||
KERNEL="arpd", NAME="netlink/%k"
|
|
||||||
KERNEL="route6", NAME="netlink/%k"
|
|
||||||
KERNEL="ip6_fw", NAME="netlink/%k"
|
|
||||||
KERNEL="dnrtmsg", NAME="netlink/%k"
|
|
||||||
KERNEL="tap*", NAME="netlink/%k"
|
|
||||||
|
|
||||||
# CAPI devices
|
|
||||||
KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20"
|
|
||||||
KERNEL="capi*", NAME="capi/%n"
|
|
||||||
|
|
||||||
# Network devices
|
|
||||||
KERNEL="tun", NAME="net/%k"
|
|
||||||
|
|
||||||
# raw devices
|
|
||||||
KERNEL="raw[0-9]*", NAME="raw/%k"
|
|
||||||
Executable → Regular
+58
-195
@@ -1,212 +1,75 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
UDEVSTART=/sbin/udevstart
|
### 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
|
||||||
|
|
||||||
# defaults
|
export TZ=/etc/localtime
|
||||||
tmpfs_size="2M"
|
|
||||||
udev_root="/dev"
|
|
||||||
|
|
||||||
[ -x $UDEVSTART ] || exit 0
|
[ -d /sys/class ] || exit 1
|
||||||
|
[ -r /proc/mounts ] || exit 1
|
||||||
|
[ -x /sbin/udevd ] || exit 1
|
||||||
|
[ -f /etc/default/udev ] && . /etc/default/udev
|
||||||
|
[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
|
||||||
|
|
||||||
. /etc/udev/udev.conf
|
kill_udevd() {
|
||||||
|
if [ -x /sbin/pidof ]; then
|
||||||
##############################################################################
|
pid=`/sbin/pidof -x udevd`
|
||||||
|
[ -n "$pid" ] && kill $pid
|
||||||
# we need to unmount /dev/pts/ and remount it later over the tmpfs
|
fi
|
||||||
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
|
export ACTION=add
|
||||||
mount_tmpfs() {
|
# propagate /dev from /sys
|
||||||
if grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then
|
echo "Starting udev"
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# /dev/.static/dev/ is used by MAKEDEV to access the real /dev/ directory.
|
# mount the tmpfs on /dev, if not already done
|
||||||
# /etc/udev/ is recycled as a temporary mount point because it's the only
|
LANG=C awk "\$2 == \"/dev\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
|
||||||
# directory which is guaranteed to be available.
|
mount -n -o mode=0755 -t tmpfs none "/dev"
|
||||||
mount -n -o bind /dev /etc/udev
|
mkdir -m 0755 /dev/pts
|
||||||
|
mkdir -m 1777 /dev/shm
|
||||||
if ! mount -n -o size=$tmpfs_size,mode=0755 -t tmpfs tmpfs /dev; then
|
|
||||||
umount /etc/udev
|
|
||||||
echo "udev requires tmpfs support, not started."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# using ln to test if /dev works, because touch is in /usr/bin/
|
|
||||||
if ln -s test /dev/test-file; then
|
|
||||||
rm /dev/test-file
|
|
||||||
else
|
|
||||||
echo "udev requires tmpfs support, not started."
|
|
||||||
umount /etc/udev
|
|
||||||
umount /dev
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# I hate this hack. -- Md
|
if [ "$DEVCACHE" != "" ]; then
|
||||||
make_extra_nodes() {
|
# Invalidate udev cache if the kernel or its bootargs/cmdline have changed
|
||||||
[ -e /etc/udev/links.conf ] || return 0
|
[ -x /bin/uname ] && /bin/uname -mrspv > /tmp/uname || touch /tmp/uname
|
||||||
grep '^[^#]' /etc/udev/links.conf | \
|
[ -r /proc/cmdline ] && cat /proc/cmdline > /tmp/cmdline || touch /tmp/cmdline
|
||||||
while read type name arg1; do
|
[ -r /proc/devices ] && cat /proc/devices > /tmp/devices || touch /tmp/devices
|
||||||
[ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue
|
[ -r /proc/atags ] && cat /proc/atags > /tmp/atags || touch /tmp/atags
|
||||||
case "$type" in
|
if [ -e $DEVCACHE ] && \
|
||||||
L) ln -s $arg1 /dev/$name ;;
|
cmp -s /tmp/uname /etc/udev/saved.uname && \
|
||||||
D) mkdir -p /dev/$name ;;
|
cmp -s /tmp/cmdline /etc/udev/saved.cmdline && \
|
||||||
M) mknod -m 600 /dev/$name $arg1 ;;
|
cmp -s /tmp/devices /etc/udev/saved.devices && \
|
||||||
*) echo "links.conf: unparseable line ($type $name $arg1)" ;;
|
cmp -s /tmp/atags /etc/udev/saved.atags; then
|
||||||
esac
|
(cd /; tar xf $DEVCACHE > /dev/null 2>&1)
|
||||||
done
|
not_first_boot=1
|
||||||
}
|
fi
|
||||||
|
|
||||||
# this function is duplicated in preinst, postinst and d-i
|
|
||||||
supported_kernel() {
|
|
||||||
case "$(uname -r)" in
|
|
||||||
2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
|
|
||||||
2.6.1[01]|2.6.1[01][!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
|
|
||||||
}
|
|
||||||
|
|
||||||
warn_if_interactive() {
|
|
||||||
if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
TTY=$(my_tty)
|
|
||||||
if [ -z "$TTY" -o "$TTY" = "/dev/console" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n\n\nIt has been detected that the command\n\n\t$0 $*\n\n"
|
|
||||||
printf "has been run from an interactive shell.\n"
|
|
||||||
printf "It will probably not do what you expect, so this script will wait\n"
|
|
||||||
printf "60 seconds before continuing. Press ^C to stop it.\n"
|
|
||||||
printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n"
|
|
||||||
sleep 60
|
|
||||||
}
|
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
if ! supported_kernel; then
|
|
||||||
echo "udev requires a kernel >= 2.6.12, not started."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e /proc/filesystems ]; then
|
if [ ! -e "/lib/modules/$(uname -r)"/modules.dep ] ; then
|
||||||
echo "udev requires a mounted procfs, not started."
|
mkdir -p /lib/modules/$(uname -r)
|
||||||
exit 1
|
depmod -ae
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
|
# make_extra_nodes
|
||||||
echo "udev requires tmpfs support, not started."
|
kill_udevd > "/dev/null" 2>&1
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d /sys/class/ ]; then
|
# trigger the sorted events
|
||||||
echo "udev requires a mounted sysfs, not started."
|
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||||||
exit 1
|
/sbin/udevd -d
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e /proc/sys/kernel/hotplug ] && [ ! -e /sys/kernel/uevent_helper ]; then
|
/sbin/udevadm control --env STARTUP=1
|
||||||
echo "udev requires hotplug support, not started."
|
if [ "$not_first_boot" != "" ];then
|
||||||
exit 1
|
/sbin/udevadm trigger --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform
|
||||||
fi
|
(/sbin/udevadm settle --timeout=8; /sbin/udevadm control --env STARTUP=)&
|
||||||
|
else
|
||||||
##############################################################################
|
/sbin/udevadm trigger
|
||||||
|
/sbin/udevadm settle
|
||||||
# When modifying this script, do not forget that between the time that
|
fi
|
||||||
# the new /dev has been mounted and udevstart 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/.udevdb" ]; then
|
|
||||||
if mountpoint -q /dev/; then
|
|
||||||
TMPFS_MOUNTED=1
|
|
||||||
else
|
|
||||||
echo ".udevdb already exists on the old $udev_root!"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
warn_if_interactive
|
|
||||||
|
|
||||||
#echo /sbin/udevsend > /proc/sys/kernel/hotplug
|
|
||||||
if [ -e /sys/kernel/uevent_helper ] ; then
|
|
||||||
echo "" > /sys/kernel/uevent_helper
|
|
||||||
else
|
|
||||||
echo "" > /proc/sys/kernel/hotplug
|
|
||||||
fi
|
|
||||||
udevsend
|
|
||||||
if [ "$UDEV_DISABLED" = "yes" ]; then
|
|
||||||
echo "udev disabled on the kernel command line, not started."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! "$TMPFS_MOUNTED" ]; then
|
|
||||||
unmount_devpts
|
|
||||||
mount_tmpfs
|
|
||||||
[ -d /proc/1 ] || mount -n /proc
|
|
||||||
# if this directory is not present /dev will not be updated by udev
|
|
||||||
mkdir /dev/.udevdb/
|
|
||||||
echo "Creating initial device nodes..."
|
|
||||||
udevstart
|
|
||||||
fi
|
|
||||||
make_extra_nodes
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
warn_if_interactive
|
|
||||||
start-stop-daemon --stop --exec /sbin/udevd --quiet
|
|
||||||
unmount_devpts
|
|
||||||
if [ -d /dev/.static/dev/ ]; then
|
|
||||||
umount -l /dev/.static/dev/ || true
|
|
||||||
fi
|
|
||||||
echo "Unmounting /dev..."
|
|
||||||
# unmounting with -l should never fail
|
|
||||||
if ! umount -l /dev; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
restart|force-reload)
|
|
||||||
start-stop-daemon --stop --exec /sbin/udevd --quiet
|
|
||||||
log_begin_msg "Recreating device nodes..."
|
|
||||||
udevstart
|
|
||||||
make_extra_nodes
|
|
||||||
log_end_msg 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: /etc/init.d/udev {start|stop|restart|force-reload}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -20,3 +20,16 @@ SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
|
|||||||
# Handle network interface setup
|
# Handle network interface setup
|
||||||
SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
|
SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
|
||||||
SUBSYSTEM=="net", ACTION=="remove" 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"
|
||||||
|
|
||||||
|
#The first framebuffer is symlinked to /dev/fb
|
||||||
|
KERNEL=="fb0", SYMLINK+="fb"
|
||||||
|
|
||||||
|
# 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]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
|
||||||
|
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen0"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ done
|
|||||||
automount() {
|
automount() {
|
||||||
! test -d "/media/$name" && mkdir -p "/media/$name"
|
! test -d "/media/$name" && mkdir -p "/media/$name"
|
||||||
|
|
||||||
if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
|
if ! $MOUNT -t auto -o async,relatime $DEVNAME "/media/$name"
|
||||||
then
|
then
|
||||||
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
||||||
rm_dir "/media/$name"
|
rm_dir "/media/$name"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
KERNEL=="cmt_speech", MODE="0777"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# This file was automatically generated by the /lib/udev/write_net_rules
|
|
||||||
# # program, run by the persistent-net-generator.rules rules file.
|
|
||||||
# #
|
|
||||||
# # You can modify it, as long as you keep each rule on a single
|
|
||||||
# # line, and change only the value of the NAME= key.
|
|
||||||
#
|
|
||||||
# # net device ()
|
|
||||||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:df:*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
|
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
|
||||||
echo "Usage: $0 iface newmac"
|
|
||||||
echo " newmac is only saved if /etc/<iface>MAC is not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
iface="$1"
|
|
||||||
newmac="$2"
|
|
||||||
macfile=/etc/"$iface"mac
|
|
||||||
|
|
||||||
# If no MAC is found, save the one given as argument
|
|
||||||
if [ ! -e $macfile ]; then
|
|
||||||
/bin/echo "$newmac" > $macfile
|
|
||||||
# Otherwise load MAC from file
|
|
||||||
else
|
|
||||||
newmac=`/bin/cat $macfile`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Configure interface
|
|
||||||
/sbin/ifconfig "$iface" down
|
|
||||||
/sbin/ifconfig "$iface" hw ether $newmac
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# MAC address hack
|
|
||||||
# forces n900 to always use the same MAC address that is generated in the first boot
|
|
||||||
SUBSYSTEM=="net",KERNEL=="wlan0", RUN+="/etc/udev/scripts/nokia-n900-mac-hack.sh %k $attr{address}"
|
|
||||||
|
|
||||||
# Create inputdev symlinks for kbslider contextkit plugin
|
|
||||||
SUBSYSTEM=="input" ATTRS{name}=="TWL4030 Keypad" SYMLINK+="input/keypad"
|
|
||||||
SUBSYSTEM=="input" ATTRS{name}=="gpio-keys" SYMLINK+="input/gpio-keys"
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# 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"
|
|
||||||
|
|
||||||
KERNEL=="snd", SUBSYSTEM=="module", ACTION=="add", \
|
|
||||||
RUN+="/bin/ln -sf /proc/asound/oss/sndstat $root/sndstat"
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# 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"
|
|
||||||
|
|
||||||
# Local UDEV rule changes for the Pandora system.
|
|
||||||
|
|
||||||
# Let all users access the event devices using EVDEV (the OpenPandora is not multiuser after all).
|
|
||||||
KERNEL=="event[0-9]",MODE="0666"
|
|
||||||
@@ -1,79 +1,110 @@
|
|||||||
|
ACTION!="add", GOTO="permissions_end"
|
||||||
|
|
||||||
|
# devices needed to load the drivers providing them
|
||||||
|
KERNEL=="tun", OPTIONS+="ignore_remove"
|
||||||
|
KERNEL=="ppp", OPTIONS+="ignore_remove"
|
||||||
|
KERNEL=="loop[0-9]*", OPTIONS+="ignore_remove"
|
||||||
|
|
||||||
# default permissions for block devices
|
# default permissions for block devices
|
||||||
SUBSYSTEM=="block", GROUP="disk"
|
SUBSYSTEM=="block", GROUP="disk"
|
||||||
SUBSYSTEM=="block", SYSFS{removable}=="1", GROUP="floppy"
|
# the aacraid driver is broken and reports that disks removable (see #404927)
|
||||||
|
SUBSYSTEM=="block", ATTRS{removable}=="1", \
|
||||||
|
DRIVERS!="aacraid", GROUP="floppy"
|
||||||
|
# all block devices on these buses are "removable"
|
||||||
|
SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394|mmc|pcmcia", GROUP="floppy"
|
||||||
|
|
||||||
# IDE devices
|
# IDE devices
|
||||||
BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}="1", \
|
KERNEL=="hd[a-z]|pcd[0-9]*", DRIVERS=="ide-cdrom|pcd", \
|
||||||
PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom*", GROUP="cdrom"
|
IMPORT{program}="cdrom_id --export $tempnode"
|
||||||
BUS=="ide", KERNEL=="ht[0-9]*", GROUP="tape"
|
ENV{ID_CDROM}=="?*", GROUP="cdrom"
|
||||||
BUS=="ide", KERNEL=="nht[0-9]*", GROUP="tape"
|
KERNEL=="ht[0-9]*", GROUP="tape"
|
||||||
|
KERNEL=="nht[0-9]*", GROUP="tape"
|
||||||
|
|
||||||
# SCSI devices
|
# SCSI devices
|
||||||
BUS=="scsi", SYSFS{type}=="1", GROUP="tape"
|
KERNEL=="sr[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
|
||||||
BUS=="scsi", SYSFS{type}=="5", GROUP="cdrom"
|
SUBSYSTEMS=="scsi", ATTRS{type}=="1", GROUP="tape"
|
||||||
|
SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom"
|
||||||
|
SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom"
|
||||||
|
SUBSYSTEMS=="scsi", ATTRS{type}=="8", GROUP="tape"
|
||||||
|
|
||||||
# USB devices
|
# USB devices
|
||||||
BUS=="usb", KERNEL=="legousbtower*", MODE="0666"
|
KERNEL=="legousbtower*", MODE="0666"
|
||||||
BUS=="usb", KERNEL=="lp[0-9]*", GROUP="lp"
|
KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"
|
||||||
|
|
||||||
|
# usbfs-like devices
|
||||||
|
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", \
|
||||||
|
MODE="0664"
|
||||||
|
|
||||||
|
# iRiver music players
|
||||||
|
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", \
|
||||||
|
ATTRS{idVendor}=="4102", ATTRS{idProduct}=="10[01][135789]"
|
||||||
|
|
||||||
# serial devices
|
# serial devices
|
||||||
SUBSYSTEM=="tty", GROUP="dialout"
|
SUBSYSTEM=="tty", GROUP="dialout"
|
||||||
SUBSYSTEM=="capi", GROUP="dialout"
|
SUBSYSTEM=="capi", GROUP="dialout"
|
||||||
SUBSYSTEM=="slamr", GROUP="dialout"
|
SUBSYSTEM=="slamr", GROUP="dialout"
|
||||||
|
SUBSYSTEM=="zaptel", GROUP="dialout"
|
||||||
|
|
||||||
# vc devices (all members of the tty subsystem)
|
# vc devices (all members of the tty subsystem)
|
||||||
KERNEL=="ptmx", MODE="0666", GROUP="root"
|
KERNEL=="ptmx", MODE="0666", GROUP="root"
|
||||||
KERNEL=="console", MODE="0600", GROUP="root"
|
KERNEL=="console", MODE="0600", GROUP="root"
|
||||||
KERNEL=="tty", MODE="0666", GROUP="root"
|
KERNEL=="tty", MODE="0666", GROUP="root"
|
||||||
KERNEL=="tty[0-9]*", GROUP="root"
|
KERNEL=="tty[0-9]*", GROUP="root"
|
||||||
KERNEL=="pty*", MODE="0666", GROUP="tty"
|
KERNEL=="pty*", MODE="0666", GROUP="tty"
|
||||||
|
|
||||||
# video devices
|
# video devices
|
||||||
SUBSYSTEM=="video4linux", GROUP="video"
|
SUBSYSTEM=="video4linux", GROUP="video"
|
||||||
SUBSYSTEM=="drm", GROUP="video"
|
SUBSYSTEM=="drm", GROUP="video"
|
||||||
SUBSYSTEM=="dvb", GROUP="video"
|
SUBSYSTEM=="dvb", GROUP="video"
|
||||||
SUBSYSTEM=="em8300", GROUP="video"
|
SUBSYSTEM=="em8300", GROUP="video"
|
||||||
SUBSYSTEM=="graphics", GROUP="video"
|
SUBSYSTEM=="graphics", GROUP="video"
|
||||||
SUBSYSTEM=="nvidia", GROUP="video"
|
SUBSYSTEM=="nvidia", GROUP="video"
|
||||||
|
|
||||||
# misc devices
|
# misc devices
|
||||||
KERNEL=="random", MODE="0666"
|
KERNEL=="random", MODE="0666"
|
||||||
KERNEL=="urandom", MODE="0444"
|
KERNEL=="urandom", MODE="0666"
|
||||||
KERNEL=="mem", MODE="0640", GROUP="kmem"
|
KERNEL=="mem", MODE="0640", GROUP="kmem"
|
||||||
KERNEL=="kmem", MODE="0640", GROUP="kmem"
|
KERNEL=="kmem", MODE="0640", GROUP="kmem"
|
||||||
KERNEL=="port", MODE="0640", GROUP="kmem"
|
KERNEL=="port", MODE="0640", GROUP="kmem"
|
||||||
KERNEL=="full", MODE="0666"
|
KERNEL=="full", MODE="0666"
|
||||||
KERNEL=="null", MODE="0666"
|
KERNEL=="null", MODE="0666"
|
||||||
KERNEL=="zero", MODE="0666"
|
KERNEL=="zero", MODE="0666"
|
||||||
KERNEL=="inotify", MODE="0666"
|
KERNEL=="inotify", MODE="0666"
|
||||||
KERNEL=="sgi_fetchop", MODE="0666"
|
KERNEL=="sgi_fetchop", MODE="0666"
|
||||||
KERNEL=="sonypi", MODE="0666"
|
KERNEL=="sonypi", MODE="0666"
|
||||||
KERNEL=="agpgart", GROUP="video"
|
KERNEL=="agpgart", GROUP="video"
|
||||||
KERNEL=="rtc", MODE="0660", GROUP="audio"
|
KERNEL=="rtc|rtc[0-9]*", GROUP="audio"
|
||||||
|
KERNEL=="kqemu", MODE="0666"
|
||||||
|
KERNEL=="tun", MODE="0666",
|
||||||
|
|
||||||
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
|
KERNEL=="cdemu[0-9]*", GROUP="cdrom"
|
||||||
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
||||||
KERNEL=="pktcdvd", MODE="0644"
|
KERNEL=="pktcdvd", MODE="0644"
|
||||||
|
|
||||||
# printers and parallel devices
|
# printers and parallel devices
|
||||||
SUBSYSTEM=="printer", GROUP="lp"
|
SUBSYSTEM=="printer", GROUP="lp"
|
||||||
SUBSYSTEM=="ppdev", GROUP="lp"
|
SUBSYSTEM=="ppdev", GROUP="lp"
|
||||||
KERNEL=="pt[0-9]*", GROUP="tape"
|
KERNEL=="irlpt*", GROUP="lp"
|
||||||
KERNEL=="pht[0-9]*", GROUP="tape"
|
KERNEL=="pt[0-9]*", GROUP="tape"
|
||||||
|
KERNEL=="pht[0-9]*", GROUP="tape"
|
||||||
|
|
||||||
# sound devices
|
# sound devices
|
||||||
SUBSYSTEM=="sound", GROUP="audio"
|
SUBSYSTEM=="sound", GROUP="audio"
|
||||||
|
|
||||||
# ieee1394 devices
|
# ieee1394 devices
|
||||||
KERNEL=="raw1394", GROUP="disk"
|
KERNEL=="raw1394", GROUP="disk"
|
||||||
KERNEL=="dv1394*", GROUP="video"
|
KERNEL=="dv1394*", GROUP="video"
|
||||||
KERNEL=="video1394*", GROUP="video"
|
KERNEL=="video1394*", GROUP="video"
|
||||||
|
|
||||||
# input devices
|
# input devices
|
||||||
KERNEL=="event[0-9]*", MODE="0664"
|
KERNEL=="event[0-9]*", ATTRS{name}=="*dvb*|*DVB*|* IR *" \
|
||||||
KERNEL=="js[0-9]*", MODE="0664"
|
MODE="0664", GROUP="video"
|
||||||
|
KERNEL=="js[0-9]*", MODE="0664"
|
||||||
|
KERNEL=="lirc[0-9]*", GROUP="video"
|
||||||
|
|
||||||
# AOE character devices
|
# AOE character devices
|
||||||
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
|
SUBSYSTEM=="aoe", MODE="0220", GROUP="disk"
|
||||||
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
|
SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440"
|
||||||
|
|
||||||
|
LABEL="permissions_end"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
/dev/loop
|
|
||||||
/dev/ram
|
|
||||||
/dev/mtdblock
|
|
||||||
/dev/mmcblk
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
ram[0-9]$
|
|
||||||
mtdblock[0-9]$
|
|
||||||
hd[a-z]$
|
|
||||||
sd[a-z]$
|
|
||||||
loop[0-9]$
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Called from udev
|
|
||||||
# Attemp to mount any added block devices
|
|
||||||
# and remove any removed devices
|
|
||||||
#
|
|
||||||
|
|
||||||
MOUNT="/bin/mount"
|
|
||||||
PMOUNT="/usr/bin/pmount"
|
|
||||||
UMOUNT="/bin/umount"
|
|
||||||
name="`basename "$DEVNAME"`"
|
|
||||||
|
|
||||||
if ( blkid "$DEVNAME" | grep -q 'TYPE="mdraid"' )
|
|
||||||
then
|
|
||||||
logger "udev/mount.sh" "[$DEVNAME] is a member of an array, ignoring"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for line in `cat /etc/udev/mount.blacklist | grep -v ^#`
|
|
||||||
do
|
|
||||||
if ( echo "$DEVNAME" | grep -q "$line" )
|
|
||||||
then
|
|
||||||
logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
automount() {
|
|
||||||
! test -d "/media/$name" && mkdir -p "/media/$name"
|
|
||||||
|
|
||||||
if ! $MOUNT -t auto -o sync $DEVNAME "/media/$name"
|
|
||||||
then
|
|
||||||
#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME \"/media/$name\" failed!"
|
|
||||||
rm_dir "/media/$name"
|
|
||||||
else
|
|
||||||
logger "mount.sh/automount" "Auto-mount of [/media/$name] successful"
|
|
||||||
touch "/tmp/.automount-$name"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
rm_dir() {
|
|
||||||
# We do not want to rm -r populated directories
|
|
||||||
if test "`find "$1" | wc -l | tr -d " "`" -lt 2 -a -d "$1"
|
|
||||||
then
|
|
||||||
! test -z "$1" && rm -r "$1"
|
|
||||||
else
|
|
||||||
logger "mount.sh/automount" "Not removing non-empty directory [$1]"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ]; then
|
|
||||||
# SlugOS: we pivot to the rootfs based on UUID, not on fstab -- so the fstab may not
|
|
||||||
# be correct at this point in the boot. So we must not let udev mount devices based
|
|
||||||
# soley on the fstab, lest we mount overtop the real rootfs. For now we just comment
|
|
||||||
# out the logic below and let the automount logic (far below) deal with all udev mount
|
|
||||||
# operations.
|
|
||||||
#if [ -x "$PMOUNT" ]; then
|
|
||||||
# $PMOUNT $DEVNAME 2> /dev/null
|
|
||||||
#elif [ -x $MOUNT ]; then
|
|
||||||
# $MOUNT $DEVNAME 2> /dev/null
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# If the device isn't mounted at this point, it isn't configured in fstab
|
|
||||||
# 20061107: Small correction: The rootfs partition may be called just "rootfs" and not by
|
|
||||||
# its true device name so this would break. If the rootfs is mounted on two places
|
|
||||||
# during boot, it confuses the heck out of fsck. So Im auto-adding the root-partition
|
|
||||||
# to /etc/udev/mount.blacklist via postinst
|
|
||||||
|
|
||||||
cat /proc/mounts | awk '{print $1}' | grep -q "^$DEVNAME$" || automount
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$ACTION" = "remove" ] && [ -x "$UMOUNT" ] && [ -n "$DEVNAME" ]; then
|
|
||||||
for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
|
|
||||||
do
|
|
||||||
$UMOUNT -l $mnt
|
|
||||||
done
|
|
||||||
|
|
||||||
# Remove empty directories from auto-mounter
|
|
||||||
test -e "/tmp/.automount-$name" && rm_dir "/media/$name"
|
|
||||||
fi
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# This is a grep pattern matched against the device name
|
|
||||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
|
||||||
|
|
||||||
/dev/mtdblock
|
|
||||||
/dev/hda
|
|
||||||
/dev/loop
|
|
||||||
/dev/ram
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# This is a grep pattern matched against the device name
|
|
||||||
# Any matched pattern will _not_ be mounted / removed by udevd
|
|
||||||
|
|
||||||
/dev/mtdblock
|
|
||||||
/dev/loop
|
|
||||||
/dev/ram
|
|
||||||
@@ -13,33 +13,44 @@
|
|||||||
# %% the '%' char itself
|
# %% the '%' char itself
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# workaround for devices which do not report media changes
|
||||||
|
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTR{removable}=="1", \
|
||||||
|
ENV{ID_MODEL}=="IOMEGA_ZIP*", OPTIONS+="all_partitions"
|
||||||
|
SUBSYSTEMS=="ide", KERNEL=="hd[a-z]", ATTRS{media}=="floppy", \
|
||||||
|
OPTIONS+="all_partitions"
|
||||||
|
|
||||||
# SCSI devices
|
# SCSI devices
|
||||||
BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
|
SUBSYSTEMS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%n"
|
||||||
|
|
||||||
# USB devices
|
# USB devices
|
||||||
BUS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
|
SUBSYSTEMS=="usb", KERNEL=="auer[0-9]*", NAME="usb/%k"
|
||||||
BUS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
|
SUBSYSTEMS=="usb", KERNEL=="cpad[0-9]*", NAME="usb/%k"
|
||||||
BUS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
|
SUBSYSTEMS=="usb", KERNEL=="dabusb*", NAME="usb/%k"
|
||||||
BUS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
|
SUBSYSTEMS=="usb", KERNEL=="hiddev*", NAME="usb/%k"
|
||||||
BUS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
|
SUBSYSTEMS=="usb", KERNEL=="legousbtower*", NAME="usb/%k"
|
||||||
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
|
SUBSYSTEMS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
|
||||||
BUS=="usb", KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \
|
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", \
|
||||||
|
ATTRS{product}=="Palm Handheld*|Handspring Visor|palmOne Handheld", \
|
||||||
SYMLINK+="pilot"
|
SYMLINK+="pilot"
|
||||||
|
|
||||||
# usbfs-like devices
|
# usbfs-like devices
|
||||||
SUBSYSTEM=="usb_device", \
|
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", ACTION=="add", \
|
||||||
PROGRAM="/bin/sh -c 'export X=%k; export X=$${X#usbdev}; export B=$${X%%%%.*}; export D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"
|
NAME="%c"
|
||||||
|
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}"
|
||||||
|
|
||||||
# serial devices
|
# serial devices
|
||||||
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
|
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
|
||||||
KERNEL=="capi[0-9]*", NAME="capi/%n"
|
KERNEL=="capi[0-9]*", NAME="capi/%n"
|
||||||
|
|
||||||
# video devices
|
# video devices
|
||||||
|
KERNEL=="dvb*", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}", ACTION=="add", \
|
||||||
|
NAME="%c"
|
||||||
KERNEL=="card[0-9]*", NAME="dri/%k"
|
KERNEL=="card[0-9]*", NAME="dri/%k"
|
||||||
|
|
||||||
# misc devices
|
# misc devices
|
||||||
KERNEL=="hw_random", NAME="hwrng"
|
KERNEL=="hw_random", NAME="hwrng"
|
||||||
KERNEL=="tun", NAME="net/%k"
|
KERNEL=="tun", NAME="net/%k"
|
||||||
|
KERNEL=="evtchn", NAME="xen/%k"
|
||||||
|
|
||||||
KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
|
KERNEL=="cdemu[0-9]*", NAME="cdemu/%n"
|
||||||
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
|
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n"
|
||||||
@@ -52,9 +63,8 @@ KERNEL=="microcode", NAME="cpu/microcode"
|
|||||||
KERNEL=="umad*", NAME="infiniband/%k"
|
KERNEL=="umad*", NAME="infiniband/%k"
|
||||||
KERNEL=="issm*", NAME="infiniband/%k"
|
KERNEL=="issm*", NAME="infiniband/%k"
|
||||||
KERNEL=="uverbs*", NAME="infiniband/%k"
|
KERNEL=="uverbs*", NAME="infiniband/%k"
|
||||||
KERNEL=="ucm", NAME="infiniband/%k"
|
KERNEL=="ucm*", NAME="infiniband/%k"
|
||||||
|
KERNEL=="rdma_ucm", NAME="infiniband/%k"
|
||||||
KERNEL=="buzzer", NAME="misc/buzzer"
|
|
||||||
|
|
||||||
# ALSA devices
|
# ALSA devices
|
||||||
KERNEL=="controlC[0-9]*", NAME="snd/%k"
|
KERNEL=="controlC[0-9]*", NAME="snd/%k"
|
||||||
@@ -87,12 +97,17 @@ KERNEL=="zap[0-9]*", NAME="zap/%n"
|
|||||||
SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
|
SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k"
|
||||||
SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
|
SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k"
|
||||||
SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
|
SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k"
|
||||||
|
SUBSYSTEM=="aoe", KERNEL=="revalidate", NAME="etherd/%k"
|
||||||
|
|
||||||
# device mapper creates its own device nodes, so ignore these
|
# device mapper creates its own device nodes, so ignore these
|
||||||
KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
|
KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
|
||||||
KERNEL=="device-mapper", NAME="mapper/control"
|
KERNEL=="device-mapper", NAME="mapper/control"
|
||||||
|
|
||||||
KERNEL="rfcomm[0-9]*", NAME="%k", GROUP="users", MODE="0660"
|
KERNEL=="rfcomm[0-9]*", GROUP="users", MODE="0660"
|
||||||
|
|
||||||
|
# Samsung UARTS
|
||||||
|
KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n"
|
||||||
|
|
||||||
|
# MXC UARTs
|
||||||
|
KERNEL=="ttymxc[0-4]", NAME="ttymxc%n"
|
||||||
|
|
||||||
# Firmware Helper
|
|
||||||
ACTION=="add", SUBSYSTEM=="firmware", RUN+="/sbin/firmware_helper"
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
|
DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
|
||||||
/dev/, handles hotplug events and loads drivers at boot time. It replaces \
|
/dev/, handles hotplug events and loads drivers at boot time. It replaces \
|
||||||
the hotplug package and requires a kernel not older than 2.6.12."
|
the hotplug package and requires a kernel not older than 2.6.27."
|
||||||
|
|
||||||
|
# udev 169 will bump kernel requirements up to 2.6.36 for ARM:
|
||||||
|
# http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=67a77c8bf299f6264f001677becd056316ebce2f
|
||||||
|
|
||||||
LICENSE = "GPLv2+ & LGPLv2.1+"
|
LICENSE = "GPLv2+ & LGPLv2.1+"
|
||||||
LICENSE_${PN} = "GPLv2+"
|
LICENSE_${PN} = "GPLv2+"
|
||||||
@@ -10,29 +13,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
|
|||||||
file://libudev/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
|
file://libudev/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
|
||||||
file://extras/gudev/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
file://extras/gudev/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
|
||||||
|
|
||||||
PR = "r2"
|
|
||||||
|
|
||||||
# Untested
|
|
||||||
DEFAULT_PREFERENCE = "-1"
|
|
||||||
|
|
||||||
# Needed for udev-extras
|
# Needed for udev-extras
|
||||||
DEPENDS = "gperf-native usbutils acl glib-2.0"
|
DEPENDS = "gperf-native usbutils acl glib-2.0"
|
||||||
RDEPENDS_${PN} += "module-init-tools-depmod udev-utils"
|
|
||||||
|
|
||||||
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
|
SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz"
|
||||||
file://mount.blacklist \
|
SRC_URI[md5sum] = "08eb7c2564bc89defcefdaa6ec4a9fc1"
|
||||||
file://run.rules \
|
SRC_URI[sha256sum] = "1d5c548d7c85d30b3508b82ad88d853e28dddb6c526d0e67aa92ac18af93d218"
|
||||||
"
|
|
||||||
|
|
||||||
SRC_URI[md5sum] = "b8cf77be693fd09ccfcf26d3e4e23e97"
|
|
||||||
SRC_URI[sha256sum] = "5c271f43d8a28176050abbc6b4e4354203b6a7d810c72c18afefd1ee100485c3"
|
|
||||||
|
|
||||||
SRC_URI += " \
|
SRC_URI += " \
|
||||||
|
file://run.rules \
|
||||||
file://udev.rules \
|
file://udev.rules \
|
||||||
file://devfs-udev.rules \
|
|
||||||
file://links.conf \
|
file://links.conf \
|
||||||
file://permissions.rules \
|
file://permissions.rules \
|
||||||
file://mount.sh \
|
file://mount.sh \
|
||||||
|
file://mount.blacklist \
|
||||||
file://network.sh \
|
file://network.sh \
|
||||||
file://local.rules \
|
file://local.rules \
|
||||||
file://default \
|
file://default \
|
||||||
@@ -41,25 +35,6 @@ SRC_URI += " \
|
|||||||
file://udev-compat-wrapper-patch \
|
file://udev-compat-wrapper-patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI_append_h2200 = " file://50-hostap_cs.rules "
|
|
||||||
PACKAGE_ARCH_h2200 = "h2200"
|
|
||||||
|
|
||||||
#buglabs's bug device
|
|
||||||
SRC_URI_append_bug = " \
|
|
||||||
file://30-BUG.rules \
|
|
||||||
file://10-mx31.rules \
|
|
||||||
file://bmi_eventpipe.sh "
|
|
||||||
|
|
||||||
SRC_URI_append_nokia900 = " \
|
|
||||||
file://10-cmt_speech.rules \
|
|
||||||
file://70-persistent-net.rules \
|
|
||||||
file://udev-rules-nokia-n900-hacks.rules \
|
|
||||||
file://udev-rules-nokia-n900-snd.rules \
|
|
||||||
file://nokia-n900-mac-hack.sh \
|
|
||||||
"
|
|
||||||
|
|
||||||
PACKAGE_ARCH_bug = "bug"
|
|
||||||
|
|
||||||
inherit update-rc.d autotools
|
inherit update-rc.d autotools
|
||||||
|
|
||||||
EXTRA_OECONF += " --with-udev-prefix= \
|
EXTRA_OECONF += " --with-udev-prefix= \
|
||||||
@@ -75,7 +50,7 @@ EXTRA_OECONF += " --with-udev-prefix= \
|
|||||||
"
|
"
|
||||||
|
|
||||||
INITSCRIPT_NAME = "udev"
|
INITSCRIPT_NAME = "udev"
|
||||||
INITSCRIPT_PARAMS = "start 03 S ."
|
INITSCRIPT_PARAMS = "start 04 S ."
|
||||||
|
|
||||||
PACKAGES =+ "libudev libgudev udev-utils"
|
PACKAGES =+ "libudev libgudev udev-utils"
|
||||||
|
|
||||||
@@ -87,12 +62,16 @@ FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest ${base_sbindir}/udevad
|
|||||||
RPROVIDES_${PN} = "hotplug"
|
RPROVIDES_${PN} = "hotplug"
|
||||||
FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
|
FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
|
||||||
FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
|
FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
|
||||||
|
RDEPENDS_${PN} += "module-init-tools-depmod udev-utils"
|
||||||
|
|
||||||
# udev installs binaries under $(udev_prefix)/lib/udev, even if ${libdir}
|
# udev installs binaries under $(udev_prefix)/lib/udev, even if ${libdir}
|
||||||
# is ${prefix}/lib64
|
# is ${prefix}/lib64
|
||||||
FILES_${PN} += "/lib/udev* ${libdir}/ConsoleKit"
|
FILES_${PN} += "/lib/udev* ${libdir}/ConsoleKit"
|
||||||
FILES_${PN}-dbg += "/lib/udev/.debug"
|
FILES_${PN}-dbg += "/lib/udev/.debug"
|
||||||
|
|
||||||
|
# Package up systemd files
|
||||||
|
FILES_${PN} += "${base_libdir}/systemd"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
install -d ${D}${usrsbindir} \
|
install -d ${D}${usrsbindir} \
|
||||||
${D}${sbindir}
|
${D}${sbindir}
|
||||||
@@ -112,12 +91,10 @@ do_install () {
|
|||||||
install -m 0644 ${WORKDIR}/run.rules ${D}${sysconfdir}/udev/rules.d/run.rules
|
install -m 0644 ${WORKDIR}/run.rules ${D}${sysconfdir}/udev/rules.d/run.rules
|
||||||
install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules
|
install -m 0644 ${WORKDIR}/udev.rules ${D}${sysconfdir}/udev/rules.d/udev.rules
|
||||||
install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf
|
install -m 0644 ${WORKDIR}/links.conf ${D}${sysconfdir}/udev/links.conf
|
||||||
if [ "${UDEV_DEVFS_RULES}" = "1" ]; then
|
|
||||||
install -m 0644 ${WORKDIR}/devfs-udev.rules ${D}${sysconfdir}/udev/rules.d/devfs-udev.rules
|
|
||||||
fi
|
|
||||||
|
|
||||||
touch ${D}${sysconfdir}/udev/saved.uname
|
touch ${D}${sysconfdir}/udev/saved.uname
|
||||||
touch ${D}${sysconfdir}/udev/saved.cmdline
|
touch ${D}${sysconfdir}/udev/saved.cmdline
|
||||||
|
touch ${D}${sysconfdir}/udev/saved.devices
|
||||||
touch ${D}${sysconfdir}/udev/saved.atags
|
touch ${D}${sysconfdir}/udev/saved.atags
|
||||||
|
|
||||||
install -d ${D}${sysconfdir}/udev/scripts/
|
install -d ${D}${sysconfdir}/udev/scripts/
|
||||||
@@ -126,24 +103,6 @@ do_install () {
|
|||||||
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
|
install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_append_h2200() {
|
|
||||||
install -m 0644 ${WORKDIR}/50-hostap_cs.rules ${D}${sysconfdir}/udev/rules.d/50-hostap_cs.rules
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install_append_bug() {
|
|
||||||
install -m 0644 ${WORKDIR}/30-BUG.rules ${D}${sysconfdir}/udev/rules.d/30-BUG.rules
|
|
||||||
install -m 0644 ${WORKDIR}/10-mx31.rules ${D}${sysconfdir}/udev/rules.d/10-mx31.rules
|
|
||||||
install -m 0644 ${WORKDIR}/bmi_eventpipe.sh ${D}${sysconfdir}/udev/scripts/bmi_eventpipe.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install_append_nokia900() {
|
|
||||||
install -m 0644 ${WORKDIR}/10-cmt_speech.rules ${D}${sysconfdir}/udev/rules.d/10-cmt_speech.rules
|
|
||||||
install -m 0644 ${WORKDIR}/70-persistent-net.rules ${D}${sysconfdir}/udev/rules.d/70-persistent-net.rules
|
|
||||||
install -m 0644 ${WORKDIR}/udev-rules-nokia-n900-hacks.rules ${D}${sysconfdir}/udev/rules.d/udev-rules-nokia-n900-hacks.rules
|
|
||||||
install -m 0644 ${WORKDIR}/udev-rules-nokia-n900-snd.rules ${D}${sysconfdir}/udev/rules.d/udev-rules-nokia-n900-snd.rules
|
|
||||||
install -m 0755 ${WORKDIR}/nokia-n900-mac-hack.sh ${D}${sysconfdir}/udev/scripts/nokia-n900-mac-hack.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create the cache after checkroot has run
|
# Create the cache after checkroot has run
|
||||||
pkg_postinst_udev_append() {
|
pkg_postinst_udev_append() {
|
||||||
if test "x$D" != "x"; then
|
if test "x$D" != "x"; then
|
||||||
@@ -151,5 +110,5 @@ pkg_postinst_udev_append() {
|
|||||||
else
|
else
|
||||||
OPT="-s"
|
OPT="-s"
|
||||||
fi
|
fi
|
||||||
update-rc.d $OPT udev-cache start 12 S .
|
update-rc.d $OPT udev-cache start 36 S .
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user