aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
AgeCommit message (Collapse)Author
2013-09-17udev: avoid autosuspend of USB input devicesNitin A Kamble
Some of the external USB devices has internal USB hub, which make them look like "fixed" rather than "removable". And USB autosuspend does not work with some of these devices resulting in inoperable pointing device. Now the code detect these false "fixed" devices by looking at their parents. If any of their parent is "removable", then USB autosuspend is not enabled for that device, which keeps the pointing device functional. Fixes bug: [YOCTO #5166] Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10mount.sh: automount cdrom device even if no ID_FS_TYPE availableChen Qi
This script was modified to check whether $ID_FS_TYPE is empty before automount, however, for cdrom devices on qemu, the ID_FS_TYPE is not set, yet the device should be mounted. Otherwise, when booting an iso image with runqemu, the boot process hangs at 'waiting for removable media'. This patch fixes this problem by first checking whether the block device is a cdrom. [YOCTO #4487] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16udev: remove implicit dependency on initscriptsChen Qi
At some point, the udev was modified to source the functions from initscripts or lsbinitscripts. This dependency is actually not needed. If we use udev in a system where initscripts from oe-core is not available, there will be errors. This patch fixes this problem by removing the implicit dependency. [YOCTO #4882] [YOCTO #4103] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-18udev-extraconf: allow users in disk group to write vfat filesystemHongxu Jia
If filesystem type is vfat, change the ownership group to 'disk', and grant it with w/r/x permissions. The user which belongs to 'disk' group could write the storage. [YOCTO #4004] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-05udev-extraconf: blacklist /dev/dm-*Jackie Huang
Do not mount /dev/dm-* by default via udev, this is the default behavior for most distos and WRLinux4.x. This resolved a problem with the sanity test failing due to seeing the error while attempting to mount new logical volumes without fs. Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-02udev: Add RRECOMMENDS for udev-cache to enable the cacheSaul Wold
This will enable the udev cache for sysvinit systems, which does improve post-first boots. Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-02udev-cache: take a read-only rootfs into considerationChen Qi
In case of a read-only rootfs, we skip the process of generating udev cache, as the data cannot be persisted between reboots. However, it's possbile that the $DEVCACHE (default to /etc/dev.tar) exists in a read-only rootfs, no matter how it's generated or installed. In such situation, we try to use $DEVCACHE if possible. Besides the basic changes in the logic of udev cache handling, this patch also adds code to output more information if the udev cache is not used and VERBOSE enabled. This patch also changes the readfile function to readfiles function so that it could handle more than one file at once. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-27udev: only use devtmpfs for udevAlex Olson
Fix for bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=4632 Since udev 172, the 'mknod' logic was removed from udev. Yocto Dylan is now using udev 182. This means /dev is now required to be a devtmpfs filesystem (maintained by the kernel). If the root filesystem is a ramdisk, the kernel's auto-mount of /dev doesn't activate since there is no rootfs to actually mount... The bug causes an unusable system as /dev doesn't contain even basic nodes required to even get a login prompt. The Yocto udev/init script mounts tmpfs if it does not detect tmpfs or devtmpfs mounted at /dev. This appears to be outdated logic that is no longer correct. I believe the Yocto udev init script should be checking and mounting only 'devtmpfs' on dev. Signed-off-by: Alex Olson <alex.olson+yocto@gmail.com> [YOCTO #4632] Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-25udev-cache: fix to use udev-cache correctlyChen Qi
Previouly, the udev-cache has no real effect even if it's installed into the system. The key problem here is that at first boot, the /etc/dev.tar is not present, thus resulting /dev/shm/udev.cache not created on first boot even if udev-cache is enabled. This patch fixes this problem. The /dev/shm/udev.cache will be created if necessary, that is, on first boot or when some part of the system is changed. In the latter case, the udev cache may not be valid. [YOCTO #4738] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-04udev: do not recommend pciutils/usbutils idsMarcin Juszkiewicz
udev does not require those files to be operational and they add ~350KB to rootfs Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29udev: do not create symbolic link from /run to /var/runJonathan Liu
The /run directory is now a tmpfs with /var/run as a symbolic link pointing to /run. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-29udev: do not create /var/volatile/run in init scriptJonathan Liu
Previously in udev init, /var/volatile/run had to be created after mounting all tmpfs filesystems so that udevd can write to /var/run (a symbolic link to /var/volatile/run). This is because udev is started before populate-volatile.sh. Now that /var/run is a symbolic link to /run (a tmpfs filesystem), /var/volatile/run doesn't need to be created anymore. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-08udev: do not recommend udev-extraconfAndreas Müller
same as already sent by Koen Kooi [1] [1] http://patches.openembedded.org/patch/48183/ Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-28udev: create /var/volatile/tmp to avoid dead linkChen Qi
If it's not first boot, /tmp has already been symlinked to /var/volatile/tmp. But the udev service starts before populate-volatile.sh starts. This leads to a dead link at /tmp. As a result, trying to create any file under /tmp will fail. If a USB is plugged in before the populate-volatile.sh script starts, the /tmp/.automount-$name file will not be created correctly. As a result, when the USB is unplugged, the /media/$name directory is not removed. So we create /var/volatile/tmp directory in the udev script to avoid this dead link problem. [YOCTO #3404] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-28udev-extraconf: Avoid mounting unknown filesystemsOtavio Salvador
Depending on kernel version used, the system can hung when trying to mount the extended partition (not the logical one) as it is a holder for other partitions and does not have a filesystem in it. To avoid this to happen we just mount partitions when these are using known filesystems so it does not try to mount a partition for an unsupported filesystem. Reported-by: Vladan Jovanovic <vladan.jovanovic@gmail.com> Reported-by: Leonardo Sandoval Gonzalez <b42214@freescale.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Tested-by: Vladan Jovanovic <vladan.jovanovic@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-04-18udev: disable systemd supportRoss Burton
If we want systemd support we use systemd's udev, so disable systemd support in this udev to avoid packaging the unit files. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18udev: drop dependency on udev in libudevRoss Burton
libudev previously depended on udev, but this causes problems with multilib if the user wants to install two variants of libudev as they'll pull in two variants of udev, which will conflict. Instead, remove the dependency and rely that the image pulls in udev in some way, such as the commonly used packagegroup-core-boot. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-18udev: explicitly package nonarch_base_libdirRoss Burton
When using multilib this doesn't get caught by the default FILES_${PN}, so add it. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-17udev: remove explicit path to udevadmRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-17udev: Effectively revert the move to /sbinRichard Purdie
This effectively reverts the changes made in b49ddeb11c0319b7ece278fd7cef6b0223114ca9 to move udev's libexecdir to sbin. The changes caused too many issues in other places and were not well enough tested this close to a release. Rather than use base_libdir, the nonarch version is used to try and give some chance of multilib not being totally broken in the release. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15allarch: Drop various problematic allarch usagesRichard Purdie
In each of these cases allarch is used where the package in question has a dependency on things which are not allach and change when MACHINE is changed. This leads to a rebuild of the package each time MACHINE is switched and the sstate checksum changes. The dependencies in question are not suited be being marked as ABISAFE. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13udev-extraconf: Add -o silent to auto mount for mount.util-linuxSaul Wold
This will silence some of the noisy output from mount.util-linux and the kernel when trying to automount filesystems or devices. Busybox does not accept the silent option, it uses a loud option instead. [YOCTO #3935] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13udev: Update initscript to check for devtmpfsSaul Wold
This is needed because the udev_182 now requires devtmpfs and will not work correctly with out, so ensure that the kernel contains devtmpfs by checking /proc/filesystems. [YOCTO #4125] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09udev: fix init script for the location of udevdSaul Wold
Ensure we can update the script base don the location of the udevd installation Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-09udev: Move udevd back to /sbinRadu Moisan
Along with v182 upgrade udevd was moved to ${base_libdir} making scripts like init-live.sh to fail in finding udevd. We have some problems here since the placing binaries into either libdir breaks the way our multilib handling works. That code and its associated sanity tests assume that libdir contains binaries of a particular architecture and that these are not allowed to overlap. This is in contrast to the bindirs where conflicts are expected and handled appropriately. So whilst upstream may desire this directory layout, it won't work for OE's usage of it and we need to configure udev differently. The scripts already have fallback code to handle udev in the two locations so there is no issue is going back to our previous layout. [Yocto #4046] Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04udev-extraconf: Add rule adding input devices to input groupDarren Hart
Fixes [YOCTO 4164](2/3) Add all /dev/input/* devices to the input group with g+rw. This is needed for rootless X without adding a security hole by making the device o+rw. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Saul Wold <sgw@linux.intel.com> Cc: Radu Moisan <radu.moisan@intel.com> Cc: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-03-26udev: move /run volatile entry to udev instead of initscriptsRoss Burton
initscripts is generally installed on systemd-using images, but because it specifies that /run is a symlink to /var/run managed by volatiles it totally breaks systemd by copying/deleting /run from underneath systemd. Deleting sockets mid-boot doesn't leave systemd in a happy place. As this volatile reference of /run was introduced by udev 182, move it's reference to the udev recipe. This way it will never be present on systemd images, as systemd manages /run as a tmpfs itself. Signed-off-by: Ross Burton <ross.burton@intel.com>
2013-02-11udev: Cleanup .inc fileAndrei Gherzan
* udev-acl and udev-concolekit have no files so remove these packages * there's nothing in sbindir so remove useless sbindir = "${base_sbindir}" * there is no udevinfo or udevtest so remove these from udev-utils * udevadm is installed in bindir so modify it's path in FILES_udev-utils Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11udev: PR bumpAndrei Gherzan
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11udev: Modify init script to use the correct path of udevadmAndrei Gherzan
udevadm is installed in /usr/bin not in /usr/sbin. Init script modified accordingly. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08udev: Add start/stop/status/restart support to init scriptJesse Zhang
[ CQID: WIND00388860 ] Add the ability to use "stop", "start", "restart" and "status" with the udev initscript. Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-01-21udev: skip in systemd distros, to fix world buildsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-10udev: Fix build with eglibc 2.17Khem Raj
Link with librt to get definitions of mq_* functions Fixes errors like below /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-eglibc/work/armv5te-oe-linux-gnueabi/udev/182-r3/udev-182/src/sd-daemon.c:394: undefined reference to `mq_getattr' | collect2: error: ld returned 1 exit status Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-12-19udev: fix failed /dev/shm mountJohan Hovold
Since commit commit fbec192f6bc4 ("udev: Ensure tmpfs are mounted and volatile/run exists") all tmpfs-entries in fstab are mounted before udev starts using mount -a. If /dev/shm is among those entries, that mount will fail as the mount point has not yet been created: Starting udev mount: mounting tmpfs on /dev/shm failed: No such file or directory udevd[474]: starting version 182 Fix by restoring the old way of mounting /dev and mounting the remaining tmpfs-entries only after /dev/shm has been created. Also make sure that any errors are supressed for these tmpfs-mounts. Should any mount point not yet be present, that mount will be retried later during the boot process. Signed-off-by: Johan Hovold <johan.hovold@lundinova.se> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-30udev: Ensure tmpfs are mounted and volatile/run existsRichard Purdie
There is a race with udev where eiher the run directory can get replaced during bootup leading to ude errors, or if the tmpfs was mounted and populate-volatiles hasn't run, udev won't start at all. This ensures that any tmpfs get mounted before udev starts and that the default volatiles/run directory at least exists, fixing the races and boot time errors caused after the recent udev upgrade. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-30udev: Use correct variable in udev.conf for run_pathRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-27udev-extraconf: Don't mount root filesystem under /mediaAndy Ross
The mount.sh handler attempts to prevent already-mounted filesystems from being mounted as dynamic/removable "/media". But it misses the case where the kernel has mounted the root filesystem (e.g. with "root=/dev/sda1"). In that situation, /proc/mounts has a device name of "/dev/root" instead of the proper $DEVNAME string exposed by udev. So we must also test the root filesystem device number vs. the $MAJOR/$MINOR udev tells us. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-25udev: upgrade to 182Alexandru DAMIAN
This is the final upgrade of udev. Futher upgrades will only come in conjunction with systemd. The v4l1 removal patch is deprecated as the bug is fixed inside udev. There is a new patch fixing the path for default sh interpreter. New debug binaries are generated, and udev.inc is modified to package those correctly. The install locations changed for udevd and udevadm, so the scripts are updated accordingly. (From OE-Core rev: 3cbe52b94c4d559a037347ac419fafee5af84fe6) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Conflicts: meta/recipes-core/udev/udev_164.bb sgw - Fixed up DEPENDS += and added some OECONF options that where in the meta-oe version and make sense to be included. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04udev: Remove files moved to udev-extraconfRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04udev-extraconf: change LICENSE to MITMartin Jansa
* Original recipe added by RP in fc128ab1e4fec27d44cebfa690a9bc233eda0caf was saying GPL (later GPLv2) * COPYING.GPL was added to reflect that * Meta-oe has similar recipe with MIT license and even more scripts, so lets change LICENSE here too * Most code was derived from the meta-oe version or added to OE arguably under MIT and the MIT license makes most sense here Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04udev-extraconf: Merge with udev-extra-rules from meta-oeMartin Jansa
* Move parts of local.rules from udev to udev-extraconf * Move mount.sh and network.sh to udev-extraconf along with rule fragments * Add mount.blacklist to CONFFILES * Change PV to 1.0 and bump PR to provide upgrade path from meta-oe's udev-extra-rules including RREPLACE/RPROVIDES/RCONFLICTS trio Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-28udev: Drop hid2hci, its provided by bluez4 nowRichard Purdie
Our bluez4 recipe provides hid2hci now. udev removes this as of version 169, we might as well remove it now to stop conflicts over the file in both target file systems and the build sysroots. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17udev: don't mount with -o syncJesse Zhang
mount.sh mounts all partitions with -o sync, which is bad for system performance. Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17udev: Fix build with eglibc 2.16Khem Raj
Include sys/resource.h to get definition of PRIO_PROCESS Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04pcmcia-cs: Remove references to long-deprecated pcmcia-cs.Robert P. J. Day
pcmciautils is the appropriate PCMCIA package these days. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2012-03-13udev-164: fixup "don't hardcode path to pidof"Andreas Oberritter
* Remove -e shell option, because pidof may return nonzero. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
2012-03-08udev-164: don't hardcode path to pidofAndreas Oberritter
* pidof lives in /bin, search it in $PATH. * Assume pidof's presence. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-21udev.inc has a bad link for udev home page; update the linkBob Cochran
Fixed bad link in udev.inc to the udev home page / documentation on kernel.org Signed-off-by: Robert Cochran<yocto@mindchasers.com>
2012-02-07udev: stop providing cache support by defaultOtavio Salvador
The usefulness of cache nowadays has been reduced a lot and thus it's better to stop using it by default. Dropping the recommends allows for image to decide if they want or not to have cache enabled, instead of require a machine override. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-02-02udev: improve udev-cache robustnessOtavio Salvador
* allow udev-cache to be disabled at runtime (using /etc/default/udev-cache); * make cache invalidated if kernel, bootparams or device list changes; Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>