Commit Graph

44985 Commits

Author SHA1 Message Date
Paul Eggleton 1485a5517a bitbake: bitbake-layers: fix layerindex-fetch for Python 3
The data we read from an HTTPConnection comes in the form of bytes, but
we need it as a string, so in Python 3 we need to decode it (missed in
the Python 3 migration).

(Bitbake rev: 7e6a3cd1472e1a1c8304b46611e1676914a68b59)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Paul Eggleton 5b1807021e bitbake: data_smart: implement missing remote datastore operations
Enable the following operations from a remote datastore to affect the
other end:

* setVarFlag()
* delVar()
* delVarFlag()
* renameVar()

In practice I don't expect these to be used much, but they should be
present so that the implementation is at least reasonably filled out
and that the tests pass.

Also add tests for the interface, mostly by subclassing the existing
local test classes so that they are using a remote datastore. (These
don't actually test remote usage via tinfoil, just that the
datastore's interface can be used.)

(Bitbake rev: 282dc0719d22a39df746eea762ebe05c66aa8f8a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Paul Eggleton 99414bdb1c bitbake: tinfoil: fix override handling in remote datastores
There was a huge gap in the remote datastore code introduced in the
tinfoil2 rework - we weren't handling overrides at all, since these are
stored separately from the actual data in the DataSmart object. Thus,
when a datastore actually represents a remote datastore we need to go
back to that remote datastore to get the override data as well, so
introduce code to do that.

To avoid a second round-trip I had to modify the _findVar() function to
return the override data as well. This will increase the overhead a
little when that data is superfluous, but without making the function
even uglier I don't think there's a way to avoid that.

(Bitbake rev: 4f9d6f060ed247fb6fa2f45668a892a1788d3f91)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Richard Purdie 0cb6f85335 sstate: Ensure installation directory is empty before execution
When you enable the systemd DISTRO_FEATURE, opkg-native contains systemd units
which have a relocation fixme list. When systemd isn't in DISTRO_FEATURES, there
are no fixmes required. Unfortunately as sstate isn't cleaning up its installation
directory before use, if you install the systemd version, then install the
non-systemd version from sstate, it would leave behind the fixme file from the
systemd version and breakage results as it would try and fixup files which don't
exist.

The solution is to ensure the unpack/install directory is clean before use. It
does raise other questions about opkg-native, systemd and DISTRO_FEATURES but there
is an underlying sstate issue here too which would cause missing file failures.

(From OE-Core rev: d1d55041e38b12d40f896834b56475ea19a6047f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Richard Purdie 52d7d2c06b oeqa/selftest/devtool: Enable missing cleanup
Not sure why this cleanup is disabled but it clearly should be running
so enable it.

(From OE-Core rev: 83867079182d8b9e981935da2b254947a89097bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Richard Purdie c0a2268ae8 externalsrc: Use git add -A for compatibility with all git versions
I've been debugging a selftest failure on Centos7. The problem turns out
to be the elderly git version (1.8.3.1) on those systems. It means that
the system doesn't correctly checksum changed files in the source tree,
which in turn means do_compile fails to run and this leads to the following
selftest failure:

======================================================================
FAIL [141.373s]: test_devtool_buildclean (oeqa.selftest.devtool.DevtoolTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 530, in test_devtool_buildclean
    assertFile(tempdir_mdadm, 'mdadm')
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 497, in assertFile
    self.assertTrue(os.path.exists(f), "%r does not exist" % f)
AssertionError: False is not true : '/tmp/devtoolqag88s39z8/mdadm' does not exist

The solution is to use -A on the git add commandline which matches the behaviour
in git 2.0+ versions and resolves the problem.

(From OE-Core rev: 964e8b8cae4b28e21ade12b5effb494e459b1f0f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 19090446da wic: selftest: add tests for --fixed-size partition flags
wic has a new flag for setting a fixed parition size --fixed-size. Add
tests that verify if partition is indeed sized properly and that errors
are signaled when there is not enough space to fit partition data.

(From OE-Core rev: 84c2184546779ece3eb23c5628e4c9d177568043)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 17fe3eb453 wic: selftest: do not assume bzImage kernel image
Instead of assuming that bzImage is available, query bitbake enviroment
for KERNEL_IMAGETYPE.

(From OE-Core rev: d3e1d25a06dd4cb3ec80ea63352de24e50552481)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 00ed0d4aec wic: selftest: avoid COMPATIBLE_HOST issues
Wic tests will unconditionally attempt to build images that may require
dependencies that are incompatible with current target.

Resolve this by consulting HOST_ARCH first (which defaults to TARGET_ARCH)
before proceeding to build images that may be incompatible.

A convenience decorator only_for_arch() can be used to skip test cases for
specific architectures.

(From OE-Core rev: ff46125082f08eb93cc549bbe1d79c3b8f9cba64)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 4453c21d68 selftest: wic: replace directdisk with wictestdisk where possible
Use wictestdisk instead of directdisk thus allowing more tests to be run on
non-x86 compatible machines.

(From OE-Core rev: 071785b01cdaa0d35808fa0b7308162cfebf54f1)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Maciej Borzecki 74c65b7528 selftest: wictestdisk: machine agnostic WKS for use with selftest
Add a kickstart for an image that is not limited to use on x86 compatible
machines. This allows us to run more wic tests on non-x86 architectures.

(From OE-Core rev: c722569a8b136ffbbe4d2723bbc50fc3ae5aed42)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Aníbal Limón f57eac5dc9 scripts/yocto-compat-layer.py: Handle layer dependencies when test
If some layer depends on other tries to find layer dependency, if the
layer dependency isn't found avoid to test the layer and notice the
user.

(From OE-Core rev: 1e7cf9bb71521f1632dd2e6b01fe7fcc95732983)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Aníbal Limón 4703aa2b3b scripts/yocto-compat-layer.py: Add option to disable layer autodiscovery
Sometimes there is a need to only analyze the layer specified by the
command line, the new option -n will disable autodiscovery of layers
and only will try to test specified layers.

(From OE-Core rev: f2f6f0c938226802163698ef14a8a9103da362a0)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Aníbal Limón 995cb88233 scripts/lib/compatlayer: Remove require of meta- in layer dir name
The layers isn't required to have a dirctory name start with meta-
so remove the validation.

(From OE-Core rev: 576c6486f547b1d7422cdd12f688aef74ee632ae)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Mikko Rapeli c52fe3a77a buildhistory.bbclass: add layer name to source recipe data
It is useful to know which layer provided a given recipe and its
binary packages.

Many projects combine a number of layers and some of them
also provide same recipe names in which case bitbake
can prioritize between them. buildhistory can record
the decision by saving the layer from where the recipe
was taken from.

Also, if a project is split to sub projects which maintain
recipes in different meta layers, then meta layer specific
summaries of e.g. disk usage can be calculated if
source recipes meta layer name is recorded for example in
buildhistory.

If source layer is not in build history, then layer providing
the recipe can be exported from build environment using
'bitbake-layers show-recipes', but it takes a long time to execute
since all recipes are parsed again and requires full source tree
with correct build configuration.

This patch exports the name of layer as configured in BBFILE_COLLECTIONS
append of its layer.conf. 'bitbake-layers show-recipes' exports the
meta layers directory path name. For several open source layers
these are different, e.g. meta-openembedded/meta-perl/conf/layer.conf
is perl-layer, poky/meta/conf/layer.conf is core,
poky/meta-skeleton/conf/layer.conf is skeleton etc.

(From OE-Core rev: d8e59d1f840e4282859ad14397d1c06516b8eb11)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Patrick Ohly 11aa390288 ovmf: fix toolchain selection
For the native tools, a static patch inserted gcc/g++/ld/ar while later
adding BUILD_LDFLAGS and BUILD_CFLAGS with sed. Now it's all done with sed,
which has the advantage that it uses the actual compile variables. However,
in practice those are the same.

More importantly, picking the build tools for the target was
broken. ovmf-native tried to insert TARGET_PREFIX into the tools
definition file, but that variable is empty in a native recipe. As a
result, "gcc" was used instead of "${HOST_PREFIX}gcc", leading to an
undesirable dependency on the host compiler and potentially
(probably?!) causing some of the build issues that were seen for ovmf.

The new approach is to override the tool selection in ovmf-native so
that the HOST_PREFIX env variable is used, which then gets exported
during do_compile for the target.

While at it, Python code that gets appened to do_patch only to call
shell functions gets replaced with the do_patch[postfuncs] mechanism.

Incremental builds now always use the tools definition from the
current ovmf-native; previously, only the initial build copied the
template file.

Probably the entire split into ovmf-native and ovmf could be
removed. This merely hasn't been attempted yet.

(From OE-Core rev: 23a12d87a6e82f80f4ccc1a01c707faa89ff7abd)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Khem Raj 853a154850 libcomps: Fix/optimize building with clang
(From OE-Core rev: aa30853693a8b6092e1ea9785d64267858454d17)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Aníbal Limón 6786f662cd scripts/compatlayer: Add exclude of meta-world-pkgdata on get_signatures
The meta-world-pkgdata recipe can be modified when a layer is added
may be can add recipes to world target, so exclude by default.

[YOCTO #11162]

(From OE-Core rev: cde30d70b04eb66bff66a351ddf733022e98ddab)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Aníbal Limón 07dd071bf6 scripts/yocto-compat-layer.py: Make output log argument optional
Only create a log file when --output-log option is specified, since
logger is dumping to stdout by default is better to let the user
decide if a log needs to be created.

[YOCTO #11160]

(From OE-Core rev: f91ccdeb8b0b3e4063ed2bf22215a25f8902cbd9)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:22 +00:00
Aníbal Limón 1e3ef54408 scripts/yocto-compat-layer.py: Dump log to stdout instead of stderr
The common unix tools uses stdout as standard for log output, by default
python logging uses stderr if not stream is specified.

[YOCTO #11160]

(From OE-Core rev: 95ad04f7daed17bde5be5fc264f6c731fecfdfa9)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Aníbal Limón 15e65f5f07 scriptutils: Add support for specify stream on logger_create
It is a good idea to let the script to choose what stream wants
to dump the logging output.

[YOCTO #11160]

(From OE-Core rev: 60c9b06f4085f6bddb6aa397a38bfc2ceb10f964)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Khem Raj c8e8e50bc3 go-native: Install bootstrap binaries with 1.4 suffix
Currently, bin/go and bin/gofmt collide between go-native
and go-bootstrap-native packages, these are scripts anyway
which call the go compiler proper from right install, in
this case create go1.4 and gofmt1.4 names for these scripts
to avoid namespace collision

(From OE-Core rev: c46faa132d39d3dc235a019d9abf6e46f74e3bae)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Khem Raj 63bdd90acc acpitests: Point Makefile CC to use OE synthesized CC
Default CC is same as used here, there is no need to
duplicate it, as a plus it helps in compiling acpitests with
non-gcc cross compilers

(From OE-Core rev: e23601390833fe93d58ca61a7158458dfdbd6fac)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Khem Raj 231fae32d3 openssl: Fix build with clang
(From OE-Core rev: c8da8cec9007f77396f873f1cd56fc78bf83b19a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Ross Burton b799e4a033 oeqa/selftest: remove test_sanity_unsafe_binary_references
This test was attempting to exercise a broken test, for some reason this broke
with patches under review but investigation revealed that the test itself is
broken.  The test has been removed, so there's no need to test it.

(From OE-Core rev: 4f5f552cd6601ba244ef4efc782616bc477e1340)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Ross Burton 3a1e31d714 insane: remove broken unsafe-references-in-binaries test
This test aims to detect binaries in /bin which link to libraries in /usr/lib,
for the case where the user has /usr on a separate filesystem to /.

However it doesn't scan both image/ and the sysroot, so if a binary in /bin
links to a library in /usr/lib that was built by the same recipe then it will
error out.

This test isn't enabled by default, and because of this serious bug I suspect
nobody else is enabling it either.  As /usr being on a separate partition to /
is a very rare configuration these days I think we should delete the test: if
someone cares sufficiently they should write a test that actually works.

(From OE-Core rev: a6af5bbf3dad6f0951c67a0aae13ef86a8906893)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Peter Kjellerstedt fc3ae0cb2a package.bbclass: Add PRIVATE_LIBS to list of package specific variables
Changes to PRIVATE_LIBS should change the sstate checksum. To make
that happen, it needs to be listed in the list of package specific
variables, therefore add it.

(From OE-Core rev: 1a6555dfd17e180b81dec407095787d8a72a9edd)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Peter Kjellerstedt 7c73e9b336 gpgme: Avoid requiring a host C++ compiler with C++11 support
Building the C++ bindings for native requires a host C++ compiler with
C++11 support. Since these bindings are currently not needed, we can
disable them and thus avoid increasing the requirement for the host C++
compiler.

(From OE-Core rev: 052547561f3b2c13d357da87061716c6eb968fb9)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Patrick Ohly ff73130718 image-buildinfo.bbclass: configurable location for build file
In a stateless image, /etc is not a good place for the "build"
file. By definining the location with a variable it becomes possible
to have the file created elsewhere on a per-image basis. The default
is the same as before.

(From OE-Core rev: 6750ea8160edccb156cb2ab68548adfc1c789895)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Daniel Schultz 898de507d3 wic: partition.py: Add fsck to avoid corrupt EXT file systems
This patch avoids the creation of a corrupt EXT file system.

Since there are no checks if a EXT file system was successfully created,
this should add to prevent possible system failures.

(From OE-Core rev: 95ac3d0637cad7e12f246b8bd64ab64348df0483)

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Daniel Schultz f38c551e6e e2fsprogs: Fix wrong error code after optimization
fsck.ext will return an error code of 1 if a file systems was checked
and successfully repaired. Even when an optimization was performed it
will return this error code.

This patch will change the error code to 0 if only optimizations had
changed the file systems.

The reason for this patch is a question I asked at the ext4 ML:
http://www.spinics.net/lists/linux-ext4/msg55700.html

Backport from git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
    Based on commit bf9f3b6d5b10d19218b4ed904c12b22e36ec57dd

(From OE-Core rev: 8341ee45d721cf07b19d50c249bb3a77ef1bf100)

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
brian avery ab34d08772 gen-lockedsig-cache: catch os.link error
We do a hard link to speed up sdk creation but if your sstate-cache is
across a file system boundary, this tries and fails. This patch catches
that error and does a copy instead.

(From OE-Core rev: fb9fdd7a74917cdcab039aa3a9a9944b18246fea)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Jose Lamego 4ad1148e68 python-3.3-multilib.patch: Fixes getpath on multilib configurations
When using multilib configurations either on arm/arm64 and x86/x86-64
python3 failed to execute due to a failure when looking for its
platform independent and dependent libraries.

This patch fixes this issue by assigning lib_python to the appropriate
macro.

[YOCTO #10812]

(From OE-Core rev: 9e99897f17d9c62ca5da208751d6560fc98927b6)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Paul Eggleton 995b02b00c devtool: tidy up handling of parse failures
Since the tinfoil2 refactoring, if an error occurred during parsing, we
were showing a traceback and not correctly exiting (since we weren't
calling shutdown()). Fix both of these issues.

(From OE-Core rev: 18304036e1b513fd12c049dbf549ba75c503ed84)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Paul Eggleton 258f98a27c oe-selftest: tinfoil: add tests for recently enabled datastore operations
A recent patch to bitbake fixes these datastore operations so that they
actually affect the server end, so we should test that they work.

(For full disclosure, some of these tests would probably pass without
those fixes, since the operation would be done on the client side
instead - but we are at least exercising the code paths.)

(From OE-Core rev: 4eb3c705b9cadccacdb191ae89f5242a00f397f3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
brian avery af994bfcfd bitbake.conf: remove vi from HOSTTOOLS list
Having changes the sdk test to cpio from cvs, we no longer require an
editor to be present. This patch removes vi from the list of required
tools.

(From OE-Core rev: cca2ccb6d77a433e9d7c535344c4fc1e04589bc0)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
brian avery c0970e0af9 meta/lib/oeqa: change sdk test from cvs to cpio
We currently fetch,configure,build, and install cvs as our test for the
sdk.  cvs unfortunately, requires a default editor in order to run.  The
change in 94790a8254 that checks to see if you have something like vi
installed is fragile since you may have a different default editor. This
patch switches from using cvs as a test to using cpio. cpio also uses
autotools so the functionality tested is equivalent.

(From OE-Core rev: 233d36b0382a8b2e430c3377e50885d1a0c3ba21)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Patrick Ohly 3c8d045d79 rm_work.bbclass: re-enable recursive do_rm_work_all
When rewriting the do_rm_work injection, do_rm_work_all had been
removed because it seemed obsolete, as do_build now always triggers
do_rm_work.

However, do_build does not get triggered for all recipes and thus
do_rm_work was not called for recipes that got built only
partially. For example, zlib depends indirectly on
zlib-native:do_populate_sysroot.  Because of that dependency,
zlib-native got compiled, but do_rm_work was never called for it.

Re-introducing do_rm_work_all fixes that by making do_build depend on
do_rm_work_all, which then recursively depends on do_rm_work of all
dependencies. This has the unintended side-effect that do_rm_work then
also triggers additional work (like do_populate_lic) that normally
doesn't need to be done for a build. This seems like the lesser evil,
compared to an incomplete cleanup because it mostly enables the
lighter tasks after do_populate_sysroot.

The real solution would be to have two kinds of relationships: a weak
ordering relationship ("if A and B are enabled, A must run before B,
but B can also run without A") and hard dependencies ("B cannot run
unless A has run before").

(From OE-Core rev: b3de5d5795767a4b8c331fa5040166e7e410eeec)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Patrick Ohly e4b5771409 image_types_wic.bbclass: tighten dependency to help do_rm_work_all
Depending on wic-tools:do_build pulls a lot of additional, indirect
dependencies into the image sysroot during do_image_wic as soon as
rm_work.bbclass is active, because then we have
do_build->do_rm_work_all->[all dependencies]. One of those
dependencies is libgcc-initial, which clashes with libgcc itself,
leading to errors in extend_recipe_sysroot like this:

   Exception: FileExistsError: [Errno 17] File exists: '.../tmp/sysroots-components/corei7-64/glibc-initial/usr/include/fstab.h' -> '.../tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/include/fstab.h'

As the image recipe only needs the sysroot of wic-tools and does not
need to wait for the build of wic-tools to finish, depending on
do_populate_sysroot is the better choice and happens to avoid
the problem above.

(From OE-Core rev: a678f54e710e46b3cf674ffa41d6432b22effbdf)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Florian Wickert 1ec405ef5d kernel-fitimage: dtb sections named by their filenames and one config section for each dtb
Before this, dtb sections were named by their position index in KERNEL_DEVICETREE. Also there was only one item in the config section, so only the first dtb was seen by the bootloader.
This patch adds a config section for each dtb named by the dtb filename. This is what bootloaders usually know about the machine they run on.

(From OE-Core rev: cd2ed7f80b555add07795cc0cbaee866e6c193a3)

Signed-off-by: Florian Wickert <fw@javox-solutions.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Khem Raj 938d077ca5 ltp: Fix __sighandler_t for mips
mips definition of kernel_sigaction was added later
and the patch did not apply to mips part which ended
in ltp failing to compile on mips parts

In file included from rt_sigaction01.c:42:0:
../../../../include/lapi/rt_sigaction.h:39:2: error: unknown type name '__sighandler_t'
  __sighandler_t k_sa_handler;
  ^~~~~~~~~~~~~~

(From OE-Core rev: 74f4dcfd447fb528ab230e67e3f7ab37e8f93898)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 87c2bef1b9 lsb: Make use of appropriate bitbake variables.
Using of bitbake environment variables in-place of hardcoded strings makes this
recipe portable to all environments.

(From OE-Core rev: 61135e4134b7e0b42b57a87a9a30c32002cb1067)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 63b62e5d80 mdadm: Avoid using hardocded sbin path
Use appropriate bitbake variable inplace of hardcoded sbin path in Makefile

(From OE-Core rev: 9e01148176341916b1fcfebe46d70b75b42777d5)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 4ef916ba24 lttng-modules: Replace '/lib' with ${nonarch_base_libdir}
Do not assume '/lib' for kernel modules location, instead use
${nonarch_base_libdir}. When 'usrmerge' is enabled, kernel modules are not
located in /lib/modules, but /usr/lib/modules.

(From OE-Core rev: d0f99c7f264fb99e7a940e9b02d27a418bafad27)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 89c41301f0 net-tools: Place package content as per bitbake environment.
net-tools Makefile was hardcoded sbin, bin installation paths to /bin and /sbin
respectively.  This change moves the installed files to appropriate location as
per configured bitbake environment.

This might be solved much better way by patching Makefile, but that causing
build issues, as net-tools recipe is using pre-generated config.{h/status}.

(From OE-Core rev: 8be0740f8cc8d909a8983b499f200b99261124c4)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri d582e406ba mktemp: Move installed files only when needed
Move binary(ies) only when ${base_bindir} != ${bindir}.

When usrmerge is enabled they both can point to same location.

(From OE-Core rev: 3a571f24b183ba0bb0795b9df2b2c9bad331d715)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 8c13f318ae firmware: use ${nonarch_base_libdir} for firmware installation.
Replace hardcoded '/lib' in kernel firmware installation path with
${nonarch_base_libdir}.

(From OE-Core rev: eebf0028f5cb30468fe5cd273a01b004a3936e21)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 0decf1cc1c kernel: use ${nonarch_base_libdir} for kernel modules installation.
Replace hardcoded '/lib' in kernel modules installation path with
${nonarch_base_libdir}, which is meant exactly for this.

(From OE-Core rev: 22f5ba7154fcbe826d0a3283740903312b2aab46)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri 6a2e06e5d4 util-linux,shadow: Make 'nologin' alternative command
Both shadow and util-linux packages provides 'nologin' binary in ${base_sbindir}
and ${sbindir} respectively, this leads to conflict when 'usrmerge' feature is
enabled, where ${sbindir} == ${base_sbindir}. Hance, handle this to alternative
system to resolve the conflict.

(From OE-Core rev: 07d6d0fb4dc689008bb0022d7d2ecc890c9159e5)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00
Amarnath Valluri f808bce13f util-linux: Make sure '${base_bindir}/reset' is part of util-linux-reset package.
update-alternative.bbclass might rename the 'reset' binary when LINK_NAME ==
TARGET, This is true (${base_bindir} == ${bindir}) in 'usrmerge' distros.
Hence, suffix with * to properly package the renamed binary.

(From OE-Core rev: ebf5cc1a6fecb0761fd88e113fac785b49bc1a45)

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:20 +00:00