]> code.ossystems Code Review - openembedded-core.git/log
openembedded-core.git
9 years agoirda-utils: Weak Define the build TARGETS
Khem Raj [Mon, 31 Aug 2015 06:17:20 +0000 (06:17 +0000)]
irda-utils: Weak Define the build TARGETS

This will help one to disable the targets via bbappends if needed
e.g. musl can not compile irdaping since it uses includes
net/if_packet.h, which (on GLIBC) only defines struct sockaddr_pkt but
not in other libc e.g. musl that makes irdaping specific to glibc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agobjam-native: build and install bjam.debug
Wenzong Fan [Tue, 4 Aug 2015 02:33:11 +0000 (10:33 +0800)]
bjam-native: build and install bjam.debug

bjam is stripped by default, this causes QA warning while stripping it
from do_populate_sysroot():

  WARNING: File '.../tmp/sysroots/x86_64-linux/usr/bin/bjam' \
    from bjam-native was already stripped, \
    this will prevent future debugging!

The JAM scripts allow to build unstripped version with '--debug'. Just
build and install the bjam.debug to stop bjam from being stripped in
compile step.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agogcc-5.2: remake 0040-nativesdk-gcc-support.patch
Robert Yang [Wed, 9 Sep 2015 07:08:15 +0000 (00:08 -0700)]
gcc-5.2: remake 0040-nativesdk-gcc-support.patch

It couldn't be applied by sled11's patch, now fix it.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agobind: fix compile failure when building path is long
Chen Qi [Wed, 9 Sep 2015 05:40:03 +0000 (13:40 +0800)]
bind: fix compile failure when building path is long

Fix the building path is long, when building bind, we would meet the following
error.

    ".../long/path/to/bind/9.10.2-P3-r0/bind-9.10.2-P3/lib/dns" too long

This is because the in gen.c, DIRNAMESIZE is limited to 256. But in OE, the
path length limit is more than 400. So we change it to 512.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agosstate: only fetch remote signatures if verification is enabled
Ross Burton [Wed, 9 Sep 2015 12:35:05 +0000 (13:35 +0100)]
sstate: only fetch remote signatures if verification is enabled

Only fetch remote signatures if verification has been enabled, as otherwise the
fetcher throws errors that sstate.bbclass can't ignore.

