utils: Add hardlinkdir shell function

In a number of places it would be helpful to be able to copy trees of
files using hardlinks. This turns out to be harder than you'd expect
since there is no good single command that does this well and handles
all file types correctly.

Abstracting this into a function therefore makes sense, cpio seems
as good an option as any other.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc: Convert to use hardlinkdir

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libgcc: Spit out common code into libgcc-common.inc

Prepare the ground for the creation of libgcc-initial by splitting common
libgcc code into a libgcc-common.inc file.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc-cross: Improve handling of unwind.h

Rather than building the whole of libgcc to obtain the unwind.h header
file, simply configure it and then install the file. This avoids copying
chunks of data around when we don't need to and building the same thing
twice.

After doing this we need to make sure the target build directory exists
in the libgcc case since it will no longer be created automatically.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc-cross-initial: Separate out libgcc-initial

Its useful to separate out the native (cross) binaries from the target
compilation. We already do this for libgcc, this now takes the same
approach for -initial.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
connman: upgrade to 1.23

- License file copyright years updated;

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bluez5: upgrade to 5.18

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
harfbuzz: upgrade to 0.9.27

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
iproute2: upgrade to 3.14

- switched to ${BP} variable;
- removed parallel make restriction;

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssh: enable ptest support

Install openssh test-suite and run it as ptest.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Globally replace oe.utils.contains to bb.utils.contains

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>
Globally replace 'base_contains' calls with 'bb.utils.contains'

The base_contains is kept as a compatibility method and we ought to
not use it in OE-Core so we can remove it from base metadata in
future.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
opkg: Upgrade to v0.2.2

The patches for opkg have been rebased using git so that they apply cleanly onto
the new release.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bind: add support for read-only rootfs

This patch adds support for read-only rootfs to the bind service.
Basically it just bind mounts several directories so that the bind
service could start correctly without reporting any error.

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>
kernel: don't populate source symbolic link

/usr/src/kernel/source deployed by kernel-dev package is symbolically
linking to a build-time kernel source folder, which make no sense when
cross-compiling.

Fixed by not populating it at install stage.

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
files/device_table-minimal.txt: cleanup

This device list is only used if USE_DEVFS is set to '0' (which is NOT the default since 2013-12-14,
see commit f54fdd6673a136ee1cee1f3263a8a7820de43ca3) and if IMAGE_DEVICE_TABLE and IMAGE_DEVICE_TABLES are not set.

This is, of course a very subjective list but minimal with 62 (special) files.
However, you should be able to boot correctly a lot of embedded linux around.

Changes:
- add sda, sdb, sda[1234], sdb[1234]
- add mmcblk0, mmcblk0p[1234]
- add rtc0, rtc1
- restrict maximum hdaX from 19 to 4 (pata is old)
- add ttyS1
- remove initctl, apm_bios, tty8, ttySA
- sorted entries

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
udev-extraconf: update mount.sh to use /run/media instead of /media

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>
dbus: fix a hard dependency about dbus-ptest

If image contains dbus and ptest is in DISTRO_FEATURES, dbus-ptest package
is installed, regardless of whether ptest-pkgs is in IMAGE_FEATURES. This
issue will increase size for most small images.
This patch fixes this problem.

[YOCTO #5702]

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
initscripts: Fix PR reversal

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bumps to remove PRINC use in meta-fsl-ppc

Signed-off-by: Chunrong Guo <B40290@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>