From a22797f7c37a865420837b5c29b270f73ee4c6ce Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Date: Tue, 1 Mar 2016 02:52:47 +0000 Subject: eudev: Replaces udev with eudev for compatibility when using sysvinit on newer kernels udev has started to fail on new kernels (4.4), due to being deprecated in favor of systemd's udev implementation. To maintain a sysvinit alternative we also need to provide an alternative to udev. Eudev is a fork of systemds udev, this new eudev recipe provides upstream udev 220 funcitonality. - Removes patches that dont apply anymore - ToDo: eudev-ptest? [YOCTO #8998] Signed-off-by: Alejandro Hernandez Signed-off-by: Richard Purdie --- meta/recipes-core/udev/eudev/devfs-udev.rules | 108 ++++++++++++++++ meta/recipes-core/udev/eudev/init | 142 +++++++++++++++++++++ meta/recipes-core/udev/eudev/links.conf | 21 +++ meta/recipes-core/udev/eudev/local.rules | 19 +++ meta/recipes-core/udev/eudev/permissions.rules | 131 +++++++++++++++++++ meta/recipes-core/udev/eudev/run.rules | 14 ++ meta/recipes-core/udev/eudev/udev-cache | 75 +++++++++++ meta/recipes-core/udev/eudev/udev-cache.default | 5 + meta/recipes-core/udev/eudev/udev.rules | 116 +++++++++++++++++ meta/recipes-core/udev/eudev_3.1.5.bb | 93 ++++++++++++++ meta/recipes-core/udev/udev.inc | 112 ---------------- ...yboard_force_release.sh-shell-script-path.patch | 35 ----- ...-Add-stdint.h-as-it-was-removed-from-mtd-.patch | 29 ----- ...c-Makefile.am-Check-for-input.h-and-input.patch | 52 -------- .../recipes-core/udev/udev/add-install-ptest.patch | 86 ------------- .../udev/udev/avoid-mouse-autosuspend.patch | 25 ---- meta/recipes-core/udev/udev/devfs-udev.rules | 108 ---------------- .../udev/udev/fix_rule-syntax-regex-ptest.patch | 58 --------- meta/recipes-core/udev/udev/init | 142 --------------------- meta/recipes-core/udev/udev/links.conf | 21 --- meta/recipes-core/udev/udev/local.rules | 19 --- meta/recipes-core/udev/udev/permissions.rules | 131 ------------------- meta/recipes-core/udev/udev/run-ptest | 5 - meta/recipes-core/udev/udev/run.rules | 14 -- meta/recipes-core/udev/udev/udev-cache | 75 ----------- meta/recipes-core/udev/udev/udev-cache.default | 5 - meta/recipes-core/udev/udev/udev.rules | 116 ----------------- meta/recipes-core/udev/udev_182.bb | 9 -- 28 files changed, 724 insertions(+), 1042 deletions(-) create mode 100644 meta/recipes-core/udev/eudev/devfs-udev.rules create mode 100644 meta/recipes-core/udev/eudev/init create mode 100644 meta/recipes-core/udev/eudev/links.conf create mode 100644 meta/recipes-core/udev/eudev/local.rules create mode 100644 meta/recipes-core/udev/eudev/permissions.rules create mode 100644 meta/recipes-core/udev/eudev/run.rules create mode 100644 meta/recipes-core/udev/eudev/udev-cache create mode 100644 meta/recipes-core/udev/eudev/udev-cache.default create mode 100644 meta/recipes-core/udev/eudev/udev.rules create mode 100644 meta/recipes-core/udev/eudev_3.1.5.bb delete mode 100644 meta/recipes-core/udev/udev.inc delete mode 100644 meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch delete mode 100644 meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch delete mode 100644 meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch delete mode 100644 meta/recipes-core/udev/udev/add-install-ptest.patch delete mode 100644 meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch delete mode 100644 meta/recipes-core/udev/udev/devfs-udev.rules delete mode 100644 meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch delete mode 100644 meta/recipes-core/udev/udev/init delete mode 100644 meta/recipes-core/udev/udev/links.conf delete mode 100644 meta/recipes-core/udev/udev/local.rules delete mode 100644 meta/recipes-core/udev/udev/permissions.rules delete mode 100644 meta/recipes-core/udev/udev/run-ptest delete mode 100644 meta/recipes-core/udev/udev/run.rules delete mode 100644 meta/recipes-core/udev/udev/udev-cache delete mode 100644 meta/recipes-core/udev/udev/udev-cache.default delete mode 100644 meta/recipes-core/udev/udev/udev.rules delete mode 100644 meta/recipes-core/udev/udev_182.bb (limited to 'meta/recipes-core/udev') diff --git a/meta/recipes-core/udev/eudev/devfs-udev.rules b/meta/recipes-core/udev/eudev/devfs-udev.rules new file mode 100644 index 0000000000..0ba1ad4e7f --- /dev/null +++ b/meta/recipes-core/udev/eudev/devfs-udev.rules @@ -0,0 +1,108 @@ +# 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" diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init new file mode 100644 index 0000000000..0ab028b391 --- /dev/null +++ b/meta/recipes-core/udev/eudev/init @@ -0,0 +1,142 @@ +#!/bin/sh + +### 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 @UDEVD@ ] || exit 1 +SYSCONF_CACHED="/etc/udev/cache.data" +SYSCONF_TMP="/dev/shm/udev.cache" +DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen + +# A list of files which are used as a criteria to judge whether the udev cache could be reused. +CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" +[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" + +# List of files whose metadata (size/mtime/name) will be included in cached +# system state. +META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" + +# Command to compute system configuration. +sysconf_cmd () { + cat -- $CMP_FILE_LIST + stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' +} + +[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache +[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf +[ -f /etc/default/rcS ] && . /etc/default/rcS + +kill_udevd () { + pid=`pidof -x udevd` + [ -n "$pid" ] && kill $pid +} + +case "$1" in + start) + export ACTION=add + # propagate /dev from /sys + echo "Starting udev" + + # Check for requireed devtmpfs before trying to start udev and + # mount a no-existant fs. + if ! grep -q devtmpfs /proc/filesystems + then + echo "Missing devtmpfs, which is required for udev to run"; + echo "Halting..." + halt + fi + # mount the devtmpfs on /dev, if not already done + LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && { + mount -n -o mode=0755 -t devtmpfs none "/dev" + } + [ -e /dev/pts ] || mkdir -m 0755 /dev/pts + [ -e /dev/shm ] || mkdir -m 1777 /dev/shm + # the automount rule for udev needs /tmp directory available, as /tmp is a symlink + # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure + # /var/volatile/tmp directory to be available. + mkdir -m 1777 -p /var/volatile/tmp + + # Cache handling. + if [ "$DEVCACHE" != "" ]; then + if [ -e $DEVCACHE ]; then + sysconf_cmd > "$SYSCONF_TMP" + if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then + tar xmf $DEVCACHE -C / -m + not_first_boot=1 + [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE" + [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP" + [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN" + else + # Output detailed reason why the cached /dev is not used + cat < "/dev/null" 2>&1 + + # trigger the sorted events + [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug + @UDEVD@ -d + + udevadm control --env=STARTUP=1 + if [ "$not_first_boot" != "" ];then + if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then + PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform" + else + PLATFORM_BUS_NOMATCH="" + fi + 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 $PLATFORM_BUS_NOMATCH + (udevadm settle --timeout=3; udevadm control --env=STARTUP=)& + else + udevadm trigger --action=add + udevadm settle + fi + ;; + stop) + echo "Stopping udevd" + start-stop-daemon --stop --name udevd --quiet + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + status) + pid=`pidof -x udevd` + if [ -n "$pid" ]; then + echo "udevd (pid $pid) is running ..." + else + echo "udevd is stopped" + fi + ;; + *) + echo "Usage: $0 {start|stop|status|restart}" + exit 1 +esac +exit 0 diff --git a/meta/recipes-core/udev/eudev/links.conf b/meta/recipes-core/udev/eudev/links.conf new file mode 100644 index 0000000000..8fff922db6 --- /dev/null +++ b/meta/recipes-core/udev/eudev/links.conf @@ -0,0 +1,21 @@ +# This file does not exist. Please do not ask the debian maintainer about it. +# You may use it to do strange and wonderful things, at your risk. + +L fd /proc/self/fd +L stdin /proc/self/fd/0 +L stdout /proc/self/fd/1 +L stderr /proc/self/fd/2 +L core /proc/kcore +L sndstat /proc/asound/oss/sndstat +L MAKEDEV /sbin/MAKEDEV + +D pts +D shm + +# Hic sunt leones. +M ppp c 108 0 +D loop +M loop/0 b 7 0 +D net +M net/tun c 10 200 + diff --git a/meta/recipes-core/udev/eudev/local.rules b/meta/recipes-core/udev/eudev/local.rules new file mode 100644 index 0000000000..d502cdd6ba --- /dev/null +++ b/meta/recipes-core/udev/eudev/local.rules @@ -0,0 +1,19 @@ +# 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 +# + +# Create a symlink to any touchscreen input device +# Trigger based on input type, that the evbit (-e) has EV_SYN and EV_ABS, +# has an EV_ABS value (-a) which is used for touchscreen type devices. +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0" diff --git a/meta/recipes-core/udev/eudev/permissions.rules b/meta/recipes-core/udev/eudev/permissions.rules new file mode 100644 index 0000000000..205b733292 --- /dev/null +++ b/meta/recipes-core/udev/eudev/permissions.rules @@ -0,0 +1,131 @@ +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}=="3", ATTRS{vendor}=="HP", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" +SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" +SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" +SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" +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=="nvram", GROUP="nvram" +KERNEL=="rtc|rtc[0-9]*", GROUP="audio" +KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" +KERNEL=="fuse", GROUP="fuse" +KERNEL=="kqemu", MODE="0666" +KERNEL=="kvm", GROUP="kvm" +KERNEL=="tun", MODE="0666", + +KERNEL=="cdemu[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd", MODE="0644" + +KERNEL=="uverbs*", GROUP="rdma" +KERNEL=="ucm*", GROUP="rdma" +KERNEL=="rdma_ucm", GROUP="rdma" + +# 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/meta/recipes-core/udev/eudev/run.rules b/meta/recipes-core/udev/eudev/run.rules new file mode 100644 index 0000000000..75d71375bb --- /dev/null +++ b/meta/recipes-core/udev/eudev/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/meta/recipes-core/udev/eudev/udev-cache b/meta/recipes-core/udev/eudev/udev-cache new file mode 100644 index 0000000000..dcfff1cb45 --- /dev/null +++ b/meta/recipes-core/udev/eudev/udev-cache @@ -0,0 +1,75 @@ +#!/bin/sh -e + +### BEGIN INIT INFO +# Provides: udev-cache +# Required-Start: mountall +# Required-Stop: +# Default-Start: S +# Default-Stop: +# Short-Description: cache /dev to speedup the udev next boot +### END INIT INFO + +export TZ=/etc/localtime + +[ -r /proc/mounts ] || exit 1 +[ -x @UDEVD@ ] || exit 1 +[ -d /sys/class ] || exit 1 + +[ -f /etc/default/rcS ] && . /etc/default/rcS +DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar" +SYSCONF_CACHED="/etc/udev/cache.data" +SYSCONF_TMP="/dev/shm/udev.cache" +DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen + +# A list of files which are used as a criteria to judge whether the udev cache could be reused. +CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" +[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" + +# List of files whose metadata (size/mtime/name) will be included in cached +# system state. +META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" + +# Command to compute system configuration. +sysconf_cmd () { + cat -- $CMP_FILE_LIST + stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' +} + +[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache + +if [ "$ROOTFS_READ_ONLY" = "yes" ]; then + [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache" + exit 0 +fi + +[ "$DEVCACHE" != "" ] || exit 0 +[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... " +if ! [ -e "$DEVCACHE_REGEN" ]; then + [ "${VERBOSE}" == "no" ] || echo "not found." + exit 0 +fi +[ "${VERBOSE}" == "no" ] || echo "found." +echo "Populating dev cache" + +err_cleanup () { + echo "udev-cache: update failed!" + udevadm control --start-exec-queue + rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED" +} + +( + set -e + trap 'err_cleanup' EXIT + udevadm control --stop-exec-queue + sysconf_cmd > "$SYSCONF_TMP" + find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ + | xargs tar cf "${DEVCACHE_TMP}" + gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" + rm -f "${DEVCACHE_TMP}" + mv "$SYSCONF_TMP" "$SYSCONF_CACHED" + udevadm control --start-exec-queue + rm -f "$DEVCACHE_REGEN" + trap - EXIT +) & + +exit 0 diff --git a/meta/recipes-core/udev/eudev/udev-cache.default b/meta/recipes-core/udev/eudev/udev-cache.default new file mode 100644 index 0000000000..a3b732698d --- /dev/null +++ b/meta/recipes-core/udev/eudev/udev-cache.default @@ -0,0 +1,5 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +DEVCACHE="/etc/udev-cache.tar.gz" +PROBE_PLATFORM_BUS="yes" diff --git a/meta/recipes-core/udev/eudev/udev.rules b/meta/recipes-core/udev/eudev/udev.rules new file mode 100644 index 0000000000..a19d4a0bf6 --- /dev/null +++ b/meta/recipes-core/udev/eudev/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/meta/recipes-core/udev/eudev_3.1.5.bb b/meta/recipes-core/udev/eudev_3.1.5.bb new file mode 100644 index 0000000000..8a23e6cb23 --- /dev/null +++ b/meta/recipes-core/udev/eudev_3.1.5.bb @@ -0,0 +1,93 @@ +SUMMARY = "eudev is a fork of systemd's udev" +HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev" +SRC_URI = "https://github.com/gentoo/${PN}/archive/v${PV}.tar.gz \ + file://init \ + file://local.rules \ + file://udev-cache \ + file://udev-cache.default \ + file://run.rules \ + file://udev.rules \ + file://devfs-udev.rules \ + file://links.conf \ + file://permissions.rules \ + " + +LICENSE = "GPLv2.0+" + +inherit autotools update-rc.d + +SRC_URI[md5sum] = "e130f892d8744e292cb855db79935f68" +SRC_URI[sha256sum] = "ce9d5fa91e3a42c7eb95512ca0fa2a631e89833053066bb6cdf42046b2a88553" + +LIC_FILES_CHKSUM="file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +DEPENDS = "glib-2.0-native glib-2.0 util-linux libxslt-native gperf-native kmod" + +PROVIDES = "udev" +RPROVIDES_${PN} = "hotplug udev" + +PACKAGES =+ "udev-cache" +PACKAGES =+ "libudev" + +INITSCRIPT_PACKAGES = "eudev udev-cache" +INITSCRIPT_NAME_eudev = "udev" +INITSCRIPT_PARAMS_eudev = "start 04 S ." +INITSCRIPT_NAME_udev-cache = "udev-cache" +INITSCRIPT_PARAMS_udev-cache = "start 36 S ." + +RRECOMMENDS_${PN} += "udev-cache" + + +FILES_libudev = "${base_libdir}/libudev.so.*" + +FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm" + + +FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ + ${includedir}/libudev.h ${libdir}/libudev.so \ + ${includedir}/udev.h ${libdir}/libudev.la \ + ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc \ + " +FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" + +EXTRA_OECONF = "--with-rootlibdir=${base_libdir} \ + --sbindir=${base_sbindir} \ + --libexecdir=${nonarch_base_libdir} \ + --with-rootprefix= \ +" +do_install_append(){ + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev + install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache + sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev + sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache + + install -d ${D}${sysconfdir}/default + install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache + + touch ${D}${sysconfdir}/udev/cache.data + + install -d ${D}${sysconfdir}/udev/rules.d/ + + install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules + + # Fix for multilib systems where libs along with confs are installed incorrectly + if ! [ -d ${D}${nonarch_base_libdir}/udev ] + then + install -d ${D}${nonarch_base_libdir}/udev + mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir} + fi + + # hid2hci has moved to bluez4. removed in udev as of version 169 + rm -f ${D}${base_libdir}/udev/hid2hci + + echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf + + # Use classic network interface naming scheme + touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules +} + +python () { + if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): + raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") +} diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc deleted file mode 100644 index 93d736941d..0000000000 --- a/meta/recipes-core/udev/udev.inc +++ /dev/null @@ -1,112 +0,0 @@ -SUMMARY = "/dev/ and hotplug management daemon" -DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \ -/dev/, handles hotplug events and loads drivers at boot time." -HOMEPAGE = "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html" -LICENSE = "GPLv2.0+ & LGPLv2.1+" -LICENSE_${PN} = "GPLv2.0+" -LICENSE_libudev = "LGPLv2.1+" -LICENSE_libgudev = "LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \ - file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266" - -LDFLAGS += "-lrt" - -DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux" -RPROVIDES_${PN} = "hotplug" - -PROVIDES = "libgudev" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ - file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \ - file://avoid-mouse-autosuspend.patch \ - file://run.rules \ - file://udev.rules \ - file://devfs-udev.rules \ - file://links.conf \ - file://permissions.rules \ - file://local.rules \ - file://udev-cache \ - file://udev-cache.default \ - file://add-install-ptest.patch \ - file://fix_rule-syntax-regex-ptest.patch \ - file://run-ptest \ - file://init \ - file://0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch \ - file://0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch \ - " - -inherit autotools pkgconfig update-rc.d ptest -RDEPENDS_${PN}-ptest += "make perl python" - -libexecdir = "${base_libdir}" -EXTRA_OECONF = "--disable-introspection \ - --with-rootlibdir=${base_libdir} \ - --with-pci-ids-path=${datadir}/pci.ids \ - ac_cv_file__usr_share_pci_ids=no \ - ac_cv_file__usr_share_hwdata_pci_ids=no \ - ac_cv_file__usr_share_misc_pci_ids=yes \ - --sbindir=${base_sbindir} \ - --libexecdir=${nonarch_base_libdir} \ - --with-rootlibdir=${base_libdir} \ - --with-rootprefix= \ - --without-systemdsystemunitdir \ - " - -PACKAGES =+ "udev-cache" -PACKAGES =+ "libudev" -PACKAGES =+ "libgudev" - -INITSCRIPT_PACKAGES = "udev udev-cache" -INITSCRIPT_NAME_udev = "udev" -INITSCRIPT_PARAMS_udev = "start 04 S ." -INITSCRIPT_NAME_udev-cache = "udev-cache" -INITSCRIPT_PARAMS_udev-cache = "start 36 S ." - -FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev ${bindir}/udevadm" -RRECOMMENDS_${PN} += "udev-cache" - -# udev-utils has been removed as a package. Note that udev conflicts with udev-utils so that -# udev-utils is removed from systems on upgrade. -RCONFLICTS_${PN} += "udev-utils" -RREPLACES_${PN} += "udev-utils" - -FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \ - ${includedir}/libudev.h ${libdir}/libudev.so ${libdir}/libudev.la \ - ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc \ - ${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \ - ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc" -FILES_libudev = "${base_libdir}/libudev.so.*" -FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*" -FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" - -do_install_append () { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev - install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache - sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev - sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache - - install -d ${D}${sysconfdir}/default - install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache - - touch ${D}${sysconfdir}/udev/cache.data - - install -d ${D}${sysconfdir}/udev/rules.d/ - - install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules - - # hid2hci has moved to bluez4. removed in udev as of version 169 - rm -f ${D}${base_libdir}/udev/hid2hci - - echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf -} - -# As systemd also builds udev, skip this package if we're doing a systemd build. -python () { - if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d): - raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES") -} -do_compile_ptest() { - oe_runmake test-udev -} diff --git a/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch b/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch deleted file mode 100644 index 41deafa918..0000000000 --- a/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0f8290c943da298abd269ca60fd8375dfb219971 Mon Sep 17 00:00:00 2001 -From: Alexandru DAMIAN -Date: Thu, 12 Jul 2012 12:54:48 +0300 -Subject: [PATCH] Fixing keyboard_force_release.sh shell script path - -With the introduction of rootprefix, the keyboard-force-release.sh.in -was modified to be executed with @rootprefix@/bin/sh, which is wrong -because @rootprefix@ defaults to /usr (which is correct), but the -shell is always at /bin/sh (IEEE Std 1003.2-1992). - -Therefore the interpreter for shell scripts needs to be /bin/sh at all times. - -The upstream moved to configurable root prefix, this patch taclkes a -transition bug, and will not be applied upstream. - -Upstream-Status: Inappropriate [legacy version] - -Signed-off-by: Alexandru DAMIAN ---- - src/keymap/keyboard-force-release.sh.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in -index dd040ce..597a3a6 100755 ---- a/src/keymap/keyboard-force-release.sh.in -+++ b/src/keymap/keyboard-force-release.sh.in -@@ -1,4 +1,4 @@ --#!@rootprefix@/bin/sh -e -+#!/bin/sh -e - # read list of scancodes, convert hex to decimal and - # append to the atkbd force_release sysfs attribute - # $1 sysfs devpath for serioX --- -1.7.9.5 - diff --git a/meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch b/meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch deleted file mode 100644 index 8d2df1a390..0000000000 --- a/meta/recipes-core/udev/udev/0001-mtd_probe.h-Add-stdint.h-as-it-was-removed-from-mtd-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 2935f9b2dfb92c3ce4376a988cd01b624430905b Mon Sep 17 00:00:00 2001 -From: Saul Wold -Date: Tue, 19 Jan 2016 09:49:56 -0800 -Subject: [PATCH 1/2] mtd_probe.h: Add stdint.h as it was removed from - mtd-user.h in the kernel - - -Upstream-Status: Inappropriate [Upstream unsupported] - -Signed-off-by: Saul Wold ---- - src/mtd_probe/mtd_probe.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/mtd_probe/mtd_probe.h b/src/mtd_probe/mtd_probe.h -index 2a37ede..49c1918 100644 ---- a/src/mtd_probe/mtd_probe.h -+++ b/src/mtd_probe/mtd_probe.h -@@ -18,6 +18,7 @@ - */ - - #include -+#include - - /* Full oob structure as written on the flash */ - struct sm_oob { --- -2.5.0 - diff --git a/meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch b/meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch deleted file mode 100644 index a9dc627459..0000000000 --- a/meta/recipes-core/udev/udev/0002-configure.ac-Makefile.am-Check-for-input.h-and-input.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 63ae7ebb0c6177efed46734061fb59c458a47a26 Mon Sep 17 00:00:00 2001 -From: Saul Wold -Date: Tue, 19 Jan 2016 09:49:19 -0800 -Subject: [PATCH 2/2] configure.ac/Makefile.am: Check for input.h and - input-event-codes.h - -Add INPUT_HEADER to know which header file to use because it changed -in the 4.4 kernel code. - -Set INPUT_HEADER with default linux/input.h if it exists and if the -newer input-events-codes.h exists from 4.4 use it instead. - -Upstream-Status: Inappropriate [Upstream unsupported] - -Signed-off-by: Saul Wold ---- - Makefile.am | 2 +- - configure.ac | 4 +++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 2e32e69..04eb194 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -591,7 +591,7 @@ dist_udevkeymapforcerel_DATA = \ - src/keymap/force-release-maps/samsung-other \ - src/keymap/force-release-maps/common-volume-keys - --src/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h -+src/keymap/keys.txt: $(INCLUDE_PREFIX)/$(INPUT_HEADER) - $(AM_V_at)mkdir -p src/keymap - $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@ - -diff --git a/configure.ac b/configure.ac -index 0500313..9674620 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -154,8 +154,10 @@ AS_IF([test "x$enable_keymap" = "xyes"], [ - if test -z "$GPERF"; then - AC_MSG_ERROR([gperf is needed]) - fi -+ -+ AC_CHECK_HEADER([linux/input.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input.h')])], AC_MSG_ERROR([kernel headers not found])) -+ AC_CHECK_HEADER([linux/input-event-codes.h], [AC_SUBST([INPUT_HEADER], [$(echo 'linux/input-event-codes.h')])], [:]) - -- AC_CHECK_HEADER([linux/input.h], [:], AC_MSG_ERROR([kernel headers not found])) - AC_SUBST([INCLUDE_PREFIX], [$(echo '#include ' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')]) - ]) - AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"]) --- -2.5.0 - diff --git a/meta/recipes-core/udev/udev/add-install-ptest.patch b/meta/recipes-core/udev/udev/add-install-ptest.patch deleted file mode 100644 index bfc2e9409d..0000000000 --- a/meta/recipes-core/udev/udev/add-install-ptest.patch +++ /dev/null @@ -1,86 +0,0 @@ -Adjustements for ptest: - -- Add 'install-ptest' rule. -- Print a standard result line for each test. -- Replace the use of "tree" with "find". - -Signed-off-by: Björn Stenberg -Signed-off-by: Alexandra Safta -Upstream-Status: Pending - -Add missing files for rule-syntax-check -- Add rule-syntax-check.py -- Add the deployed udev rules to the testdata - -Signed-off-by: Max Krummenacher -Upstream-Status: Pending ---- a/Makefile.am 2012-03-18 16:28:14.000000000 +0100 -+++ b/Makefile.am 2013-02-18 10:03:36.531101244 +0100 -@@ -708,3 +708,18 @@ - for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done - for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done - for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done -+ -+RULES = rules/* src/accelerometer/61-accelerometer.rules \ -+ src/cdrom_id/60-cdrom_id.rules \ -+ src/keymap/95-keyboard-force-release.rules src/keymap/95-keymap.rules \ -+ src/mtd_probe/75-probe_mtd.rules src/v4l_id/60-persistent-v4l.rules -+ -+install-ptest: -+ install test-udev $(DESTDIR) -+ cp Makefile $(DESTDIR) -+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile -+ install -d $(DESTDIR)/test $(DESTDIR)/rules -+ (cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test) -+ (cd $(top_srcdir) && install test/rule-syntax-check.py $(DESTDIR)/test) -+ (cd $(top_srcdir) && install $(RULES) $(DESTDIR)/rules) -+ cp $(top_srcdir)/test/sys.tar.xz $(DESTDIR)/test/ ---- a/test/udev-test.pl 2012-03-18 16:43:36.000000000 +0100 -+++ b/test/udev-test.pl 2013-02-18 10:31:29.706357321 +0100 -@@ -1459,11 +1459,13 @@ - print "add: error"; - if ($rules->{exp_add_error}) { - print " as expected\n"; -+ print "XFAIL: TEST $number: $rules->{desc}: add\n"; - } else { - print "\n"; -- system("tree $udev_root"); -+ system("find $udev_root"); - print "\n"; - $error++; -+ print "FAIL: TEST $number: $rules->{desc}: add\n"; - sleep(1); - } - } -@@ -1479,15 +1481,18 @@ - print "remove: error"; - if ($rules->{exp_rem_error}) { - print " as expected\n"; -+ print "XFAIL: TEST $number: $rules->{desc}: remove\n"; - } else { - print "\n"; -- system("tree $udev_root"); -+ system("find $udev_root"); - print "\n"; - $error++; -+ print "FAIL: TEST $number: $rules->{desc}: remove\n"; - sleep(1); - } - } else { - print "remove: ok\n"; -+ print "PASS: TEST $number: $rules->{desc}: remove\n"; - } - - print "\n"; ---- a/configure.ac 2013-11-28 09:14:02.814248826 +0100 -+++ b/configure.ac 2013-11-28 09:14:34.260874296 +0100 -@@ -6,7 +6,7 @@ - [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html]) - AC_CONFIG_SRCDIR([src/udevd.c]) - AC_CONFIG_AUX_DIR([build-aux]) --AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects]) -+AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects serial-tests]) - AC_USE_SYSTEM_EXTENSIONS - AC_SYS_LARGEFILE - AC_CONFIG_MACRO_DIR([m4]) - diff --git a/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch b/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch deleted file mode 100644 index 2c31b33b02..0000000000 --- a/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch +++ /dev/null @@ -1,25 +0,0 @@ -Source: http://cgit.freedesktop.org/systemd/systemd/commit/rules/42-usb-hid-pm.rules?id=e0386cf2809219bbdd30895f46f1f567b56902b6 - -Some USB ports on external hubs may be reported as "fixed". We only want -to auto-enable this on ports that are internal to the machine, so check -the parent state as well. - -Upstream-Status: backport - -Signed-off-by: Nitin A Kamble -2013/09/13 - -Index: udev-182/rules/42-usb-hid-pm.rules -=================================================================== ---- udev-182.orig/rules/42-usb-hid-pm.rules -+++ udev-182/rules/42-usb-hid-pm.rules -@@ -46,4 +46,9 @@ ACTION=="add", SUBSYSTEM=="usb", ATTRS{i - ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="14dd", ATTR{idProduct}="0002", TEST=="power/control", ATTR{power/control}="auto" - - # USB HID devices that are internal to the machine should also be safe to autosuspend -+# And skip it for devices which are external but say "fixed" -+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="removable", GOTO="usb_hid_pm_end" -+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="unknown", GOTO="usb_hid_pm_end" - ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", ATTRS{removable}=="fixed", TEST=="../power/control", ATTR{../power/control}="auto" -+LABEL="usb_hid_pm_end" -+ diff --git a/meta/recipes-core/udev/udev/devfs-udev.rules b/meta/recipes-core/udev/udev/devfs-udev.rules deleted file mode 100644 index 0ba1ad4e7f..0000000000 --- a/meta/recipes-core/udev/udev/devfs-udev.rules +++ /dev/null @@ -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" diff --git a/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch b/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch deleted file mode 100644 index 593c46ce03..0000000000 --- a/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch +++ /dev/null @@ -1,58 +0,0 @@ -The rule-syntax-check script fails with errors like this: - -Invalid line /lib/udev/rules.d/95-keymap.rules:49: ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j" -(' clause:', 'ATTR{[dmi/id]product_name}=="W3J"') -() - - -Move line comment from end of rules file to its own line, the regex used to -test correct syntax choke on it. - -The rule-syntax-check.py uses regex which errournessly complains on ATTR rules -of the form ATTR{[dmi/id]board_name}=="30B7" -Use the regex from systemd's script which allow [] characters and additional -compare operators - -The Makefile passes rules-test.sh script a build host path to the testdata. -Ignore the argument and use a relative path instead. - - -Signed-off-by: Max Krummenacher -Upstream-Status: Inappropriate (cross environment path) - -diff -Naur udev-182.orig/src/keymap/95-keymap.rules udev-182/src/keymap/95-keymap.rules ---- udev-182.orig/src/keymap/95-keymap.rules 2012-02-07 00:01:55.154640792 +0100 -+++ udev-182/src/keymap/95-keymap.rules 2015-01-24 20:58:40.156930520 +0100 -@@ -94,7 +94,8 @@ - ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www" - ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill" - # HP Pavillion dv6315ea has empty DMI_VENDOR --ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play -+# "quick play" -+ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" - - # Gateway clone of Acer Aspire One AOA110/AOA150 - ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer" -diff -Naur udev-182.orig/test/rule-syntax-check.py udev-182/test/rule-syntax-check.py ---- udev-182.orig/test/rule-syntax-check.py 2012-02-15 20:10:12.872333342 +0100 -+++ udev-182/test/rule-syntax-check.py 2015-01-24 21:08:00.496049600 +0100 -@@ -28,7 +28,7 @@ - no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$') - args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$') - no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$') --args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$') -+args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$') - - result = 0 - buffer = '' ---- udev-182.orig/test/rules-test.sh 2012-01-29 01:15:46.000000000 +0100 -+++ udev-182/test/rules-test.sh 2015-01-24 17:53:51.201858658 +0100 -@@ -4,7 +4,7 @@ - # (C) 2010 Canonical Ltd. - # Author: Martin Pitt - --[ -n "$srcdir" ] || srcdir=`dirname $0`/.. -+srcdir=`dirname $0`/.. - - # skip if we don't have python - type python >/dev/null 2>&1 || { diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init deleted file mode 100644 index 0ab028b391..0000000000 --- a/meta/recipes-core/udev/udev/init +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh - -### 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 @UDEVD@ ] || exit 1 -SYSCONF_CACHED="/etc/udev/cache.data" -SYSCONF_TMP="/dev/shm/udev.cache" -DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen - -# A list of files which are used as a criteria to judge whether the udev cache could be reused. -CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" -[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" - -# List of files whose metadata (size/mtime/name) will be included in cached -# system state. -META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" - -# Command to compute system configuration. -sysconf_cmd () { - cat -- $CMP_FILE_LIST - stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' -} - -[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache -[ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf -[ -f /etc/default/rcS ] && . /etc/default/rcS - -kill_udevd () { - pid=`pidof -x udevd` - [ -n "$pid" ] && kill $pid -} - -case "$1" in - start) - export ACTION=add - # propagate /dev from /sys - echo "Starting udev" - - # Check for requireed devtmpfs before trying to start udev and - # mount a no-existant fs. - if ! grep -q devtmpfs /proc/filesystems - then - echo "Missing devtmpfs, which is required for udev to run"; - echo "Halting..." - halt - fi - # mount the devtmpfs on /dev, if not already done - LANG=C awk '$2 == "/dev" && ($3 == "devtmpfs") { exit 1 }' /proc/mounts && { - mount -n -o mode=0755 -t devtmpfs none "/dev" - } - [ -e /dev/pts ] || mkdir -m 0755 /dev/pts - [ -e /dev/shm ] || mkdir -m 1777 /dev/shm - # the automount rule for udev needs /tmp directory available, as /tmp is a symlink - # to /var/tmp which in turn is a symlink to /var/volatile/tmp, we need to make sure - # /var/volatile/tmp directory to be available. - mkdir -m 1777 -p /var/volatile/tmp - - # Cache handling. - if [ "$DEVCACHE" != "" ]; then - if [ -e $DEVCACHE ]; then - sysconf_cmd > "$SYSCONF_TMP" - if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then - tar xmf $DEVCACHE -C / -m - not_first_boot=1 - [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE" - [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP" - [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN" - else - # Output detailed reason why the cached /dev is not used - cat < "/dev/null" 2>&1 - - # trigger the sorted events - [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug - @UDEVD@ -d - - udevadm control --env=STARTUP=1 - if [ "$not_first_boot" != "" ];then - if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then - PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform" - else - PLATFORM_BUS_NOMATCH="" - fi - 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 $PLATFORM_BUS_NOMATCH - (udevadm settle --timeout=3; udevadm control --env=STARTUP=)& - else - udevadm trigger --action=add - udevadm settle - fi - ;; - stop) - echo "Stopping udevd" - start-stop-daemon --stop --name udevd --quiet - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - status) - pid=`pidof -x udevd` - if [ -n "$pid" ]; then - echo "udevd (pid $pid) is running ..." - else - echo "udevd is stopped" - fi - ;; - *) - echo "Usage: $0 {start|stop|status|restart}" - exit 1 -esac -exit 0 diff --git a/meta/recipes-core/udev/udev/links.conf b/meta/recipes-core/udev/udev/links.conf deleted file mode 100644 index 8fff922db6..0000000000 --- a/meta/recipes-core/udev/udev/links.conf +++ /dev/null @@ -1,21 +0,0 @@ -# This file does not exist. Please do not ask the debian maintainer about it. -# You may use it to do strange and wonderful things, at your risk. - -L fd /proc/self/fd -L stdin /proc/self/fd/0 -L stdout /proc/self/fd/1 -L stderr /proc/self/fd/2 -L core /proc/kcore -L sndstat /proc/asound/oss/sndstat -L MAKEDEV /sbin/MAKEDEV - -D pts -D shm - -# Hic sunt leones. -M ppp c 108 0 -D loop -M loop/0 b 7 0 -D net -M net/tun c 10 200 - diff --git a/meta/recipes-core/udev/udev/local.rules b/meta/recipes-core/udev/udev/local.rules deleted file mode 100644 index d502cdd6ba..0000000000 --- a/meta/recipes-core/udev/udev/local.rules +++ /dev/null @@ -1,19 +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 -# - -# Create a symlink to any touchscreen input device -# Trigger based on input type, that the evbit (-e) has EV_SYN and EV_ABS, -# has an EV_ABS value (-a) which is used for touchscreen type devices. -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0" diff --git a/meta/recipes-core/udev/udev/permissions.rules b/meta/recipes-core/udev/udev/permissions.rules deleted file mode 100644 index 205b733292..0000000000 --- a/meta/recipes-core/udev/udev/permissions.rules +++ /dev/null @@ -1,131 +0,0 @@ -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}=="3", ATTRS{vendor}=="HP", GROUP="scanner" -SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner" -SUBSYSTEMS=="scsi", ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner" -SUBSYSTEMS=="scsi", ATTRS{type}=="4", GROUP="cdrom" -SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom" -SUBSYSTEMS=="scsi", ATTRS{type}=="6", GROUP="scanner" -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=="nvram", GROUP="nvram" -KERNEL=="rtc|rtc[0-9]*", GROUP="audio" -KERNEL=="tpm*", MODE="0600", OWNER="tss", GROUP="tss" -KERNEL=="fuse", GROUP="fuse" -KERNEL=="kqemu", MODE="0666" -KERNEL=="kvm", GROUP="kvm" -KERNEL=="tun", MODE="0666", - -KERNEL=="cdemu[0-9]*", GROUP="cdrom" -KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" -KERNEL=="pktcdvd", MODE="0644" - -KERNEL=="uverbs*", GROUP="rdma" -KERNEL=="ucm*", GROUP="rdma" -KERNEL=="rdma_ucm", GROUP="rdma" - -# 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/meta/recipes-core/udev/udev/run-ptest b/meta/recipes-core/udev/udev/run-ptest deleted file mode 100644 index 0e39806b01..0000000000 --- a/meta/recipes-core/udev/udev/run-ptest +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -tar -C test/ -xJf test/sys.tar.xz -make -k check-TESTS -make test-sys-distclean diff --git a/meta/recipes-core/udev/udev/run.rules b/meta/recipes-core/udev/udev/run.rules deleted file mode 100644 index 75d71375bb..0000000000 --- a/meta/recipes-core/udev/udev/run.rules +++ /dev/null @@ -1,14 +0,0 @@ -# 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/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache deleted file mode 100644 index dcfff1cb45..0000000000 --- a/meta/recipes-core/udev/udev/udev-cache +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -e - -### BEGIN INIT INFO -# Provides: udev-cache -# Required-Start: mountall -# Required-Stop: -# Default-Start: S -# Default-Stop: -# Short-Description: cache /dev to speedup the udev next boot -### END INIT INFO - -export TZ=/etc/localtime - -[ -r /proc/mounts ] || exit 1 -[ -x @UDEVD@ ] || exit 1 -[ -d /sys/class ] || exit 1 - -[ -f /etc/default/rcS ] && . /etc/default/rcS -DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar" -SYSCONF_CACHED="/etc/udev/cache.data" -SYSCONF_TMP="/dev/shm/udev.cache" -DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen - -# A list of files which are used as a criteria to judge whether the udev cache could be reused. -CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" -[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" - -# List of files whose metadata (size/mtime/name) will be included in cached -# system state. -META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" - -# Command to compute system configuration. -sysconf_cmd () { - cat -- $CMP_FILE_LIST - stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' -} - -[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache - -if [ "$ROOTFS_READ_ONLY" = "yes" ]; then - [ "$VERBOSE" != "no" ] && echo "udev-cache: read-only rootfs, skip generating udev-cache" - exit 0 -fi - -[ "$DEVCACHE" != "" ] || exit 0 -[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... " -if ! [ -e "$DEVCACHE_REGEN" ]; then - [ "${VERBOSE}" == "no" ] || echo "not found." - exit 0 -fi -[ "${VERBOSE}" == "no" ] || echo "found." -echo "Populating dev cache" - -err_cleanup () { - echo "udev-cache: update failed!" - udevadm control --start-exec-queue - rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED" -} - -( - set -e - trap 'err_cleanup' EXIT - udevadm control --stop-exec-queue - sysconf_cmd > "$SYSCONF_TMP" - find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ - | xargs tar cf "${DEVCACHE_TMP}" - gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" - rm -f "${DEVCACHE_TMP}" - mv "$SYSCONF_TMP" "$SYSCONF_CACHED" - udevadm control --start-exec-queue - rm -f "$DEVCACHE_REGEN" - trap - EXIT -) & - -exit 0 diff --git a/meta/recipes-core/udev/udev/udev-cache.default b/meta/recipes-core/udev/udev/udev-cache.default deleted file mode 100644 index a3b732698d..0000000000 --- a/meta/recipes-core/udev/udev/udev-cache.default +++ /dev/null @@ -1,5 +0,0 @@ -# Default for /etc/init.d/udev - -# Comment this out to disable device cache -DEVCACHE="/etc/udev-cache.tar.gz" -PROBE_PLATFORM_BUS="yes" diff --git a/meta/recipes-core/udev/udev/udev.rules b/meta/recipes-core/udev/udev/udev.rules deleted file mode 100644 index a19d4a0bf6..0000000000 --- a/meta/recipes-core/udev/udev/udev.rules +++ /dev/null @@ -1,116 +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*", 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/meta/recipes-core/udev/udev_182.bb b/meta/recipes-core/udev/udev_182.bb deleted file mode 100644 index b216352035..0000000000 --- a/meta/recipes-core/udev/udev_182.bb +++ /dev/null @@ -1,9 +0,0 @@ -include udev.inc - -PR = "r9" - -# module-init-tools from kmod_git will provide libkmod runtime -DEPENDS += "module-init-tools" - -SRC_URI[md5sum] = "1b964456177fbf48023dfee7db3a708d" -SRC_URI[sha256sum] = "7857ed19fafd8f3ca8de410194e8c7336e9eb8a20626ea8a4ba6449b017faba4" -- cgit 1.2.3-korg