default-distrovars: Add DISTRO_FEATURES_INITMAN to DISTRO_FEATURES

This is a more generic way to set the init manager since we
plan to support other init managers as well.
I will use this variable as a switch to turn on/off any
init scheme that we might support in the future.
By default we use sysvinit.

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
default-providers: Automatically set PREFERRED_PROVIDER_udev

This is a more generic way to set preferred provider for udev.
We expect to have multiple choices once we integrate other init
managers, and this way we can automatically set it considering
distro settings.

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dbus: respect systemd distro feature

Only configure for systemd if we are using systemd, and remove the dbus-systemd
package by putting the service files into PN itself.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: add systemd recipes

Add systemd recipes and associated support recipes.

Mostly based on meta-oe/meta-systemd, so almost all credit should go to:

Andreas Müller <schnitzeltony@googlemail.com>
Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Holger Hans Peter Freyther <holger@moiji-mobile.com>
Khem Raj <raj.khem@gmail.com>
Koen Kooi <koen@dominion.thruhere.net>
Martin Jansa <Martin.Jansa@gmail.com>

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
default-providers: Add systemd option to PREFERRED_PROVIDER_udev

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagegroup-core-boot: install systemd-compat-units on systemd images

systemd-compat-units is needed to run postinsts for example.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
update-rc.d: disable update-rc.d.bbclass when systemd enabled

update-rc.d is not necessary when systemd is enabled,
systemctl is the replacement

Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
base-files: add fstab for systemd based systems

The default fstab has entries which are not necessary
in systemd based systems so add a simpler default in
this case.

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagegroup-core-boot: only install initscripts if we're using sysvinit

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libpam: register PAM session with logind

This make screen/tmux/etc work as intended.

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CC

kernel compiler is not special and we currently have it so
we want to pass -march and -mtune options as CFLAGS to kernel
build so that compiler picks the right subarch flags when
compiling assembly files in particular. Otherwise defaults
are chosen which may not be right in many case e.g. when
compiling kernel for collie machine we should use arch=armv4
but it uses toolchain/as defaults which is armv5te

in some case e.g. thumb1 we know that kernel can not be compiled
in thumb1 mode so we can provide that information e.g. -marm
option through KERNEL_HOST_CC_ARCH variable as we do now

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
consolekit_0.4.5.bb: Package unpackaged systemd files

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-yocto/3.4: update to 3.4.26 and 3.4.25-rt37

Updating the yocto 3.4 kernel tree to the 3.4.25 and 3.4.26 -stable updates
as well as refreshing the preempt-rt branches to 3.4.25-rt37.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-yocto/3.4: update intel graphics features/configs

Updating the meta branch to import the following commits that cleanup and
reorganize the features that make up the graphics features of the Intel
BSPs

  c0b3904 meta: add config fragment for gma600 graphics driver
  f41638f meta: add config fragment for gma500 graphics driver
  ff8ad3e meta: sys940x: drop vesa fragment from bsp config
  fcb82ac meta: sys940x: remove emgd config from bsp config
  c1677bb meta: fri2: drop vesa fragment from bsp config
  7324440 meta: fri2: remove emgd config from bsp config
  dd435c6 meta: emenlow: drop vesa fragment from bsp config
  243b515 meta: emenlow: remove emgd config from bsp config
  3e1be82 meta: crownbay: drop vesa fragment from bsp config
  fc5ed4e meta: crownbay: remove emgd config from bsp config
  d46236b meta: drm-emgd.cfg: add configs for dependent routines
  db4bc5e meta: relocate git-merge of emgd branch

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: replace AUTOINC directly in PKGV

b27b438221e16ac3df6ac66d761b77e3bd43db67 introduced a regression when
PKGV is modified by the recipe.  E.g. when having something like

| PV = "1.7.33+gitr${SRCPV}"
| PKGV = "1.7.33+gitr${GITPKGV}"
| RDEPENDS_${PN}-subpkg += "${PN} (= ${EXTENDPKGV})"
| inherit gitpkgv

The resulting core package has

| Version: 1.7.33+git234+cd01e8c-r11

and because the subpackage has

| Depends: vdr (= 1.7.33+git0+cd01e8c18d494150730214f033f84e5282ce7639-r11)

image build fails with

|  * satisfy_dependencies_for: Cannot satisfy the following dependencies ...
|  *    vdr (= 1.7.33+git0+cd01e8c18d494150730214f033f84e5282ce7639-r11)

Patch avoids the 'PKGV = "cleanup(${PV})"' operation and replaces
AUTOINC directly within PKGV.  This might introduce a regression too
when 'AUTOINC' is added to PKGV intentionally but impact is small and
can be fixed trivially by using another string.

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Cc: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk_base.bbclass: Work around bugs with gnu tar < 1.24

The gnu tar versions less than 1.24 pose a problem with the SDK
extraction.  A typical SDK will have hard links.  The SDK is created
with a newer version of tar but extracted with the host version of tar
which may be much older.  The specific defect is that older version of
gnu tar do not properly handle the "--strip-components=" argument when
processing hard links and the paths do not get properly truncated and
hooked up with the corresponding real file payloads.  This leads to
errors like the following during the SDK install:

tar: sysroots/qemux86-yocto-linux/usr/bin/getconf: Cannot hard link to `./opt/yocto/SDK-qemux86/sysroots/qemux86-yocto-linux/usr/bin/POSIX_V6_ILP32_OFFBIG': No such file or directory

The simple way to work around the problem is to just not save the path
information that is going to get chopped off anyway.  This has the
added benefit that it saves a small amount of space in the tar archive
as well.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dropbear: Deal with truncated host keys by removing them

Dropbear does not start when the host key is empty and it is possible
that a device is switched off before the host key is generated. This
is possible because the dropbearkey code doesn't create a temporary
file first. Detect truncated keys and then remove them which will lead
to the re-generation. This way the dropbear process will always start.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Fix shlibs cross package-arch contamination

I found that if I had two packages architectures built (say core2 and i586),
that the shlibs data from i586 was being used in the core2 build. This
lead to odd dependency issues if the i586 build was out of date and core2
was being targetted.

When loading shlibs files, the last loaded wins so we need to iterate the
lists from least to strongest weighting, not the other way around. With this
patch applied, the contamination issue is resolved.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
liburi-perl: Add BBCLASSEXTEND for native version

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libtool-cross: Add missing libltdl components to install

Without this some software fails to build complaining it can't find these
utilities.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>