Commit Graph

160 Commits

Author SHA1 Message Date
Martin Jansa 57bbedcfeb eudev: set LGPL-2.1+ for libudev package
(From OE-Core rev: d9430de1b8b40b5f6cba74de20ea2bf69667e64c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
Lauren Post 020e35cfd9 eudev: restore userspace firmware loading support
This sycncs eudev with systemd. This is required for old kernels to
work and does same backport as did in:

,----
| commit 31163abc7bedd477c1aad10e6d1f47dbee194513
| Author: Jonathan Liu <net147@gmail.com>
| Date:   Thu Mar 19 15:38:32 2015 +1100
|
|     systemd: restore userspace firmware loading support
|
|     This changes the minimum required Linux version from 3.7 back to 3.0.
|
|     [YOCTO #7409]
|
|     Signed-off-by: Jonathan Liu <net147@gmail.com>
|     Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
`----

(From OE-Core rev: d6b139ef1b52ee4842f8706c1b8b950cc50a3d54)

Signed-off-by: Lauren Post <lauren.post@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:12 +01:00
Alejandro Hernandez f35aa16f37 eudev: Upgrade to 3.2.1
(From OE-Core rev: 4b9f483c5164c3aad831580a43bbf3ee6a13eb8c)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:51 -08:00
Robert Yang 47a6b62312 eudev: set downloadfilename
Otherwise, the filename is v${PV}.tar.gz which isn't straightforward.

(From OE-Core rev: b3f8fa406fe7bf865379d9a3d26c8c19b58d1cff)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:51 -08:00
Ross Burton 1bebb5ea22 eudev: add RPROVIDES so eudev-hwdb provides udev-hwdb
Otherwise the common name udev-hwdb is only provided by systemd, meaning that
other recipes can't depend on a single name.

(From OE-Core rev: dea267d576695e23223a2f402f6c9c126b0413dc)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 22:06:53 +00:00
Jussi Kukkonen b22c6e0b09 eudev: Add PACKAGE_WRITE_DEPS for postinstall
Qemu is used to run udevadm in postinstall.

(From OE-Core rev: df239dd45f04198138a32443db0d3bcf4cf8b7b6)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-20 11:53:50 +00:00
Olaf Mandel 7e5b59d7af Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
Several recipes reference the LICENSE file in their LIC_FILES_CHKSUM
variable as ${COREBASE}/LICENSE. This forces distribution providers to
keep this file verbatim or to overload the affected recipes. The section
"Moving to the Yocto Project 1.6 Release" in the Yocto manual suggests
removing the LICENSE file where possible.

Remove LICENSE in cases where COPYING.MIT is also given and replace
LICENSE with COPYING.MIT if the former was the only entry. All modified
recipes specify LICENSE = "MIT" and none of the in-tree files specify a
different license either.

As the packages do not change (the license files are not contained in
them), do not increase PR.

(From OE-Core rev: 0059e0661826c857a07c862bcb46162671e0e330)

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-28 16:15:18 +01:00
Robert Yang fa7849939a eudev: don't move udev directory
The code did "mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir}"
which is not needed any more, eudev can work with ${base_libdir}/udev.

(From OE-Core rev: 5e26b3df04716010b31b4c7ac0ac6b28982784f3)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-24 07:30:09 +01:00
Richard Purdie 533315b747 eudev: Add missing pkgconfig dependencies
Building eudev from scratch in an sstate build results in configure errors
since the pkg-config macros can't be found. Add in a missing pkg-config
dependency using the appropriate class to avoid such failures.

(From OE-Core rev: 6b527bbfea5088c20da98cd72abe5caa4b399787)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-14 22:22:12 +01:00
Alejandro Hernandez 3411d2d466 eudev: upgrade to 3.2
(From OE-Core rev: 8ca00c9e25335121129f26480ed229dacde0a7c8)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:15 +01:00
Robert Yang e3eaef7f22 eudev: remove eudev-hwdb from RRECOMMENDS_eudev
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.

(From OE-Core rev: dfb2dc45943d64f3d6da84c0d7b99ac5254fc738)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17 14:43:30 +01:00
Ross Burton 1108bee72c eudev: add PACKAGECONFIG for hwdb
Some users may not want the hwdb at all, so add a PACKAGECONFIG option to
disable building it entirely.

(From OE-Core rev: 7006d3084bd4d6aab2ca64d052df3a014abaf813)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06 10:31:15 +01:00
Alejandro Hernandez 6129d8655d eudev: split eudev-hwdb from eudev
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

(From OE-Core rev: 20038e0e13685ebc6fcbbbb2d96695670e33e3e3)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:26 +00:00
Maxin B. John 57fb05a5a3 eudev: provide UPSTREAM_CHECK_URI
Provide UPSTREAM_CHECK_URI to perform checkpkg task.

(From OE-Core rev: b5fd08bd3836ff7a63d5340bfef40a3ba65d8f0a)

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>
2016-03-11 16:50:44 +00:00
Ross Burton 5346675377 eudev: remove redundant udev_run assignment
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.

(From OE-Core rev: 779259192c0d1687e5e82dbc8e45c33b29ae0588)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 16:58:11 +00:00
Andre McCurdy c12e919534 eudev: recipe formatting improvements
Formatting improvements only, no functional changes.

(From OE-Core rev: d32ed5dd1dcadf206162b823bcb2f539e0ff5ad3)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 10:49:00 +00:00
Alejandro Hernandez 3e5e540513 eudev: Replaces udev with eudev for compatibility when using sysvinit on newer kernels
udev has started to fail on new kernels (4.4), due to being deprecated in favor
of systemd's udev implementation. To maintain a sysvinit alternative we also
need to provide an alternative to udev. Eudev is a fork of systemds udev,
this new eudev recipe provides upstream udev 220 funcitonality.

  - Removes patches that dont apply anymore
  - ToDo: eudev-ptest?

[YOCTO #8998]

(From OE-Core rev: a22797f7c37a865420837b5c29b270f73ee4c6ce)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02 22:39:43 +00:00
Saul Wold b80219eac1 udev: Add 2 patches to support 4.4 kernel
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>
2016-01-20 17:07:16 +00:00
Jens Rehsack db4376ed64 udev-extraconf: introduce multiple blacklist files for more complex setups
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.

(From OE-Core rev: 95fced137a46dc98863fe5af7be5cbce708602f2)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-06 15:27:34 +00:00
Richard Purdie e0890b662e meta: Drop now pointless manual -dbg packaging
With the autodebug package generation logic, specifically setting FILES_${PN}-dbg
isn't needed in most cases, we can remove them.

(From OE-Core rev: 3ab59d49dd7c18e194b58d1248b4b87709b5a738)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-16 11:56:30 +00:00
Andreas Müller b25af33734 udev: add PROVIDES = "libgudev"
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.

(From OE-Core rev: e11801d031896351364e7723db3392012f58b603)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-07 00:11:20 +01:00
Ross Burton 1c914a844b meta: Fix Upstream-Status statements
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>
2015-09-12 23:01:53 +01:00
Ken Sharp 9686a10207 udev-cache: improve error handling
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>
2015-04-28 07:56:55 +01:00
Ken Sharp c62828e0c7 udev-cache: Remove unnecessary tar read from stdin
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>
2015-04-28 07:56:55 +01:00
Bryan Evenson ca2948a1d4 udev: Add RCONFLICTS/RREPLACES for udev-utils
As of commit 9bb5c74729, 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.

(From OE-Core rev: 3a457cd2c5c9abf1b3aa622edbcc689d88b1c4ac)

Signed-off-by: Bryan Evenson <bevenson@melinkcorp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-21 07:20:23 +01:00
Javier Viguera 740770c009 udev: remove 'modprobe' local rule
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>
2015-03-20 23:56:02 +00:00
Andre McCurdy 8754c8a9bf udev: remove obsolete dependency on acl
udev_acl was removed from udev in v182.

(From OE-Core rev: 060057d1aa769cefcea5928594927bc60901c804)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 15:36:51 +00:00
Andre McCurdy 693d455b11 udev: fix missing dependency on glib-2.0-native
udev compile requires glib-genmarshal and glib-mkenums

(From OE-Core rev: 215f06b746d0194e8b6221b1c23ca7c2cf5c6664)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 15:36:51 +00:00
Chen Qi 14ef8b98bb udev-cache: avoid using '-L' for stat
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>
2015-01-29 15:36:50 +00:00
Max Krummenacher 57351e90ba udev: don't keep ptest testdata laying around
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>
2015-01-29 15:36:49 +00:00
Max Krummenacher 0d5ac1a1de udev: fix ptest rule syntax check
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>
2015-01-29 15:36:49 +00:00
Petter Mabäcker 4eb3db9a2c meta: set proper S value
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]

(From OE-Core rev: 9d220b1bfe4589736604dd5a7129e3699377d830)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:36:27 +00:00
Richard Tollerton 02e11ceeaa udev-cache: refactor conditionals and error handling
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>
2014-12-19 18:08:02 +00:00
Richard Tollerton 408baa9903 udev-cache: Update cache asynchronously
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton 88c184a9bf udev-cache: invalidate on rules.d changes
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton 7c522ced96 udev-cache: always warn on console if invalidated
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton 8b0be8018a udev-cache: Clean up message when cache is invalidated
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton 0002d46e78 udev-cache: refactor sysconf generation
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton c6e8f075a9 udev-cache: don't generate sysconf twice
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton 7f8634cc90 udev-cache: replace readfiles() with cmp
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>
2014-12-19 18:08:01 +00:00
Richard Tollerton 24a159e169 udev-cache: stop race between sysconf and cache generation
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>
2014-12-19 18:08:01 +00:00
Johan Hovold 56fa8cdbf1 udev: fix uevent-helper disable
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>
2014-11-04 10:27:10 +00:00
Robert Yang 1087a18524 meta: fix RDEPNEDS for the test related pkgs
Add bash, python or perl to the ptest pkgs to fix the RDEPENDS issues.

(From OE-Core rev: d081a85fc76e2b7a469c6c70175ecf7aed9de053)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-28 15:12:44 +01:00
Richard Tollerton fd0aa6af62 udev-cache: parametrize sysconf file paths
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>
2014-08-23 23:01:59 +01:00
Richard Tollerton 7c56a5e728 udev-cache: Don't ignore error messages from cache extract
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>
2014-08-23 23:01:59 +01:00
Richard Tollerton ab5c95ffbf udev-cache: omit sockets and filesystems mounted under /dev
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>
2014-08-23 23:01:59 +01:00
Richard Tollerton 79f5a3bc58 udev-cache: strip timestamps on extract
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>
2014-08-23 23:01:59 +01:00
Richard Tollerton bcab1f832f udev-cache: choose a more descriptive cache filename
"/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>
2014-08-23 23:01:58 +01:00
Richard Tollerton 8c423bf995 udev-cache: Compress the cache
$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>
2014-08-23 23:01:58 +01:00
Richard Tollerton bd7fb7c3ca udev-cache: Update cache tarball atomically
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>
2014-08-23 23:01:58 +01:00