Age | Commit message (Collapse) | Author | Files |
|
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The eudev-hwdb needs 12M after install, this made small images like
core-image-minimal much biggher than before, and may also hurt the
devices which use udev, so remove it RRECOMMENDS_eudev by default.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Some users may not want the hwdb at all, so add a PACKAGECONFIG option to
disable building it entirely.
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The eudev recipe included the hwdb.d directory by default,
which ended up making the eudev package a lot heavier than
the old udev, this patch splits the eudev-hwdb package to
avoid using unecessary space when required
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Provide UPSTREAM_CHECK_URI to perform checkpkg task.
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The path isn't correct as we use /run/udev now, also /run/udev is the default
value, and eudev doesn't let you override it like this anyway.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Formatting improvements only, no functional changes.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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 <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
In cases where a target image wants prevent the recovery partition is mounted
automatically, but the recovery partition identifier moves with the device
(internal flash, sd card, usb stick, ...), device/machine dependend extra
blacklists might be desired.
The grep utility prints the file name for each match when there is more
than one file to search. Add -h to suppress the prefixing of file names
on output.
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
With the autodebug package generation logic, specifically setting FILES_${PN}-dbg
isn't needed in most cases, we can remove them.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
With the last update of systemd libgudev was splitted out of systemd. To make
packages depending on libgudev happy, a recipe building libgudev was created in
meta-oe and the dependencies were modified from udev to libgudev.
This works fine for distros using systemd as init system, but distros not using
build udev which provides libgudev.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fix a variety of problems such as typos, bad punctuations, or incorrect
Upstream-Status values.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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.
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>
|
|
xargs already formats the inputs to tar correctly, so the
'-T -' argument to tar is unnecessary.
Signed-off-by: Ken Sharp <ken.sharp@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
As of commit 9bb5c7472958aeea46225e835f44d45bea7f7351, the
udev-utils package no longer exists with udev taking ownership
of udevadm. However, systems that had udev-utils installed have
a conflict with udev.
Add RCONFLICTS and RREPLACES variables for udev-utils so udev-utils
will be removed from systems that are upgrading udev. This change
would be applicable for master back through dizzy when the problem
was introduced.
Signed-off-by: Bryan Evenson <bevenson@melinkcorp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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}"
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
udev_acl was removed from udev in v182.
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
udev compile requires glib-genmarshal and glib-mkenums
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
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
Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The ptest which checks for correct udev rules fails.
Missing files and paths for the build host caused this.
Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
After removal of auto-creating S we must ensure that all recipes are
using a proper value for S.
Fix all recipes that only need to set S equals to WORKDIR.
[YOCTO #5627]
Signed-off-by: Petter Mabäcker <petter@technux.se>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
"/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>
|
|
$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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Force probing of "platform" bus by default.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Chunrong Guo <B40290@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|