summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/udev
Commit message (Collapse)AuthorAgeFilesLines
* eudev: Replaces udev with eudev for compatibility when using sysvinit on ↵Alejandro Hernandez2016-03-0216-921/+0
| | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: a22797f7c37a865420837b5c29b270f73ee4c6ce) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: Add 2 patches to support 4.4 kernelSaul Wold2016-01-202-0/+81
| | | | | | | | | | | | | | These 2 patches are needed to build udev with the 4.4 kernel, the first mtd-probe adds back a stdint.h header that was removed in the kernel's mtd-user.h header file. The second adds a check for a new header and sets a Makefile variable to determine which header to use for the new kernel vs older kernels. (From OE-Core rev: 8084c185c43cb7e7f5e29d31939dfd308f8a0f93) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Fix Upstream-Status statementsRoss Burton2015-09-121-2/+1
| | | | | | | | | | Fix a variety of problems such as typos, bad punctuations, or incorrect Upstream-Status values. (From OE-Core rev: bd220fe6ce8c3a0805f13a14706d3130ea872604) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: improve error handlingKen Sharp2015-04-281-1/+7
| | | | | | | | | | | | If an error occurs while the udev cache is being populated, the system is left in a state where udev is stopped. Remedy this with a clean up function to restart udev and remove any intermediate files. (From OE-Core rev: af911b272ded95884079dc307eeeb1811f0584c9) Signed-off-by: Ken Sharp <ken.sharp@ni.com> Reviewed-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: Remove unnecessary tar read from stdinKen Sharp2015-04-281-1/+1
| | | | | | | | | | xargs already formats the inputs to tar correctly, so the '-T -' argument to tar is unnecessary. (From OE-Core rev: d18e1964dede530c5fae6ae349d6a78fa5342382) Signed-off-by: Ken Sharp <ken.sharp@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: remove 'modprobe' local ruleJavier Viguera2015-03-201-3/+0
| | | | | | | | | | | | | | | | Since udev version 176 (udev commit 06316d9) udev switched modprobe explicit rules by the builtin kmod support. The rule using the builtin kmod support is in '/lib/udev/rules.d/80-drivers.rules': DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}" (From OE-Core rev: a6f256b0d6cf4e76228627eaa00c1dbe02e2e622) Signed-off-by: Javier Viguera <javier.viguera@digi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: avoid using '-L' for statChen Qi2015-01-292-2/+2
| | | | | | | | | | | | | | | | | stat command from stat package doesn't support '-L' option, so avoid using it to get rid of boot errors like below. Populating dev cache stat: invalid option -- 'L' Usage: stat [-l] [-f] [-s] [-v] [-h] [-t] [-c format] file1 [file2 ...] [YOCTO #7210] (From OE-Core rev: 4ef8cc01906833847386fd441d87a89cbdda7e25) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: don't keep ptest testdata laying aroundMax Krummenacher2015-01-292-1/+3
| | | | | | | | | | | | | | | | | | | | | Only unpack udev's testdata right before executing the tests and cleanup afterwards. udev's testsuite can be used by ptest. However currently the testdata against which its functionality is tested is installed in the sysroot at udev install time. If the sysroot is used with qemu the testdata makes qemu entering an infinite loop. http://lists.openembedded.org/pipermail/openembedded-core/2014-September/097098.html This has already been fixed for the systemd udev flavour. https://bugzilla.yoctoproject.org/show_bug.cgi?id=5664 (From OE-Core rev: 3f799b173d871160ab24666920f5e7ab4e09fd42) Signed-off-by: Max Krummenacher <max.oss.09@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: fix ptest rule syntax checkMax Krummenacher2015-01-292-2/+74
| | | | | | | | | | | The ptest which checks for correct udev rules fails. Missing files and paths for the build host caused this. (From OE-Core rev: 2c9773e71ed757f1ff3306eb716d22a71defeb25) Signed-off-by: Max Krummenacher <max.oss.09@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: refactor conditionals and error handlingRichard Tollerton2014-12-191-13/+22
| | | | | | | | | | | | | | | | Most of /etc/init.d/udev-cache is in a conditional block which can be replaced by a `[ ... ] || exit 0` to reduce nesting. This also provides an opportunity to add some additional messages when VERBOSE is set. Capture and report errors encountered in the cache generation process, using set -e and trap EXIT. These errors were previously being ignored. (From OE-Core rev: a1357f3c78e46cd4297fefab56acf87342967132) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: Update cache asynchronouslyRichard Tollerton2014-12-191-9/+11
| | | | | | | | | | | Don't hold up the boot while the cache is being updated. (From OE-Core rev: eb52b257511b7624c8e212f5e9df711935d619ee) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: invalidate on rules.d changesRichard Tollerton2014-12-192-0/+11
| | | | | | | | | | | | | | | Presently, the cache is not regenerated if udev rules are modified, which may cause the cache to preserve an old configuration. To fix, include the size, mtime, and filename of all udev rules in the system configuration. This change requires `stat`. If busybox supplies stat, CONFIG_FEATURE_STAT_FORMAT must be enabled. (From OE-Core rev: 8847e33b12171a21b7c7e1241198080ad9ef9284) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: always warn on console if invalidatedRichard Tollerton2014-12-191-3/+1
| | | | | | | | | | | Failure to use the udev cache is a significant enough impact to the boot time (possibly seconds) that it should always be reported on the console, regardless of the VERBOSE setting. (From OE-Core rev: 9e588bbf9477d57f0a46d92ce11f8f891115496c) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: Clean up message when cache is invalidatedRichard Tollerton2014-12-191-4/+7
| | | | | | | | | | | Replace a bunch of echo's with a single cat<<EOF. Take this opportunity to more clearly communicate what is going on with the cache and what files are being looked at. (From OE-Core rev: d768772a1259d3659d0424c39e65eeb3443af86c) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: refactor sysconf generationRichard Tollerton2014-12-192-5/+18
| | | | | | | | | | | | | | The current system configuration needs to be generated both inside udev (to compare against the cached system configuration) and udev-cache (to regenerate the cached system configuration). Use a single function definition for this task, duplicated across both initscripts. This also allows administrators to modify it for machine-specific requirements. (From OE-Core rev: 34957afcfe663eed4f5ebec0891a84467e67a48d) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: don't generate sysconf twiceRichard Tollerton2014-12-192-2/+7
| | | | | | | | | | | | The udev initscript signals udev-cache to run by generating a new sysconf; but udev-cache now overwrites that with its own copy. To eliminate the needless sysconf generating in udev, we instead trigger udev-cache to run by touching a new file $DEVCACHE_REGEN. (From OE-Core rev: 8d2325be2d03086b7e5a02618edb05b19fbcdc48) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: replace readfiles() with cmpRichard Tollerton2014-12-192-36/+10
| | | | | | | | | | | | | | | | | | | | | Currently, udev-cache system configurations are compared as shell string variables, read into memory with the readfiles() function. This is more complex, and significantly (27-41%) slower, than comparing them using `cmp`. (Performance was verified on both Cortex-A9 and Intel Nehalem systems.) So just use cmp. This requires a few other small changes: exclude /proc/atags from CMP_FILE_LIST if it doesn't exist to avoid errors in `cat` and `cmp`. `cmp -q` doesn't exist in busybox, so instead, redirect output to /dev/null. (From OE-Core rev: e8ea6a29ed3ab9892a3bc7ee8249f10688c0af29) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: stop race between sysconf and cache generationRichard Tollerton2014-12-191-0/+18
| | | | | | | | | | | | | | | | | | | The validity of the udev cache is determined by the sysconf file (/etc/udev/cache.data). Currently, there is a substantial delay between sysconf generation in /etc/init.d/udev and cache generation in /etc/init.d/udev-cache. If a hotplug event arrives in the middle of this, then the sysconf will be out of date with respect to the cache. The solution is two-pronged. First, we minimize the race window by regenerating the sysconf immediately before the cache, in /etc/init.d/udev-cache. This allows us to kill the race entirely by stopping the udev event queue while the sysconf and cache are being generated. (From OE-Core rev: 107e7fa2b2cc2e06addb83518c03b3ab769fed6f) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: fix uevent-helper disableJohan Hovold2014-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | Make sure that /proc/sys/kernel/hotplug exists before trying to disable the uevent-helper mechanism. Since kernel commit 86d56134f1b6 ("kobject: Make support for uevent_helper optional.") the kernel can be built without uevent-helper support. In this case /proc/sys/kernel/hotplug does not exist and the current sysvinit script fails with /etc/rcS.d/S04udev: line 132: can't create /proc/sys/kernel/hotplug: nonexistent directory when trying to disable the uevent-helper mechanism during boot. Note that a single NULL-character has always been sufficient to disable. (From OE-Core rev: f7b8445f2e89ad0a59c2859f9eb26855769f1070) Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: parametrize sysconf file pathsRichard Tollerton2014-08-232-6/+10
| | | | | | | | | | | | The udev-cache facility uses files that represent system states, to ensure that the cache tarball is valid to apply. These paths were hardcoded in several places; collect them into SYSCONF_CACHED and SYSCONF_TMP. (From OE-Core rev: f4fcb237da0d1013005e9a0bb2381cfeb4c5316c) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: Don't ignore error messages from cache extractRichard Tollerton2014-08-231-1/+1
| | | | | | | | | | | | | Previous changes should obviate all known spurious errors coming out of tar. Since real extraction failures can and will occur, stop redirecting stdout/stderr to /dev/null. Take this opportunity to also remove an unnecessary subshell. (From OE-Core rev: 09089962be353280201ba3899fd5ef9cc3c0ba32) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: omit sockets and filesystems mounted under /devRichard Tollerton2014-08-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Archiving sockets causes tar to report an error and return a nonzero exit status. Archiving a mounted filesystem is harmless, but may greatly bloat the size of the cache tarball, and wastes time on boot. To fix these issues, use `find` to only include the files we want, which are the file types that udev will create (block/char devices and symlinks) that are on the same filesystem as /dev. While we're at it, remove a subshell by archiving /dev as an absolute path. However, `tar` will complain about stripping the leading slash on stderr. To inhibit this, `cut` out the leading slash. An alternative solution is to use `tar --exclude`, but that is modestly more brittle, since we'd need to explicitly list every socket and filesystem to exclude. Note that `tar --one-file-system` is GNU-specific, and tar implementations generally have nothing equivalent to `find -type`. If using busybox `find`, this change requires CONFIG_FEATURE_FIND_TYPE=y and CONFIG_FEATURE_FIND_XDEV=y. If using busybox `tar`, this change requires CONFIG_FEATURE_TAR_FROM=y. (From OE-Core rev: e89df123e2ec516ae61763eab3c9e78e067e28d5) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: strip timestamps on extractRichard Tollerton2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Under normal udev operation, device nodes are obviously timestamped based on the system time at current boot. However, when using udev-cache, they are timestamped from a previous boot. The existence of machines lacking RTCs makes this more than a cosmetic issue: if the current time is set further on in the boot, so that the system time is still 1970 by the time the cache is extracted, tar will print a timestamp warning for every extracted file (potentially hundreds of them). To fix, use -m on extract. If using busybox `tar`, this commit requires CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y. (From OE-Core rev: b31f8f1f053cdfa9428e3f667c05e7e2c600061e) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: choose a more descriptive cache filenameRichard Tollerton2014-08-231-1/+1
| | | | | | | | | | | | | "/etc/dev.tar.gz" doesn't adequately imply that udev-cache maintains it. Instead, call it "/etc/udev-cache.tar.gz". (From OE-Core rev: b33c678e2a5d42138a15b69802c5ddd109cb3b55) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: Compress the cacheRichard Tollerton2014-08-232-2/+3
| | | | | | | | | | | | $DEVCACHE is observed to be 100k uncompressed; compressing it reduces its size to ~5k. But compress it outside of `tar` so that archival operation takes as little time as possible, to minimize the risk of devices being created/removed during execution. (From OE-Core rev: 571df6ddba1caa6805f7c96cd592eea399c2aee2) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: Update cache tarball atomicallyRichard Tollerton2014-08-231-1/+3
| | | | | | | | | | | | | Overwriting the tarball in-place could cause a partial write, if the system stops at an inopportune time. This is mitigated by first writing to a temporary file, then moving that file on top of the final location. (From OE-Core rev: 5dbf43fe32a1cf259f9379a7d2c008260eabf3ac) Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: fix /var/volatile/tmp permissionsRiku Voipio2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mariadb postinstall will fail with: ERROR: 1 Can't create/write to file '/tmp/#sql_a2a_0.MAI' (Errcode: 13) 140814 8:14:06 [ERROR] Aborting /tmp is a link to /var/volatile/tmp, set as: drwxr-xr-x 3 root root 60 Aug 14 08:07 . populate-volatiles.sh does not create the directory or set permissions, because it already exists: Checking for -/var/volatile/tmp-. Creating directory -/var/volatile/tmp-. Target already exists. Skipping. Traced the creation to the initfile in udev. Create with -m 1755 to be sure. With this patch applied, mysql postinst succeeds and creates the neccesary user tables. (From OE-Core rev: 5743c7632ac9c33051f6fca60f5507d3808e8e3a) Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: fix no newline at end of fileRobert Yang2014-07-031-1/+1
| | | | | | | | | | | Add a '\n' to the last line of the file to fix: No newline at end of file (From OE-Core rev: b3090263ba31702631270643c7a7d7af8f4d9234) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache.default: set PROBE_PLATFORM_BUS to "yes" by defaultDenys Dmytriyenko2014-06-251-0/+1
| | | | | | | | | Force probing of "platform" bus by default. (From OE-Core rev: 6aae37c66fb6e7153b829ad860b7e7f94e804bd4) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: update init script for conditional probing of platform busDenys Dmytriyenko2014-06-251-1/+6
| | | | | | | | | | | | | | | | | Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS variable from /etc/default/udev-cache on subsequent boots when udev cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to force probing on every boot, otherwise it uses the old default behaviour of probing it just the first time. This is helpful on modern SoCs where most of the low level peripheral drivers are registered on the platform bus and need to be probed to load the necessary modules and enable the connected buses and subsystems. (From OE-Core rev: 70a695735e0a7d14448f2f5a9986bfe105210a91) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Upstream-Status CleanupsSaul Wold2014-04-251-1/+1
| | | | | | | (From OE-Core rev: ea438b58c9a90e4c3147f99d63a9afc66963c5a1) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: Add ptestAlexandra Safta2013-12-142-0/+76
| | | | | | | | | | Install udev test suite and run it as a ptest. (From OE-Core rev: 34430ecdc4bb7414ca865df1b164bce1e4fec6fa) Signed-off-by: Alexandra Safta <alexandra.safta@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit: adjust boot sequence and remove hack from udevChen Qi2013-11-081-1/+3
| | | | | | | | | | | | | | | | | | | | | Adjust the boot sequence in sysvinit based systems. The mountall.sh (mounting the local file system) needs to be started before udev and bootlogd. This patch makes mountall.sh start before udev and removes the hack of mounting tmpfs in the udev init script. This patch also adds some comments to the udev init script to make it clear why we create the '/var/volatile/tmp' directory. [YOCTO #5273] (From OE-Core rev: f6a9df6b7cd411b52e71022b8f7bf8bda6395649) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: fix typo in local.rulesSaul Wold2013-11-011-1/+1
| | | | | | | (From OE-Core rev: b8e6b73d4ef6aa957bfcae299f754c2dcb702b84) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: Update touchscreen rule for ID_INPUT_TOUCHSCREENTom Rini2013-10-301-2/+1
| | | | | | | | | | | | Since udev 174 udev has been running input_id as a built-in command and setting this value in the environment for touchscreens. Use this logic to detect when to make a touchscreen0 symlink. (From OE-Core rev: 5abcfcd4380aacafc45d776f557738fb18089113) Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: update local rules for new touchscreen deviceChase Maupin2013-10-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * While working with a new capacitive touchscreen it was found that the existing udev rule that creates the /dev/input/touchscreen0 symlink was too restrictive and did not match the MODALAIS entry for this touchscreen. which is: MODALIAS=input:b0018v0000p0000e0000-e0,1,3,k14A,ra0,1,2F,35,36,39,mlsfw * By looking at the input_print_modalias function in the Linux kernel drivers/input/input.c file and referencing the meaning of the evbits and attributes of the input_dev structure it seems that for identification of a touchscreen the match with ,18 which was matching part of the absbit structure is overkill. * It seems that the absbit entry is used for devices like touchscreens and if that the the "a" is followed by 0 and 1 this is sufficient. * So the logic has now been changed to check for the "e" 0 and 3 values which correspond to EV_SYN and EV_ABS, then check for the "a" attribute with 0 and 1. * More information and history for this can be found at: http://patchwork.openembedded.org/patch/25093/ http://thread.gmane.org/gmane.comp.handhelds.openembedded.core * This patch mirrors a patch done by: Andrea Adami <andrea.adami@gmail.com> (From OE-Core rev: d95a9b516861594bc89c7ee8079bab2904703ad2) Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: avoid autosuspend of USB input devicesNitin A Kamble2013-09-171-0/+25
| | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: d74a0ecdbc85a482cab6e7eae8dcb48185d44d84) 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>
* udev: remove implicit dependency on initscriptsChen Qi2013-08-161-4/+12
| | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 72d6825c24f4c3e4a7a907cf0a09e2e8f7720ae8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: take a read-only rootfs into considerationChen Qi2013-07-022-22/+38
| | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 4ec1266e7e1aacdb9d3d0fc5cd6307b60df1731e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: only use devtmpfs for udevAlex Olson2013-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 31ab19ab69bc6504df01cac7ee0670ca78d247ab) Signed-off-by: Alex Olson <alex.olson+yocto@gmail.com> [YOCTO #4632] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-cache: fix to use udev-cache correctlyChen Qi2013-06-252-4/+6
| | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 84e0ec2e677fb0236a38478372cdd75797cf5a2e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: do not create symbolic link from /run to /var/runJonathan Liu2013-05-291-1/+0
| | | | | | | | | | | The /run directory is now a tmpfs with /var/run as a symbolic link pointing to /run. (From OE-Core rev: 691593177aa78a56ce138f1041872bebca2aa056) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: do not create /var/volatile/run in init scriptJonathan Liu2013-05-291-1/+0
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: d557f6615701c9f2f461a10c30de1d9572424266) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: create /var/volatile/tmp to avoid dead linkChen Qi2013-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 2f93c8466ca146c965585ea38210ddb5fb5754bd) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: remove explicit path to udevadmRoss Burton2013-04-181-5/+5
| | | | | | | (From OE-Core rev: cc0f22cd1e93cc25647add1a3339e150572e4fce) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: Update initscript to check for devtmpfsSaul Wold2013-04-131-0/+8
| | | | | | | | | | | | 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] (From OE-Core rev: 4f85bb5254b3f4a9db8b419947d4bde424ce9617) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: fix init script for the location of udevdSaul Wold2013-04-092-3/+3
| | | | | | | | | Ensure we can update the script base don the location of the udevd installation (From OE-Core rev: 25ff5960e41b9d7c62b05a08dd77cf11390962a1) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: move /run volatile entry to udev instead of initscriptsRoss Burton2013-03-261-0/+1
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 5b0257e318340c2d6c8d3b0c3fa32272d6e9526b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: Modify init script to use the correct path of udevadmAndrei Gherzan2013-02-111-5/+5
| | | | | | | | | | udevadm is installed in /usr/bin not in /usr/sbin. Init script modified accordingly. (From OE-Core rev: b8ba1e3db44d2443e0071d4923101280151ccd03) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev: Add start/stop/status/restart support to init scriptJesse Zhang2013-02-081-49/+64
| | | | | | | | | | | | | | [ CQID: WIND00388860 ] Add the ability to use "stop", "start", "restart" and "status" with the udev initscript. (From OE-Core rev: bc6193824ec3eb1f3c590a93ccb79c8588b74412) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>