[ YOCTO #8265 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoRevert "boot-directdisk.bbclass: use rootfs UUID by default"
Patrick Ohly [Wed, 9 Sep 2015 12:31:30 +0000 (14:31 +0200)]
Revert "boot-directdisk.bbclass: use rootfs UUID by default"

This reverts commit 8ca8e2e5bf4a9f01dc48300149a8e1d71d715400.

Further testing showed the kernel does not support root=UUID; it is
something typically handled by the initramfs.

Because boot-directdisk.bbclass cannot know whether it is using a
suitable initramfs, root=UUID cannot be the default. Instead, it will
have to be set in image recipes on a case-by-case basis.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoptest: fix file ownerships in ${PTEST_PATH}
Ross Burton [Tue, 8 Sep 2015 23:15:32 +0000 (00:15 +0100)]
ptest: fix file ownerships in ${PTEST_PATH}

As most upstreams don't have installable test suites it's fairly common to copy
files directly out of a source tree for ptests, but this results in files in the
recipe being owned by the user running bitbake:

  WARNING: QA Issue: .../sed/4.2.2-r0/packages-split/sed-ptest/usr/lib64/
  sed/ptest/testsuite/bug-regex21 is owned by uid 1000, which is the same
  as the user running bitbake. This may be due to host contamination
  [host-user-contaminated]

Instead of needing to fix this in every recipe that has this problem simply
chown the files to root:root in do_install_ptest_base.

Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agorunqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot
Leonardo Sandoval [Tue, 14 Jul 2015 20:07:12 +0000 (20:07 +0000)]
runqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot

At least the OVFM (UEFI Firmware for Qemu and KVM) recipe stores the BIOS
under $OE_TMPDIR/sysroots/$MACHINE, now defined as OECORE_MACHINE_SYSROOT.
The latter is used when searching BIOS, VGA BIOS and keymaps. As a example,
to boot a OVFM BIOS, one can run the following command:

$ runqemu qemux86-64 core-image-minimal \
    biosdir=usr/share/ovmf  \
    biosfilename=bios.bin \
    nographic

Note the bios* parameters: these two are needed to specify the subfolder
(parent folder is OECORE_MACHINE_SYSROOT) and BIOS filename (without it,
it picks a BIOS named bios-256k.bin).

[YOCTO #5654]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agognome-icon-theme: remove the recipe
Alexander Kanavin [Mon, 31 Aug 2015 13:24:19 +0000 (16:24 +0300)]
gnome-icon-theme: remove the recipe

It is not used by anything in oe-core and will be moved to meta-gnome

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agopcmanfm: add an icon theme dependency
Alexander Kanavin [Fri, 4 Sep 2015 12:21:00 +0000 (15:21 +0300)]
pcmanfm: add an icon theme dependency

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agooeqa: Test failure/cleanup improvements
Richard Purdie [Fri, 4 Sep 2015 15:59:38 +0000 (16:59 +0100)]
oeqa: Test failure/cleanup improvements

Currently, if qemu segfaults, the tests merrily continue trying to execute
which takes time for them to timeout and is a bit silly. Worse, no logs about
the segfault are shown to the user, its silent!

This patch tries to unravel the tangled web of issues and ensures that we:

* install a SIGCHLD handler which tells the user qemu exited
* check if qemu is running, if it isn't fail the test outright
* don't leave processes behind in sshcontrol which would hold
  bitbake.lock and block shutdown

(From OE-Core rev: 77e9363feba53b72429154be5713c46b007ae0a4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoperf: fix the install-python_ext
Roy Li [Wed, 26 Aug 2015 05:58:17 +0000 (13:58 +0800)]
perf: fix the install-python_ext

1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and
can not compare with 0, this fixes that python module never are installed.

2. python library is installed into /usr/lib/ by default, but we expect
it is installed into ${libdir}, so add --install-lib parameter for python
setup.py to set the library dir;
this fixes not shipped warning, since python modules are installed into
/usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is
/usr/lib64/ for 64bit machine

3. the makefile target install-python_ext is moved from Makefile to
Makefile.perf from linux v3.13, so match install-python_ext in Makefile.*
and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target
python library to native sysroot, so replace it with --prefix as after linux
3.13;
this fixes not shipped warning, and install target files to native dir, like
below:
ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package:
  /home
  /home/pokybuild
  /home/pokybuild/yocto-autobuilder
  /home/pokybuild/yocto-autobuilder/yocto-worker
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so
  /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agopackagegroup-core-nfs: provide the nfs-client IMAGE_FEATURES
Roy Li [Tue, 8 Sep 2015 09:33:02 +0000 (17:33 +0800)]
packagegroup-core-nfs: provide the nfs-client IMAGE_FEATURES

provide the nfs-client IMAGE_FEATURES, to ease a user to only
install nfs client related files to image

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agogstreamer1.0: Fix QoS/lateness checking if subclass implements prepare/prepare_list...
Yuqing Zhu [Fri, 21 Aug 2015 14:29:54 +0000 (22:29 +0800)]
gstreamer1.0: Fix QoS/lateness checking if subclass implements prepare/prepare_list vfuncs

In function gst_base_sink_chain_unlocked(), it should calculate jitter based
on current media clock, rather than just passing 0.
Or it will drop all the frames when rewind in slow speed, such as -2X.

Signed-off-by: Yuqing Zhu <b54851@freescale.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agogstreamer1.0: Fix sticky events haven't been sent out when active track reach EOS
Yuqing Zhu [Fri, 21 Aug 2015 14:29:53 +0000 (22:29 +0800)]
gstreamer1.0: Fix sticky events haven't been sent out when active track reach EOS

EOS event hasn't been sent to down-element. The resolution is block EOS event
of inactive pad, sending the event after the pad actived.

Signed-off-by: Yuqing Zhu <b54851@freescale.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoexternalsrc.bbclass: better filtering of cleandirs
Markus Lehtonen [Tue, 8 Sep 2015 10:36:40 +0000 (13:36 +0300)]
externalsrc.bbclass: better filtering of cleandirs

We really do not want our (external) source tree to be removed. There
might be multiple values in the 'cleandirs' varflag pointing to our
source tree - causing it to be wiped out. This patch improves the
filtering of 'cleandirs' by examining the expanded values inside it. Any
(expanded) values pointing to our source tree get removed.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agobuildstats: Outputs 'task recipe elapsed-time' from each buildstats' recipe
Leonardo Sandoval [Sun, 30 Aug 2015 19:16:07 +0000 (19:16 +0000)]
buildstats: Outputs 'task recipe elapsed-time' from each buildstats' recipe

Given a 'buildstats' path (created by bitbake when setting
USER_CLASSES ?= "buildstats" on local.conf) and task names, outputs
'<task> <recipe> <elapsed time>' for all recipes. Elapsed times are in
seconds, and task should be given without the 'do_' prefix.

Some useful pipelines

1. Tasks with largest elapsed times

    $ buildstats.sh -b <buildstats> | sort -k3 -n -r | head
    do_compile perl-5.20.0-r1 221.82
    do_configure gettext-native-0.19.4-r0 140.34
    do_compile openssl-native-1.0.2a-r0 107.48
    do_compile openssl-1.0.2a-r0 102.10
    do_configure perl-native-5.20.0-r0 90.70
    do_configure gettext-0.19.4-r0 88.17
    do_compile gcc-cross-i586-4.9.2-r0 83.98
    do_configure m4-native-1.4.17-r0 83.44
    do_compile qemu-native-2.2.0-r1 71.69
    do_compile glibc-2.21-r0 60.88

2. Min, max, sum per task

    $ buildstats.sh | datamash -t' ' -g1 min 3 max 3 sum 3 | sort -k4 -n -r
    do_configure 0.03 140.34 1968.66
    do_compile 0.01 221.82 1664.44
    do_install 0.03 40.31 330.45
    do_populate_sysroot 0.11 34.45 229.23
    do_unpack 0.01 36.1 193.54
    do_patch 0.01 9.2 62.07
    do_fetch 0.01 6.66 32.13
    do_populate_lic 0.09 1.65 30.7

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agodevtool: make plugin_init optional
Ed Bartosh [Sun, 30 Aug 2015 16:33:19 +0000 (19:33 +0300)]
devtool: make plugin_init optional

So far all devtool and recipetool plugins were expected
to have plugin_init function. This function is empty in
most of plugins as they don't require initialisation.

Making plugin_init optional would allow not having empty
plugin_init in every plugin.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agognu-efi: Make setjmp.S portable to ARM
Wenzong Fan [Mon, 7 Sep 2015 02:19:51 +0000 (22:19 -0400)]
gnu-efi: Make setjmp.S portable to ARM

This patch fixes the following error:

  .../lib/arm/setjmp.S:18: Error: unrecognized symbol type ""
  .../lib/arm/setjmp.S:26: Error: unrecognized symbol type ""

The problem is the assembly syntax that is used is not portable to ARM,
where the '@' symbol is a comment:

  > Note on targets where the @ character is the start of a comment
  > (eg ARM) then another character is used instead. For example the
  > ARM port uses the % character.

(From https://sourceware.org/binutils/docs-2.25/as/Section.html#Section)

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agoscripts: Move BUILDDIR chmod fix after checks in oe-setup-builddir
Alex Franco [Fri, 4 Sep 2015 20:38:29 +0000 (15:38 -0500)]
scripts: Move BUILDDIR chmod fix after checks in oe-setup-builddir

Makes more sense to have this fix after checking BUILDDIR exists, is
a directory and is writable.

[YOCTO #7669]

Signed-off-by: Alex Franco <alejandro.franco@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agogsettings-desktop-schemas: add a recipe from meta-gnome
Alexander Kanavin [Wed, 10 Jun 2015 12:41:50 +0000 (15:41 +0300)]
gsettings-desktop-schemas: add a recipe from meta-gnome

gsettings-desktop-schemas is a dependency of epiphany

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agognome-desktop3: add a recipe from meta-gnome
Alexander Kanavin [Wed, 10 Jun 2015 12:41:30 +0000 (15:41 +0300)]
gnome-desktop3: add a recipe from meta-gnome

gnome-desktop3 is a dependency of epiphany

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agolibwnck3: add a recipe from meta-gnome
Alexander Kanavin [Wed, 10 Jun 2015 12:41:14 +0000 (15:41 +0300)]
libwnck3: add a recipe from meta-gnome

libwnck is a dependency of epiphany

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agogcr: add a recipe from meta-gnome
Alexander Kanavin [Thu, 4 Jun 2015 10:17:51 +0000 (13:17 +0300)]
gcr: add a recipe from meta-gnome

gcr is a dependency of epiphany

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agop11-kit: add a recipe from meta-oe
Alexander Kanavin [Thu, 4 Jun 2015 10:19:15 +0000 (13:19 +0300)]
p11-kit: add a recipe from meta-oe

p11-kit is a dependency of gcr (which is a dependency of epiphany)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agolibwebp: add a recipe from meta-oe
Alexander Kanavin [Thu, 4 Jun 2015 10:18:45 +0000 (13:18 +0300)]
libwebp: add a recipe from meta-oe

libwebp is a dependency of webkit.

Upgrade to 0.4.3, add COPYING to license checksum, and use the newly added
options in PACKAGECONFIG.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agolibsecret: add a recipe from meta-gnome
Alexander Kanavin [Thu, 4 Jun 2015 10:18:03 +0000 (13:18 +0300)]
libsecret: add a recipe from meta-gnome

libsecret is a dependency of webkit

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agoruby: add a recipe from meta-ruby
Alexander Kanavin [Thu, 4 Jun 2015 10:17:31 +0000 (13:17 +0300)]
ruby: add a recipe from meta-ruby

Ruby is required to build webkit.

Use trim_version() to build the major release, and remove redundant S assignment
(RB).

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agolibyaml: add a recipe from meta-oe
Alexander Kanavin [Thu, 4 Jun 2015 10:19:03 +0000 (13:19 +0300)]
libyaml: add a recipe from meta-oe

libyaml is a dependency of ruby

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
9 years agowic-image-minimal: add wic image recipe and .wks
Ed Bartosh [Wed, 19 Aug 2015 14:29:53 +0000 (17:29 +0300)]
wic-image-minimal: add wic image recipe and .wks

Added example of recipe and .wks file to create partitioned image.

This image is using quite complex partitioning scheme.
It uses its own rootfs to populate two partitions in two different ways.
It also uses core-image-minimal rootfs to populate another partition.

This is how wic reports about artifacts used to create this image:
  ROOTFS_DIR: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/core"]: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs
  ROOTFS_DIR["/backup"]: tmp/work/qemux86_64-poky-linux/wic-image-minimal/1.0-r0/rootfs
  BOOTIMG_DIR: tmp/sysroots/qemux86-64/usr/share
  KERNEL_DIR: tmp/deploy/images/qemux86-64
  NATIVE_SYSROOT: tmp/sysroots/x86_64-linux

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agosanity.bbclass: remove abspath warning for SSTATE_MIRRORS
Christopher Larson [Wed, 26 Aug 2015 04:41:52 +0000 (21:41 -0700)]
sanity.bbclass: remove abspath warning for SSTATE_MIRRORS

The sstate URI is relative to begin with, so it's completely valid to want to
alter it in a way that keeps it relative using a mirror, and I have real world
cases where this is causing issues. Remove the warning.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agooeqa/runtime/date: stop systemd-timesyncd during test
Ross Burton [Wed, 9 Sep 2015 20:05:26 +0000 (21:05 +0100)]
oeqa/runtime/date: stop systemd-timesyncd during test

There's a race between systemd-timesyncd manipulating the system time (with NTP
lookups) and the test case's time manipulation.  Prevent this by stopping
systemd-timesyncd for the duration of the test case.

Thanks to Khem Raj for root-causing this.

Signed-off-by: Ross Burton <ross.burton@intel.com>
9 years agosystemd: Implement OE-Specific systemd-sysv-install
Khem Raj [Sun, 6 Sep 2015 15:25:41 +0000 (15:25 +0000)]
systemd: Implement OE-Specific systemd-sysv-install

Support for chkconfig (--enable-chkconfig) was removed in favour of
calling an abstraction /lib/systemd/systemd-sysv-install. This
needs to be implemented for OE.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosystemd: Upgrade 219 -> 225
Khem Raj [Sun, 6 Sep 2015 15:25:40 +0000 (15:25 +0000)]
systemd: Upgrade 219 -> 225

Drop patches that were straight backports from upstream

MIT licence was unused and dropped from systemd sources
for more details see
https://github.com/systemd/systemd/commit/8f1e0c5f38cdf7e401ab4d2bb93ad816d08e7715

Drop gtkdoc dependency since libudev API documentation has been converted from gtkdoc into man pages
Remove packaging gudev as it has moved to separate repository outside
systemd

For more details see
https://github.com/systemd/systemd/commit/2375607039517c88df51ef16ddbb624ec1c10654

package newly added script for xorg to be usable with systemd --user
intance
For more details see
https://github.com/systemd/systemd/commit/1401ec2d34bcde406ced531a72dc46ebaf332594

machinectl now has shell support

private-zone DHCP options are supported by systemd-networkd

For complete differences between two releases run
git log --oneline v219..v225
in systemd git clone

Change-Id: I998e652382950a3c74c4839f3767ef8bef23d88f
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorootfs: Conditionally uninstall update-rc.d
Khem Raj [Sun, 6 Sep 2015 15:08:15 +0000 (15:08 +0000)]
rootfs: Conditionally uninstall update-rc.d

update-rc.d is now needed by systemd to interact with sysv
scripts, so if we have a mixed system, then we can not uninstall
update-rc.d as it is going to break systemd functionality, we check for
sysvinit and sytemd in distro and also ensure that its not building an
image with readonly rootfs

Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 years agoRevert "rootfs: Do not uninstall update-rc.d"
Richard Purdie [Thu, 10 Sep 2015 15:50:18 +0000 (16:50 +0100)]
Revert "rootfs: Do not uninstall update-rc.d"

This reverts commit acf90b6c299afe9e9c8fa33c3c6992bfcf40fbbf.

(Reverted to apply the better v2 of the patch)

9 years agoptest: use fakeroot for do_install_ptest_base
Ross Burton [Mon, 7 Sep 2015 17:31:39 +0000 (18:31 +0100)]
ptest: use fakeroot for do_install_ptest_base

The do_install_ptest_base task wasn't running in the fakeroot environment so
files installed by do_install_ptest were often not owned by root:root but the
user running the builds.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/sstatettests: Improve output of assert
Richard Purdie [Mon, 7 Sep 2015 19:24:28 +0000 (20:24 +0100)]
oeqa/sstatettests: Improve output of assert

Currently if this fails you see:

"AssertionError: 1 != 0"

which is useless. Add the output of the failed command so we can stand
some chance of debugging what went wrong.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobind: update to 9.10.2-p4
Armin Kuster [Mon, 7 Sep 2015 18:41:33 +0000 (11:41 -0700)]
bind: update to 9.10.2-p4

fixes two secruity issues:
CVE-2015-5722 and CVE-2015-5986.

see release notes for more information.
ftp://ftp.isc.org/isc/bind9/9.10.2-P4/RELEASE-NOTES.bind-9.10.2-P4.html

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoscreen: backport to fix build error
Kai Kang [Tue, 8 Sep 2015 08:15:12 +0000 (16:15 +0800)]
screen: backport to fix build error

It fails to compile screen rarely with:

|.../4.3.1-r0/screen-4.3.1/display.h:154:19: error: 'T_N' undeclared here (not in a function)
|   union tcu d_tcs[T_N]; /* terminal capabilities */
|                      ^

Macro T_N is defined in header file term.h but it may not be created
then fails. Backport patch to make sure term.h is created before compile
other source codes.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: fix running from a different directory
Paul Eggleton [Tue, 8 Sep 2015 10:39:15 +0000 (11:39 +0100)]
devtool: fix running from a different directory

Fixes the following error when running devtool from a directory other
than the build directory (or the SDK base path when using within the
extensible SDK):

  The BBPATH variable is not set and bitbake did not find a
  conf/bblayers.conf file in the expected location.
  Maybe you accidentally invoked bitbake from the wrong directory?

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add package plugin that lets you create package via devtool
Brendan Le Foll [Tue, 8 Sep 2015 10:39:14 +0000 (11:39 +0100)]
devtool: add package plugin that lets you create package via devtool

Enables creating packages using devtool within the extensible SDK. (This
is only enabled within the extensible SDK because it provides no
advantage over just running bitbake directly there).

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: update-recipe: add a warning when recipe is inside the workspace
Paul Eggleton [Tue, 8 Sep 2015 10:39:13 +0000 (11:39 +0100)]
devtool: update-recipe: add a warning when recipe is inside the workspace

If a recipe has been added to the workspace via "devtool add"
or "devtool upgrade" then the recipe file itself will be in the
workspace layer; if you run "devtool update-recipe" particularly in the
upgrade case you might think it would apply the upgrade to the original
recipe, but it will not - in order to remain consistent it has to update
the recipe that's in use which is the one in the workspace. Warn the
user in this situation so that they know what they need to do when they
are finished.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: update-recipe: better 'auto' mode
Markus Lehtonen [Tue, 8 Sep 2015 10:39:12 +0000 (11:39 +0100)]
devtool: update-recipe: better 'auto' mode

Enhance the logic behind the 'auto' mode a bit by only updating the
SRCREV if the changes are already found upstream. The logic is simple:
update SRCREV only if the current local HEAD commit is found in the
remote branch (i.e. 'origin/<branch_name>'). Otherwise resort to
patching.

This affects a couple of the oe-selftest tests so update those as well.

[YOCTO #7907]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: Allow disabling make parallelism on build command
Leonardo Sandoval [Tue, 8 Sep 2015 10:39:11 +0000 (11:39 +0100)]
devtool: Allow disabling make parallelism on build command

Through -s/--disable-parallel-make, the user can turn off parallelism
on the make tool. This can be useful when debuging race condition issues.
In order to set PARALLEL_MAKE = "" a post-config file created and then
passed into the build.

[YOCTO #7589]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: Create a single file for the build devtool feature
Leonardo Sandoval [Tue, 8 Sep 2015 10:39:10 +0000 (11:39 +0100)]
devtool: Create a single file for the build devtool feature

The intention is to have a single file for each devtool feature
so devtool can grow in a modular way. In this direction, this patch creates
build.py, moving all related build features from standard.py to build.py.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add upgrade feature
Leonardo Sandoval [Tue, 8 Sep 2015 10:39:09 +0000 (11:39 +0100)]
devtool: add upgrade feature

Upgrades a recipe to a particular version and downloads the source code
into a folder. User can avoid patching the source code.

These are the general steps of the upgrade function:

   - Extract current recipe source code into srctree and create a branch
   - Extract upgrade recipe source code into srctree and rebase with
     previous branch. In case the rebase is not correctly applied, source
     code will not be deleted, so user correct the patches
   - Creates the new recipe under the workspace

[YOCTO #7642]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: improve modified file preservation to handle directory structures
Paul Eggleton [Tue, 8 Sep 2015 10:39:08 +0000 (11:39 +0100)]
devtool: improve modified file preservation to handle directory structures

Allow the _add_md5() function to be called with a directory in order to
recursively add the files under it. Additionally, we need to skip
preserving empty directories (since directories aren't listed in the md5
file).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoscriptutils: split out simple fetching function from recipetool
Paul Eggleton [Tue, 8 Sep 2015 10:39:07 +0000 (11:39 +0100)]
scriptutils: split out simple fetching function from recipetool

This will now also be used by "devtool upgrade".

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: modify: enable do_shared_workdir for kernel
Markus Lehtonen [Tue, 8 Sep 2015 10:58:15 +0000 (13:58 +0300)]
devtool: modify: enable do_shared_workdir for kernel

Do not put 'do_shared_workdir' into SRCTREECOVEREDTASKS when creating
bbappend for kernel packages. This will allow building packages that
depend on the shared build artifacts of kernel.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agokernel.bbclass: do not mv/link sources when externalsrc enabled
Markus Lehtonen [Tue, 8 Sep 2015 10:58:14 +0000 (13:58 +0300)]
kernel.bbclass: do not mv/link sources when externalsrc enabled

If externalsrc is enabled the 'do_unpack' task is run if the recipe has
some local source files. In the case of kernel recipe this caused the
(externalsrc) source tree to be moved/symlinked. This patch prevents the
behaviour, making sure the source tree is not moved around when
externalsrc is enabled. Instead of moving the source tree,
STAGING_KERNEL_DIR will be a symlink to it.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agokernel-yocto.bbclass: do_kernel_metadata depends on do_unpack
Markus Lehtonen [Tue, 8 Sep 2015 10:58:13 +0000 (13:58 +0300)]
kernel-yocto.bbclass: do_kernel_metadata depends on do_unpack

Make sure that 'do_unpack' is executed before 'do_kernel_metadata'.
Enabling externalsrc for kernel disables 'do_validate_branches' task
which caused 'do_kernel_metadata' to fail as the dependency chain to
'do_unpack' got broken.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoextrernalsrc.bbclass: treat kernel meta like local source
Markus Lehtonen [Tue, 8 Sep 2015 10:58:12 +0000 (13:58 +0300)]
extrernalsrc.bbclass: treat kernel meta like local source

Kernel metadata repository needs to be fetched/unpacked into the work
directory in order to build the kernel. Sources pointing to a remote
location are skipped by externalsrc by default which caused kernel build
to fail (because of remote kernel-meta was not made availeble). This
patch will make kernel-meta always available.

[YOCTO #6658]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoadt-installer: upgrade to opkg 0.3.0
Alejandro del Castillo [Tue, 8 Sep 2015 19:24:49 +0000 (14:24 -0500)]
adt-installer: upgrade to opkg 0.3.0

- Opkg 0.3.0 deprecated --disable-shave & --withopkglibdir options.
- Add -i option to autoreconf since opkg tarball is missing conf.compile.
- Recreate wget_cache.patch

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/parselogs: Updated log error whitelist.
Cristina Agurida [Tue, 8 Sep 2015 16:45:10 +0000 (04:45 +1200)]
oeqa/parselogs: Updated log error whitelist.

[YOCTO #7898]
[YOCTO #7761]
[YOCTO #7804]

Signed-off-by: Cristina Agurida <cristina-danielax.agurida@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobinutils: Add thunderx support to gas
Jagadeesh Krishnanjanappa [Tue, 8 Sep 2015 20:02:01 +0000 (01:32 +0530)]
binutils: Add thunderx support to gas

Without this patch, cross compiling for AArch64 with
"-mcpu=thunderx" fails with below error,

-- snip --
Assembler messages:
Error: unknown cpu `thunderx'
Error: unrecognized option -mcpu=thunderx
-- CUT --

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolinux-yocto/3.14: fix edgerouter (octeon) build
Bruce Ashfield [Tue, 8 Sep 2015 13:44:45 +0000 (09:44 -0400)]
linux-yocto/3.14: fix edgerouter (octeon) build

Upating the SRCREVs to import the following commit:

    Author: Kevin Hao <kexin.hao@windriver.com>
    Date:   Mon Aug 31 19:34:48 2015 +0800

        mips: octeon: use ll/sc for the atomic ops for all the predecessor
        of octeon2

        Even the octeon plus has the support of the 'saa' instruction, but
        we
        don't have a way to distinguish between octeon and octeon plus at
        compile time and pass "-march=octeon" to all the predecessor of
        octeon2. So it will cause the following error when trying to
        assemble
        the "saa" instruction with option "-march=octeon":
          {standard input}: Assembler messages:
          {standard input}:360: Error: Unrecognized opcode `saa $2,($4)'
          scripts/Makefile.build:308: recipe for target
        'arch/mips/cavium-octeon/executive/cvmx-lap.o' failed

        Forcing to use the "ll/sc" for the atomic ops for all the
        predecessor
        of octeon2 to fix this issue.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemurunner: Fix killpg pid usage
Richard Purdie [Tue, 8 Sep 2015 22:36:04 +0000 (23:36 +0100)]
qemurunner: Fix killpg pid usage

killpg should be being called with a pgid, not a pid.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemurunner: Ensure runqemu doesn't survive SIGKILL
Richard Purdie [Tue, 8 Sep 2015 22:35:04 +0000 (23:35 +0100)]
qemurunner: Ensure runqemu doesn't survive SIGKILL

Currently, we see runqemu and qemu-system-* processes left behind when
bitbake is killed by buildbot. This is due to the use of setpgrp() in
the runqemu subprocess call.

We need the setpgrp call so that all runqemu processes can easily be
killed (by killing their process group). This presents a problem if this
controlling process itself is killed however since those processes don't
notice the death of the parent and merrily continue on.

Rather than hack runqemu to deal with this, we add something to
qemurunner, at least for now to resolve the issue. Basically we fork off
another process which holds an open pipe to the parent and also is
setpgrp. If/when the pipe sees EOF from the parent dieing, it kills the
process group. This is like pctrl's PDEATHSIG but for a process group
rather than a single process.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorootfs.py: show intercept script output in log.do_rootfs
Martin Jansa [Fri, 4 Sep 2015 18:56:24 +0000 (20:56 +0200)]
rootfs.py: show intercept script output in log.do_rootfs

* without this the output wasn't shown anywhere even when the bb.warn
  says:
  "See log for details!"

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopackage_manager.py: search provides when not found by pkgname
Robert Yang [Mon, 7 Sep 2015 01:48:13 +0000 (18:48 -0700)]
package_manager.py: search provides when not found by pkgname

Fixed when:
PACKAGE_CLASSES = "package_rpm"
IMAGE_INSTALL_append = " perl-module-warnings-register"

$ bitbake core-image-minimal
[snip]
ERROR: perl-module-warnings-register not found in the base feeds
[snip]

And it works well when PACKAGE_CLASSES = "package_ipk" since perl
provides perl-module-warnings-register, the "smart install
perl-module-warnings-register" also works well, this was because
_search_pkg_name_in_feeds() only searched pkg name, but no provides,
this patch fixes the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agowic: round variable before converting to int
Ed Bartosh [Mon, 7 Sep 2015 10:01:13 +0000 (13:01 +0300)]
wic: round variable before converting to int

Wic uses bitbake variable ROOTFS_SIZE to set correspondent
partition size. This variable is a literal representing
float value. Wic crashes trying to convert it to int with
the error: invalid literal for int() with base 10: '10166.0'

Fixed this by converting variable to float and rounding result.
This should work for int and float literals.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorootfs: Do not uninstall update-rc.d
Khem Raj [Sun, 6 Sep 2015 15:25:39 +0000 (15:25 +0000)]
rootfs: Do not uninstall update-rc.d

update-rc.d is now needed by systemd to interact with sysv
scripts, so if we have a mixed system, then we can not uninstall
update-rc.d as it is going to break systemd functionality

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobusybox: Enable getopt applet
Khem Raj [Sun, 6 Sep 2015 15:25:38 +0000 (15:25 +0000)]
busybox: Enable getopt applet

getopts is a common applet more so now needed by systemd for working
with sysv scripts

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemurunner: Drop error to a warning to improve user feedback
Richard Purdie [Mon, 7 Sep 2015 14:36:49 +0000 (15:36 +0100)]
qemurunner: Drop error to a warning to improve user feedback

If a task shows an error, the full log is surpressed since bitbake assumes
the user has been shown what is wrong. In this code path that isn't the
case and its much more helpful to show the user the full error. Therefore
show a warning instead to aid usability.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoqemu: Add fixes for smc91c11 qemu segfaults on arm
Richard Purdie [Mon, 7 Sep 2015 14:35:49 +0000 (15:35 +0100)]
qemu: Add fixes for smc91c11 qemu segfaults on arm

The smc91c111.c driver appears to have several issues. The can_receive()
function can return that the driver is ready when rx_fifo has not been
freed yet. There is also no sanity check of rx_fifo() in _receive() which
can lead to corruption of the rx_fifo array.

release_packet() can also call qemu_flush_queued_packets() before rx_fifo
has been cleaned up, resulting in cases where packets are submitted
for which there is not yet any space.

This patch therefore:

* fixes the logic in can_receive()
* adds logic to receive() as a sanity check
* moves the flush() calls to the correct places where data is ready
  to be received

Its currently undergoing discussion upstream about exactly which pieces
are the correct fix but for now, this stops the segfaults OE is seeing
which has to be an improvement.

[YOCTO #8234]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodevtool: add mechanism for updating extensible SDK
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:27 +0000 (13:42 +0100)]
devtool: add mechanism for updating extensible SDK

Enable updating the installed extensible SDK from a local or remote
server, avoiding the need to install it again from scratch when
updating. (This assumes that the updated SDK has been built and then
published somewhere using the oe-publish-sdk script beforehand.)

This plugin is only enabled when devtool is used within the extensible
SDK since it doesn't make sense to use it next to a normal install of
the build system.

E.g.
devtool sdk-update /mnt/sdk-repo/
devtool sdk-update http://mysdkhost/sdk

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooe-publish-sdk: add script
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:26 +0000 (13:42 +0100)]
oe-publish-sdk: add script

Add a script to publish an extensible SDK that has previously been built
to a specified destination. This published SDK is intended to be
accessed by the devtool sdk-update command from an installed copy of the
extensible SDK.

e.g.
oe-publish-sdk <ext-sdk> <destination>

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoExtensible SDK: allow for installation without preparing build system
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:25 +0000 (13:42 +0100)]
Extensible SDK: allow for installation without preparing build system

When publishing SDK, what we want is basically its metadata and sstate
cache objects. We don't want the SDK to be prepared with running bitbake
as it takes time which reproduces meaningless output for the published SDK.

So this patch adds an option to allow for SDK to be extracted without
preparing the build system.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopopulate_sdk_ext: don't remove the native qemu dependencies
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:24 +0000 (13:42 +0100)]
populate_sdk_ext: don't remove the native qemu dependencies

These dependencies were deliberately removed because it was assumed that
they were provided by nativesdk packages. On the one hand, nativesdk packages
in extensible SDK don't have these packages; on the other hand, even if we
add these nativesdk packages, they are still not useful because we we need
runqemu to run correctly.

So we don't remove these native qemu dependencies.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopopulate_sdk_ext: consider custom configuration in local.conf
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:23 +0000 (13:42 +0100)]
populate_sdk_ext: consider custom configuration in local.conf

Copy the contents of local.conf under TOPDIR into the final generated
local.conf. In this way, custom settings are also made into the final
local.conf like IMAGE_INSTALL, DISTRO_FEATURES, VIRTUAL-RUNTIME_xxx,
etc. Comments and blank lines are filtered out.

Before this change, installing extensible SDK would usually report failure
when preparing the build system if the user has custom configuration for
DISTRO_FEATURES in local.conf. Also, items in IMAGE_INSTALL_append in
local.conf also don't get built correctly.

This patch solves the above problem by making use of bb.utils.edit_metadata.

In addition, we check to avoid any setting that might lead to host paths
bleeding into the SDK's configuration. Basically, variables with values
starting with '/' are removed. A whitelist mechanism is introduced so that
users could specify variables that should not be ignored. The name of the
whitelist is SDK_LOCAL_CONF_WHITELIST.

The SDK_META_CONF_WHITELIST is removed as it's of no use after this
change.

SDK_LOCAL_CONF_BLACKLIST can be used to prevent copying specific
variable settings to the extensible SDK's local.conf; the default is to
exclude PRSERV_HOST (since this is likely to be internal). Similarly,
SDK_INHERIT_BLACKLIST to forbit local.conf in SDK to inherit certain
classes such as 'buildhistory' or 'icecc' that would not normally make
sense in an SDK environment.

[YOCTO #7616]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocopy_buildsystem: make sure bitbake directory is copied
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:22 +0000 (13:42 +0100)]
copy_buildsystem: make sure bitbake directory is copied

The previous code assumes that bitbake/ directory is under the core layer.
This is the case for Yocto project. But users might clone oe-core and bitbake
separately. So we use bb.__file__ to locate the bitbake directory to make sure
it's copied into the extensible SDK.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopopulate_sdk_ext: install the latest buildtools-tarball
Qi.Chen@windriver.com [Mon, 7 Sep 2015 12:42:21 +0000 (13:42 +0100)]
populate_sdk_ext: install the latest buildtools-tarball

If we do `bitbake buildtools-tarball' and then after one day do `bitbake
core-image-minimal -c populate_sdk_ext', we would meet errors like below.

| install: cannot stat '/buildarea2/chenqi/poky/build-systemd/tmp/deploy/sdk/
poky-glibc-x86_64-buildtools-tarball-core2-64-buildtools-nativesdk-standalone
-1.8+snapshot-20150429.sh': No such file or directory

The problem is that the output name for buildtools-tarball has ${DATE} in it.
So if populate_sdk_ext task is executed but buildtools-tarball is not rebuilt,
the above error appears.

Instead of hardcoding ${DISTRO_VERSION} which consists of ${DATE} in the
install_tools() function, we should find the latest buildtools-tarball based
on the modification time and install it.

[YOCTO #7674]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoclasses/populate_sdk_ext: avoid poky-specific buildtools naming
Paul Eggleton [Mon, 7 Sep 2015 12:42:20 +0000 (13:42 +0100)]
classes/populate_sdk_ext: avoid poky-specific buildtools naming

Only poky sets SDK_NAME to include ${IMAGE_BASENAME} (i.e. ${PN}), so we
can't assume the buildtools filename will include it here. Change it to
look for a file with "buildtools-nativesdk-standalone" in the name
(the buildtools-tarball recipe itself sets TOOLCHAIN_OUTPUTNAME to
include this.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: explain why we cannot use sudo in extensible SDK
Brendan Le Foll [Mon, 7 Sep 2015 12:42:19 +0000 (13:42 +0100)]
toolchain-shar-extract.sh: explain why we cannot use sudo in extensible SDK

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: better default install path for extensible SDK
Brendan Le Foll [Mon, 7 Sep 2015 12:42:18 +0000 (13:42 +0100)]
toolchain-shar-extract.sh: better default install path for extensible SDK

Extensible SDK cannot be installed as root so by default offer to install it in
user's home directory under distro/distro_version replacing the normal SDK
version '+' char with a '_' as that's a restricted character for bitbake

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions
Brendan Le Foll [Mon, 7 Sep 2015 12:42:17 +0000 (13:42 +0100)]
toolchain-shar-extract.sh: ensure extensible SDK install path obeys restrictions

There are some characters that cannot appear in the installation path, so we
need to check for these

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotestimage: handle SIGTERM to conclude runqemu
Mariano Lopez [Sat, 5 Sep 2015 10:17:26 +0000 (10:17 +0000)]
testimage: handle SIGTERM to conclude runqemu

In the current state if a SIGTERM is sent to
the testimage worker, the worker will exit but
runqemu and qemu won't exit and the processes
need to be killed manually to free the
bitbake lock.

This allows to catch the SIGTERM signal in
testimage, this way it is possible to stop
runqemu and qemu and allow to free the bitbake lock.

Also this allows to skip the rest of the tests
when running the tests in qemu or real hardware.

This also solves minimal breaks in the setup of the
runtime test when checking if qemu is alive.

[YOCTO #8239]

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopostinst_intercept: allow to pass variables with spaces
Martin Jansa [Fri, 4 Sep 2015 12:22:27 +0000 (14:22 +0200)]
postinst_intercept: allow to pass variables with spaces

* trying to pass foo="a b" through postinst_intercept ends
  with the actual script header to containing:
  b
  foo=a
  which fails because "b" command doesn't exist.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorootfs.py: Allow to override postinst-intercepts location
Martin Jansa [Fri, 4 Sep 2015 12:22:26 +0000 (14:22 +0200)]
rootfs.py: Allow to override postinst-intercepts location

* useful when we need to overlay/extend intercept scripts from oe-core

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopseudo_1.7.3.bb: New version of pseudo
Peter Seebach [Fri, 4 Sep 2015 22:16:27 +0000 (17:16 -0500)]
pseudo_1.7.3.bb: New version of pseudo

Pseudo 1.7 adds an experimental feature (which I think needs more testing
before it becomes the default) allowing the pseudo client to store modes
and uid/gid values in extended attributes rather than using the sqlite
database. On most Linux-like systems, this works only if the underlying
file is a plain file or a directory.

Also added is a profiling feature to allow some amount of reporting on
the wall-clock time the client spends in wrappers, processing operations,
or in IPC. This feature is not intendeded to be precisely accurate, but
gives a good overview of where time is going.

Based on the results from the profiling feature, the client now suppresses
OP_OPEN and OP_EXEC messages if the server is not logging messages, and
no longer uses constant dynamic allocation and free cycles for canonicalized
paths.

There's a few other likely-looking optimizations being considered, but
this seemed like a good cutoff for now.

1.7.1 fixes two bugs, one affecting mostly XFS systems with 64-bit
inode values, and one affecting code that called realpath(x, NULL), such
as the RPM backend.

1.7.2 fixes an indirect side-effect of the chmod fixes to deal with
umask 0700, which had no effect with opkg 0.2.4 but appears to cause
failures with 0.3.0.

1.7.3 prevents mkdirat() (and mkfifoat()) from setting errno on success,
because glibc's localedef inexplicably errors out if errno was set, even
if the operation's actual return code (which it tests) indicated
success.

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosstate: implement basic signing/validation
Ross Burton [Thu, 3 Sep 2015 18:39:07 +0000 (19:39 +0100)]
sstate: implement basic signing/validation

To provide some element of integrity to sstate archives, allow sstate archives
to be GPG signed with a specified key (detached signature to a sidecar .sig
file), and verify the signatures when sstate archives are unpacked.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibinput: avoid --enable-event-gui=auto
Joe Slater [Thu, 3 Sep 2015 21:08:02 +0000 (14:08 -0700)]
libinput: avoid --enable-event-gui=auto

Specify a value via PACKAGECONFIG[gui].  The default is
--diable-event-gui.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocross-canadian.bbclass: typo fix in comments (s/repsonsible/responsible/)
Mario Domenech Goulart [Thu, 3 Sep 2015 18:06:35 +0000 (15:06 -0300)]
cross-canadian.bbclass: typo fix in comments (s/repsonsible/responsible/)

Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoboot-directdisk.bbclass: use rootfs UUID by default
Patrick Ohly [Thu, 3 Sep 2015 18:42:33 +0000 (20:42 +0200)]
boot-directdisk.bbclass: use rootfs UUID by default

This changes the default SYSLINUX_ROOTFS such that the rootfs is no
longer expected under a fixed device path. Instead, the UUID is used
to find it. This makes the resulting .hdddirect (and thus also the
vdi/vdmk/qcow2 images derived from that) more flexible.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoboot loader: support root=UUID
Patrick Ohly [Thu, 3 Sep 2015 18:42:32 +0000 (20:42 +0200)]
boot loader: support root=UUID

As mentioned when introducing the VM images
(https://bugzilla.yoctoproject.org/show_bug.cgi?id=7374), the
resulting images only work when the image is mounted as a disk that
results in the hard-coded path (/dev/sda in the current
default). Using the file system UUID to find the rootfs is more
flexible.

To enable this for boot-direct.bbclass and thus image-vm.bbclass (aka
FSTYPEs vdi/vmdk/qcow2), set SYSLINUX_ROOT =
"root=UUID=<<uuid-of-rootfs>>". The rootfs image must use an ext file
system.

The special string will get replaced in the APPEND line with the
actual UUID when the boot loader (grub-efi, syslinux or gummiboot)
writes the boot loader configuration files. At that time, the rootfs
image has already been created and its UUID can be extracted using
"tune2fs -l", which also should be available because the
e2fsprogs-native tools were needed to create the image in the first
place.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage-vm.bbclass: support specifying an initramfs
Patrick Ohly [Thu, 3 Sep 2015 18:42:31 +0000 (20:42 +0200)]
image-vm.bbclass: support specifying an initramfs

Set INITRD_IMAGE to automatically add a custom initramfs to the boot
partition.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage-vm.bbclass: avoid duplicating syslinux default values
Patrick Ohly [Thu, 3 Sep 2015 18:42:30 +0000 (20:42 +0200)]
image-vm.bbclass: avoid duplicating syslinux default values

Some of the SYSLINUX defaults are the same as in the underlying
syslinux.bbclass. Let's not duplicate them, because that makes
changing the default harder.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinitramfs-framework: handle kernel parameters with . inside
Patrick Ohly [Thu, 3 Sep 2015 18:42:29 +0000 (20:42 +0200)]
initramfs-framework: handle kernel parameters with . inside

Kernel parameters like "uvesafb.mode_option=640x480-32" were turned
into shell variables named "bootparam_uvesafb.mode_option", which
triggered errors from the shell because the name is not valid. Now
points get replaced with underscores, leading to
bootparam_uvesafb_mode_option in this example.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinitramfs-live-boot: create /dev/console
Patrick Ohly [Thu, 3 Sep 2015 18:42:28 +0000 (20:42 +0200)]
initramfs-live-boot: create /dev/console

Some kernels, for example linux-yocto 3.19 for qemux86, fail to
execute /init in an initramfs unless there is already a /dev/console
char device in the initramfs. Booting then fails with:
    Kernel panic - not syncing: /dev/console is missing or not a character device!
    Please ensure your rootfs is properly configured

The panic itself comes from a linux-yocto specific patch to
kernel_init_freeable in init/main.c, but even without it, that
function will print an error when /dev/console is missing. The
kernel's Documentation/initrd.txt also mentions creating that device.

It remained unclear why this is not a problem on other machines. On
intel-corei7-64 from meta-intel, something (the kernel?) creates
/dev/console and /dev/[012] before transfering control to the init
script. In that case, creating /dev/console in advance is not
necessary, but does not cause any problem either.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoinitramfs-framework: create /dev/console
Patrick Ohly [Thu, 3 Sep 2015 18:42:27 +0000 (20:42 +0200)]
initramfs-framework: create /dev/console

Some kernels, for example linux-yocto 3.19 for qemux86, fail to
execute /init in an initramfs unless there is already a /dev/console
char device in the initramfs. Booting then fails with:
    Kernel panic - not syncing: /dev/console is missing or not a character device!
    Please ensure your rootfs is properly configured

The panic itself comes from a linux-yocto specific patch to
kernel_init_freeable in init/main.c, but even without it, that
function will print an error when /dev/console is missing. The
kernel's Documentation/initrd.txt also mentions creating that device.

It remained unclear why this is not a problem on other machines. On
intel-corei7-64 from meta-intel, something (the kernel?) creates
/dev/console and /dev/[012] before transfering control to the init
script. In that case, creating /dev/console in advance is not
necessary, but does not cause any problem either.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqemu: support full-disk images
Patrick Ohly [Thu, 3 Sep 2015 18:42:26 +0000 (20:42 +0200)]
runqemu: support full-disk images

This makes it possible to boot images with multiple partitions (the
ones ending in .hddimg or .hdddirect) in several ways:
   runqemu qemux86 core-image-minimal hddimg
   runqemu tmp/deploy/images/qemux86/core-image-minimal-qemux86.hddimg
   VM=tmp-glibc/deploy/images/qemux86/iot-os-image-qemux86.hddimg FSTYPE=hddimg runqemu

Same for hdddirect.

This is useful for testing initramfs scripts, secure boot (when
switching to UEFI), or boot loaders like syslinux. For testing the
content of the rootfs, the ext4 image is better because that approach
is faster (no need to create another large image during build, rootfs
can be read directly instead of reading boot.img through loop device).

When booting a live image, the kernel, initramfs (if any) and kernel
parameters are taken from the image by the virtual machine's BIOS, so any
additional kernel parameters given to runqemu are ignored. This can be
avoided (already without this change) in a slightly hacky runqemu setup:
   ROOTFS=tmp/deploy/images/qemux86/core-image-minimal-qemux86.hddimg \
   FSTYPE=ext4 \
   KERNEL=tmp/deploy/images/qemux86/bzImage-initramfs-qemux86.bin \
   MACHINE=qemux86 \
   runqemu serial kvm nographic 'bootparams=root=/dev/ram0'

The additional bzImage-initramfs-qemux86.bin kernel here was created
by adding this to local.conf:
   INITRAMFS_IMAGE = "core-image-minimal-initramfs"
   INITRAMFS_IMAGE_BUNDLE = "1"

In the code, the new FSTYPE=hddimg resp. hdddirect behaves almost
exactly like the older vmdk FSTYPE. New types were chosen because it
seemed cleaner than using FSTYPE=vmdk when the actual image pointed to
by VM is not in that format. The downside is that several checks for
FSTYPE=vmdk had to be duplicated for FSTYPE=hddimg.

The VM variable now gets interpreted as "virtual machine disk image"
instead of "vmdk image".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooprofileui: Use inherit gettext
Saul Wold [Thu, 3 Sep 2015 20:20:35 +0000 (13:20 -0700)]
oprofileui: Use inherit gettext

oprofileui uses gettext during the configuration task so should be inherit
gettext. This issue appears when an older version of gettext is used do to
pinning to the older non-gplv3 version.

[YOCTO #7795]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agooeqa/decorators: Fixed a problem with tests having the same names.
Lucian Musat [Fri, 4 Sep 2015 13:48:29 +0000 (16:48 +0300)]
oeqa/decorators: Fixed a problem with tests having the same names.

When two or more tests had the same name but different classes then
the decorator log whould have the output all wrong. This was because
a comparison which was made only between method names but now it
compares classes too.

[YOCTO #8029]

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolibunique: remove the recipe
Alexander Kanavin [Thu, 3 Sep 2015 15:34:14 +0000 (18:34 +0300)]
libunique: remove the recipe

It is not used by anything in oe-core and will be moved to meta-oe

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoreport-error: send only last 5242000 characters in error logs
Martin Jansa [Fri, 4 Sep 2015 12:22:09 +0000 (14:22 +0200)]
report-error: send only last 5242000 characters in error logs

* otherwise whole build report submission is rejected because it's too big

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoprocps: fix for base_sbindir == sbindir
Joshua Lock [Fri, 4 Sep 2015 14:59:46 +0000 (15:59 +0100)]
procps: fix for base_sbindir == sbindir

An rmdir call in do_install_append was trying to remove the
sbindir, however in a system with a merged usr this directory
is not empty and therefore failing to rm it causes an ERROR.

Instead check that sbindir != base_sbindir before trying to
remove the directory.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agonfs-utils: don't force use of /sbin as sbindir
Joshua Lock [Fri, 4 Sep 2015 14:59:45 +0000 (15:59 +0100)]
nfs-utils: don't force use of /sbin as sbindir

The Makefile for mount and osd_login utilities forces
/sbin as asbindir, however on a merged /usr system this directory
might not exist. Instead sed in the system sbindir.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agopcmciautils: handle udev dir being 2 levels below /
Joshua Lock [Fri, 4 Sep 2015 14:59:44 +0000 (15:59 +0100)]
pcmciautils: handle udev dir being 2 levels below /

When building with a merged /usr dir the udev directory
lives at /usr/lib/udev - update the FILES pattern to also
pick up udev files installed two levels below the / to
ensure a merged /usr works.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobluez: handle udev dir being 2 levels below /
Joshua Lock [Fri, 4 Sep 2015 14:59:43 +0000 (15:59 +0100)]
bluez: handle udev dir being 2 levels below /

When building with a merged /usr dir the udev directory
lives at /usr/lib/udev - update the FILES pattern to also
pick up udev files installed two levels below the / to
ensure a merged /usr works.

Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>