diff options
author | Koen Kooi <koen@openembedded.org> | 2010-02-06 09:31:00 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-02-14 11:28:39 +0100 |
commit | 6c072776e4e7ed8aa2b98b4e3406650397dff427 (patch) | |
tree | 40aae14ecd5166befe6ff73bbe0dfed867d3179d /recipes/udev | |
parent | ef952aaa9b04e815c353c041f60c95ab6b9ddf29 (diff) |
attr: add 2.4.44
acl: add 2.2.49
udev: add 151
Diffstat (limited to 'recipes/udev')
-rw-r--r-- | recipes/udev/acl_2.2.49.bb | 41 | ||||
-rw-r--r-- | recipes/udev/attr_2.4.44.bb | 37 | ||||
-rw-r--r-- | recipes/udev/udev-151/akita/default | 4 | ||||
-rw-r--r-- | recipes/udev/udev-151/bug/10-mx31.rules | 49 | ||||
-rw-r--r-- | recipes/udev/udev-151/bug/30-BUG.rules | 26 | ||||
-rw-r--r-- | recipes/udev/udev-151/bug/bmi_eventpipe.sh | 8 | ||||
-rw-r--r-- | recipes/udev/udev-151/c7x0/default | 4 | ||||
-rw-r--r-- | recipes/udev/udev-151/cache | 18 | ||||
-rw-r--r-- | recipes/udev/udev-151/default | 4 | ||||
-rw-r--r-- | recipes/udev/udev-151/init | 73 | ||||
-rw-r--r-- | recipes/udev/udev-151/local.rules | 35 | ||||
-rw-r--r-- | recipes/udev/udev-151/omap3-pandora/local.rules | 40 | ||||
-rw-r--r-- | recipes/udev/udev-151/permissions.rules | 119 | ||||
-rw-r--r-- | recipes/udev/udev-151/run.rules | 14 | ||||
-rw-r--r-- | recipes/udev/udev-151/spitz/default | 4 | ||||
-rw-r--r-- | recipes/udev/udev-151/tosa/default | 4 | ||||
-rw-r--r-- | recipes/udev/udev-151/udev.rules | 116 | ||||
-rw-r--r-- | recipes/udev/udev_151.bb | 121 |
18 files changed, 717 insertions, 0 deletions
diff --git a/recipes/udev/acl_2.2.49.bb b/recipes/udev/acl_2.2.49.bb new file mode 100644 index 0000000000..b2b1272530 --- /dev/null +++ b/recipes/udev/acl_2.2.49.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "Commands for Manipulating POSIX Access Control Lists" +LICENSE = "GPLv2" + +PR = "r1" + +DEPENDS = "attr" + +SRC_URI = "http://mirror.its.uidaho.edu/pub/savannah/acl/acl-${PV}.src.tar.gz" + +inherit autotools lib_package + +EXTRA_OECONF = " --enable-gettext=yes ac_cv_path_XGETTEXT=${STAGING_BINDIR_NATIVE}/xgettext" + +do_configure_append() { + # gettext hack + echo "#define _(str) str" >> ${S}/include/config.h +} + +do_install() { + export PKG_BIN_DIR=${D}${bindir} + export PKG_SBIN_DIR=${D}${sbindir} + export PKG_LIB_DIR=${D}${libdir} + export PKG_DEVLIB_DIR=${D}${libexecdir} + export PKG_INC_DIR=${D}${includedir} + export PKG_MAN_DIR=${D}${mandir} + export PKG_DOC_DIR=${D}${datadir}/doc/acl + export PKG_LOCALE_DIR=${D}${datadir}/locale + + oe_runmake -e install install-dev install-lib + + sed -i -e s:installed=yes:installed=no: -e s:${STAGING_LIBDIR}:${libdir}:g ${D}${libdir}/libacl.la + + # Move .a and .la into libdir and remove symlinks pointing to ${S} + for file in ${D}${libexecdir}/*a ; do + rm ${D}${libdir}/$(basename $file) + mv $file ${D}${libdir} + done + rm -rf ${D}${libexecdir} +} + + diff --git a/recipes/udev/attr_2.4.44.bb b/recipes/udev/attr_2.4.44.bb new file mode 100644 index 0000000000..7cb92179e7 --- /dev/null +++ b/recipes/udev/attr_2.4.44.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Commands for Manipulating Filesystem Extended Attributes" +LICENSE = "GPLv2" + +PR = "r1" + +SRC_URI = "http://mirror.its.uidaho.edu/pub/savannah/attr/attr-${PV}.src.tar.gz" + +inherit gettext autotools lib_package + +EXTRA_OECONF = " --enable-gettext=yes ac_cv_path_XGETTEXT=${STAGING_BINDIR_NATIVE}/xgettext" + +do_configure_append() { + # gettext hack + echo "#define _(str) str" >> ${S}/include/config.h +} + +do_install() { + export PKG_BIN_DIR=${D}${bindir} + export PKG_SBIN_DIR=${D}${sbindir} + export PKG_LIB_DIR=${D}${libdir} + export PKG_DEVLIB_DIR=${D}${libexecdir} + export PKG_INC_DIR=${D}${includedir}/attr + export PKG_MAN_DIR=${D}${mandir} + export PKG_DOC_DIR=${D}${datadir}/doc/attr + export PKG_LOCALE_DIR=${D}${datadir}/locale + + oe_runmake -e install install-dev install-lib + + sed -i -e s:installed=yes:installed=no: -e s:${STAGING_LIBDIR}:${libdir}:g ${D}${libdir}/libattr.la + + # Move .a and .la into libdir and remove symlinks pointing to ${S} + for file in ${D}${libexecdir}/*a ; do + rm ${D}${libdir}/$(basename $file) + mv $file ${D}${libdir} + done + rm ${D}${libexecdir} -rf +} diff --git a/recipes/udev/udev-151/akita/default b/recipes/udev/udev-151/akita/default new file mode 100644 index 0000000000..d0050b873c --- /dev/null +++ b/recipes/udev/udev-151/akita/default @@ -0,0 +1,4 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +#DEVCACHE="/etc/dev.tar" diff --git a/recipes/udev/udev-151/bug/10-mx31.rules b/recipes/udev/udev-151/bug/10-mx31.rules new file mode 100644 index 0000000000..de427fc8b2 --- /dev/null +++ b/recipes/udev/udev-151/bug/10-mx31.rules @@ -0,0 +1,49 @@ +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" + diff --git a/recipes/udev/udev-151/bug/30-BUG.rules b/recipes/udev/udev-151/bug/30-BUG.rules new file mode 100644 index 0000000000..06faa6bb91 --- /dev/null +++ b/recipes/udev/udev-151/bug/30-BUG.rules @@ -0,0 +1,26 @@ +## +## 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" diff --git a/recipes/udev/udev-151/bug/bmi_eventpipe.sh b/recipes/udev/udev-151/bug/bmi_eventpipe.sh new file mode 100644 index 0000000000..acbae56118 --- /dev/null +++ b/recipes/udev/udev-151/bug/bmi_eventpipe.sh @@ -0,0 +1,8 @@ +#!/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 diff --git a/recipes/udev/udev-151/c7x0/default b/recipes/udev/udev-151/c7x0/default new file mode 100644 index 0000000000..d0050b873c --- /dev/null +++ b/recipes/udev/udev-151/c7x0/default @@ -0,0 +1,4 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +#DEVCACHE="/etc/dev.tar" diff --git a/recipes/udev/udev-151/cache b/recipes/udev/udev-151/cache new file mode 100644 index 0000000000..4db1466817 --- /dev/null +++ b/recipes/udev/udev-151/cache @@ -0,0 +1,18 @@ +#!/bin/sh -e + +export TZ=/etc/localtime + +[ -f /etc/default/udev ] && . /etc/default/udev + +echo "Caching udev devnodes" + + if [ "$DEVCACHE" != "" ]; then + echo -n "Populating dev cache" + (cd /; tar cf $DEVCACHE dev) + mv /tmp/uname /etc/udev/saved.uname + mv /tmp/cmdline /etc/udev/saved.cmdline + mv /tmp/atags /etc/udev/saved.atags + echo + fi + +exit 0 diff --git a/recipes/udev/udev-151/default b/recipes/udev/udev-151/default new file mode 100644 index 0000000000..5c4937a9a0 --- /dev/null +++ b/recipes/udev/udev-151/default @@ -0,0 +1,4 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +DEVCACHE="/etc/dev.tar" diff --git a/recipes/udev/udev-151/init b/recipes/udev/udev-151/init new file mode 100644 index 0000000000..66705e6767 --- /dev/null +++ b/recipes/udev/udev-151/init @@ -0,0 +1,73 @@ +#!/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\" && \$4 == \"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 + +# 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 --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=3; /sbin/udevadm control --env STARTUP=)& + if [ "$DEVCACHE" != "" ]; then + rm -f /tmp/uname + rm -f /tmp/cmdline + rm -f /tmp/atags + fi + else + /sbin/udevadm trigger + /sbin/udevadm settle + fi + +exit 0 diff --git a/recipes/udev/udev-151/local.rules b/recipes/udev/udev-151/local.rules new file mode 100644 index 0000000000..4e80a71d80 --- /dev/null +++ b/recipes/udev/udev-151/local.rules @@ -0,0 +1,35 @@ +# 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" diff --git a/recipes/udev/udev-151/omap3-pandora/local.rules b/recipes/udev/udev-151/omap3-pandora/local.rules new file mode 100644 index 0000000000..e433cf9593 --- /dev/null +++ b/recipes/udev/udev-151/omap3-pandora/local.rules @@ -0,0 +1,40 @@ +# 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"
\ No newline at end of file diff --git a/recipes/udev/udev-151/permissions.rules b/recipes/udev/udev-151/permissions.rules new file mode 100644 index 0000000000..940d163047 --- /dev/null +++ b/recipes/udev/udev-151/permissions.rules @@ -0,0 +1,119 @@ +ACTION!="add", GOTO="permissions_end" + +# workarounds needed to synchronize with sysfs +# only needed for kernels < v2.6.18-rc1 +ENV{PHYSDEVPATH}!="?*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus" +SUBSYSTEM=="scsi", KERNEL=="[0-9]*:[0-9]*", 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{DRIVER}=="?*", WAIT_FOR_SYSFS="device/driver" + +# 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" + diff --git a/recipes/udev/udev-151/run.rules b/recipes/udev/udev-151/run.rules new file mode 100644 index 0000000000..75d71375bb --- /dev/null +++ b/recipes/udev/udev-151/run.rules @@ -0,0 +1,14 @@ +# debugging monitor +RUN+="socket:/org/kernel/udev/monitor" + +# run a command on remove events +ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" + +# ignore the events generated by virtual consoles +KERNEL=="ptmx", OPTIONS+="last_rule" +KERNEL=="console", OPTIONS+="last_rule" +KERNEL=="tty" , OPTIONS+="last_rule" +KERNEL=="tty[0-9]*", OPTIONS+="last_rule" +KERNEL=="pty*", OPTIONS+="last_rule" +SUBSYSTEM=="vc", OPTIONS+="last_rule" + diff --git a/recipes/udev/udev-151/spitz/default b/recipes/udev/udev-151/spitz/default new file mode 100644 index 0000000000..d0050b873c --- /dev/null +++ b/recipes/udev/udev-151/spitz/default @@ -0,0 +1,4 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +#DEVCACHE="/etc/dev.tar" diff --git a/recipes/udev/udev-151/tosa/default b/recipes/udev/udev-151/tosa/default new file mode 100644 index 0000000000..d0050b873c --- /dev/null +++ b/recipes/udev/udev-151/tosa/default @@ -0,0 +1,4 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +#DEVCACHE="/etc/dev.tar" diff --git a/recipes/udev/udev-151/udev.rules b/recipes/udev/udev-151/udev.rules new file mode 100644 index 0000000000..a19d4a0bf6 --- /dev/null +++ b/recipes/udev/udev-151/udev.rules @@ -0,0 +1,116 @@ +# 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*", NAME="%k", 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]*", NAME="%k", GROUP="users", MODE="0660" + +# Firmware Helper +ACTION=="add", SUBSYSTEM=="firmware", RUN+="/lib/udev/firmware.sh" + +# Samsung UARTS +KERNEL=="s3c2410_serial[0-9]", NAME="ttySAC%n" + +# MXC UARTs +KERNEL=="ttymxc[0-4]", NAME="ttymxc%n" + diff --git a/recipes/udev/udev_151.bb b/recipes/udev/udev_151.bb new file mode 100644 index 0000000000..3b476a6cea --- /dev/null +++ b/recipes/udev/udev_151.bb @@ -0,0 +1,121 @@ +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 \ +the hotplug package and requires a kernel not older than 2.6.12." +LICENSE = "GPL" + +# Untested +DEFAULT_PREFERENCE = "-1" + +# Needed for udev-extras +DEPENDS = "gperf-native usbutils acl glib-2.0" + +# needed for init.d script +RDEPENDS_${PN} += "udev-utils" + +SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ + file://mount.blacklist \ + file://run.rules \ + " +SRC_URI += " \ + file://udev.rules \ + file://devfs-udev.rules \ + file://links.conf \ + file://permissions.rules \ + file://mount.sh \ + file://network.sh \ + file://local.rules \ + file://default \ + file://init \ + file://cache \ +" + +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 " + +PACKAGE_ARCH_bug = "bug" + +inherit update-rc.d autotools + +EXTRA_OECONF += " --with-udev-prefix= \ + --with-libdir-name=${base_libdir} \ + --disable-introspection \ + ac_cv_file__usr_share_pci_ids=yes \ + ac_cv_file__usr_share_hwdata_pci_ids=no \ + ac_cv_file__usr_share_misc_pci_ids=no \ + --sbindir=${base_sbindir} \ +" + +INITSCRIPT_NAME = "udev" +INITSCRIPT_PARAMS = "start 03 S ." + +PACKAGES =+ "libudev libgudev udev-utils" + +FILES_libudev = "${libdir}/libudev.so.*" +FILES_libgudev = "${libdir}/libgudev*.so.*" + +FILES_udev-utils = "${bindir}/udevinfo ${base_sbindir}/udevadm ${bindir}/udevtest" + +RPROVIDES_${PN} = "hotplug" +FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd" +FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug" + +# udev installs binaries under $(udev_prefix)/lib/udev, even if ${libdir} +# is ${prefix}/lib64 +FILES_${PN} += "/lib/udev/* ${libdir}/ConsoleKit" +FILES_${PN}-dbg += "/lib/udev/.debug" + +do_install () { + install -d ${D}${usrsbindir} \ + ${D}${sbindir} + oe_runmake 'DESTDIR=${D}' INSTALL=install install + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev + install -m 0755 ${WORKDIR}/cache ${D}${sysconfdir}/init.d/udev-cache + + install -d ${D}${sysconfdir}/default + install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/udev + + cp ${S}/rules/rules.d/* ${D}${sysconfdir}/udev/rules.d/ + cp ${S}/rules/packages/* ${D}${sysconfdir}/udev/rules.d/ + + install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/ + install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules + install -m 0644 ${WORKDIR}/permissions.rules ${D}${sysconfdir}/udev/rules.d/permissions.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}/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.cmdline + touch ${D}${sysconfdir}/udev/saved.atags + + install -d ${D}${sysconfdir}/udev/scripts/ + + install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh + 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 +} + +# Create the cache after checkroot has run +pkg_postinst_${PN}_append() { + update-rc.d $OPT udev-cache start 12 S . +} + |