aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
AgeCommit message (Collapse)Author
2014-12-19udev-cache: refactor conditionals and error handlingRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: Update cache asynchronouslyRichard Tollerton
Don't hold up the boot while the cache is being updated. 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>
2014-12-19udev-cache: invalidate on rules.d changesRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: always warn on console if invalidatedRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: Clean up message when cache is invalidatedRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: refactor sysconf generationRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: don't generate sysconf twiceRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: replace readfiles() with cmpRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-12-19udev-cache: stop race between sysconf and cache generationRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
2014-11-04udev: fix uevent-helper disableJohan Hovold
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. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-08-28meta: fix RDEPNEDS for the test related pkgsRobert Yang
Add bash, python or perl to the ptest pkgs to fix the RDEPENDS issues. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23udev-cache: parametrize sysconf file pathsRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23udev-cache: Don't ignore error messages from cache extractRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23udev-cache: omit sockets and filesystems mounted under /devRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23udev-cache: strip timestamps on extractRichard Tollerton
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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23udev-cache: choose a more descriptive cache filenameRichard Tollerton
"/etc/dev.tar.gz" doesn't adequately imply that udev-cache maintains it. Instead, call it "/etc/udev-cache.tar.gz". 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>
2014-08-23udev-cache: Compress the cacheRichard Tollerton
$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. Signed-off-by: Richard Tollerton <rich.tollerton@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-23udev-cache: Update cache tarball atomicallyRichard Tollerton
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. 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>
2014-08-23udev: fix /var/volatile/tmp permissionsRiku Voipio
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. Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15udev-extraconf: Unmount SD card after ejectionYasir-Khan
Adds udev rule to unmount SD card partitions in case of improper ejection from card reader. When SD card is ejected from card reader without being unmounted first, kernel does not generate a REMOVE event, instead it generates a CHANGE event(only if polling is enabled /sys/module/block/parameters/events_dfl_poll_msecs) and we don't have any udev rule in automount.rules to handle this event,so partitions never get unmounted. Unmounting of partitions can be done if udev rules handle this CHANGE event. Signed-off-by: Abbas Raza <Abbas_Raza@mentor.com> Signed-off-by: Yasir-Khan <yasir_khan@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03meta: fix no newline at end of fileRobert Yang
Add a '\n' to the last line of the file to fix: No newline at end of file Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25udev: remove udev-utils, add 'udevadm' to udev packageChen Qi
Previously, the udev package only RRECOMMENDS udev-utils package, but its init script in the udev package really relies on the 'udevadm' command to work properly. As a result, if 'NO_RECOMMENDATIONS' is set to '1', errors occur at system start-up. The udev-utils package only contains one file, that is /bin/udevadm. So it's better that we remove the udev-utils package and move the 'udevadm' command to the udev package. [YOCTO #6388] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25udev-cache.default: set PROBE_PLATFORM_BUS to "yes" by defaultDenys Dmytriyenko
Force probing of "platform" bus by default. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-25udev: update init script for conditional probing of platform busDenys Dmytriyenko
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. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-20udev-extraconf: fix the misuse of /run/mediaChen Qi
The error was introduced by the following commit. acfe3014d41de5e87cdbc58d0396349c6b9c3ffd udev-extraconf: update mount.sh to use /run/media instead of /media It accidently replaced 'device/media' by 'device/run/media' which causes error for live images to be unable to boot up correctly, complaining "Cannot find rootfs.img in /media/*". This patch fixes the above problem. 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>
2014-04-25Upstream-Status CleanupsSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25bumps to remove PRINC use in meta-fsl-ppcChunrong Guo
Signed-off-by: Chunrong Guo <B40290@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25udev-extraconf: update mount.sh to use /run/media instead of /mediaDenys Dmytriyenko
This is done to work around the issue of auto-mounting block devices (i.e. SD cards) when root filesystem is still in read-only mode and creating /media/<device> mount-points by udev is not possible. That is due to udev (/etc/rcS.d/S03udev) getting started earlier than checkroot (/etc/rcS.d/S10checkroot.sh) gets a chance to re-mount the rootfs as read-write. Although, canonical FHS specifies /media/<device> as a mount point for removable media devices, the latest 2.3 version was released in 2004 and since then FreeDesktop/udisks and other tools adopted the new /run/media/<user>/<device> location. That was done to overcome read-only rootfs limitation, since /run is usually a tmpfs mounted partition, plus avoid name-clash between users. For our embedded systems environment we assume single-user operation and hence simplify mount point to just /run/media/<device>. But for proper per-user mounting to /run/media/<user>/<device>, some sort of session management is required along with the tool like udisks, that is out of scope of this simple udev-based auto-mounting. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25Globally replace oe.utils.contains to bb.utils.containsOtavio Salvador
BitBake has the exact same code as oe.utils.contains so there's no reason to duplicate it. We now rely on the bb.utils.contains code for metadata. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24PR bumps to remove PRINC use in meta-openpliMike Looijmans
Resolves warnings of this kind in the OpenPLi layer: WARNING: Use of PRINC * was detected in the recipe * Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07PR bumps to remove PRINC use in meta-fsl-armOtavio Salvador
Those recipes need PR bump so we drop PRINC from meta-fsl-arm layer. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05recipes: bump PRsMartin Jansa
* resolves following warnings: WARNING: Use of PRINC 17 was detected in the recipe meta-openembedded/meta-systemd/recipes-core/systemd/systemd-machine-units_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_0.12.10.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_git.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-oe/recipes-multimedia/mplayer/mplayer-common.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe meta-smartphone/meta-android/recipes-bsp/chroot-script/chroot-script_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-connectivity/bind/bind_9.8.1.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-core/systemd/systemd-serialgetty.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/screen/screen_4.0.3.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/shadow/shadow_4.1.4.3.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb (or one of its .bbappends) WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-support/libcap/libcap_2.22.bb (or one of its .bbappends) WARNING: Use of PRINC 11 was detected in the recipe openembedded-core/meta/recipes-bsp/keymaps/keymaps_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 11 was detected in the recipe openembedded-core/meta/recipes-core/systemd/systemd-compat-units.bb (or one of its .bbappends) WARNING: Use of PRINC 12 was detected in the recipe openembedded-core/meta/recipes-core/initscripts/initscripts_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 13 was detected in the recipe openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe meta-openembedded/meta-oe/recipes-navigation/navit/navit_svn.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-connectivity/portmap/portmap_6.0.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-extended/pam/libpam_1.1.6.bb (or one of its .bbappends) WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe meta-openembedded/meta-efl/recipes-efl/efl/entrance_svn.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe meta-openembedded/meta-oe/recipes-multimedia/mplayer/mplayer2_git.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-bsp/formfactor/formfactor_0.0.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-connectivity/avahi/avahi_0.6.31.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-connectivity/dhcp/dhcp_4.2.5-P1.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb (or one of its .bbappends) WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb (or one of its .bbappends) WARNING: Use of PRINC 5 was detected in the recipe meta-openembedded/meta-oe/recipes-core/meta/distro-feed-configs.bb (or one of its .bbappends) WARNING: Use of PRINC 5 was detected in the recipe openembedded-core/meta/recipes-connectivity/bluez/bluez4_4.101.bb (or one of its .bbappends) WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-core/packagegroups/packagegroup-base.bb (or one of its .bbappends) WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb (or one of its .bbappends) WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb (or one of its .bbappends) WARNING: Use of PRINC 7 was detected in the recipe meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb (or one of its .bbappends) WARNING: Use of PRINC 7 was detected in the recipe openembedded-core/meta/recipes-core/udev/udev-extraconf_1.0.bb (or one of its .bbappends) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28udev: fix typoChen Qi
Fix the typo in the RDEPENDS statement to make it have real effect. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02Update after toplevel LICENSE file checksum changeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-14udev: Add ptestAlexandra Safta
Install udev test suite and run it as a ptest. Signed-off-by: Alexandra Safta <alexandra.safta@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-11-20udev: remove extra -dev/-dbg packagesWenzong Fan
We don't support multiple -dbg/-dev packages, the package can generate them but the system does not correctly handle them. Just move all devel stuffs into 'udev-dev' and all debug stuffs into 'udev-dbg'. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-11-08sysvinit: adjust boot sequence and remove hack from udevChen Qi
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] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-31udev: fix typo in local.rulesSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-30udev: Update touchscreen rule for ID_INPUT_TOUCHSCREENTom Rini
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. Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-10-18udev: update local rules for new touchscreen deviceChase Maupin
* 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> Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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>