Commit Graph

1809 Commits

Author SHA1 Message Date
Humberto Ibarra 1dd9348008 scripts/lib/bsp/help.py: Add missing options to yocto-bsp help and usage
Add the options --codedump and --skip-git-check to the yocto-bsp help and
yocto-bsp usage, since they are currently missing.

[YOCTO #8322]

(From meta-yocto rev: dfdf97b4239639affc8ce22e338a291d4b0dfc76)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-26 08:06:36 +00:00
Robert Yang b47c53b70e runqemu-internal: split the code into functions
Use config_<machine> to split the code into separate functions, so that
different machines won't affect each other, and they will have a better
structure.

(From OE-Core rev: 6098a72e8d21f6321636e727703ca7c29d9af142)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Robert Yang fae732f24e runqemu-internal: cleanup unsed code
* remove akita and spitz related code
  They are not supported by runqemu anymore:
  $ runqemu spitz
  Error: unable to classify arg [spitz]
  So remove related code.

* Remove checking of 256M for qemuarm, qemu can check it, for example:
  $ runqemu qemuarm qemuparams="-m 1024"
  [snip]
  qemu: Too much memory for this machine: 1024 MB, maximum 256 MB
  [snip]

(From OE-Core rev: 36fb785bf8cd2f387c91d52f597602a5dbc3948b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Robert Yang e469bb722e runqemu: simplify checking for iso and ramfs
(From OE-Core rev: 69a1fca4374797dea56035ce56a17441a2ca9280)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Robert Yang 3610329929 runqemu: add support for qcow2 and vdi
[YOCTO #9168]

(From OE-Core rev: 0f8306c77b4ebed1ff127b0786b7109abf0d57cd)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Robert Yang d85ca4a616 runqemu: remove ISO and RAMFS from help text
They don't work, and the script can check the type correctly.

(From OE-Core rev: b5cc1e70dbd5df160ddedcaa40d0ab714a307561)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Robert Yang 58bc8542de runqemu: simplify the checking for vm images
* So that we can add more image support easliy.
* I think that wic should be vm images.

(From OE-Core rev: 82d0014a0e1526ffa1ff7c8ea3903aeae31bada4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Robert Yang 6716eb245d runqemu: fix ROOTFS for vmdk
* Make it can boot scsi and virtio block drive such as root=/dev/sdX and
  /dev/vdX.

* Drop VM from help info, id doesn't work, and the script can check
  whether it is a vm disk or not.

* Make it can be run by:
  $ runqemu tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.vmdk
  or:
  $ runqemu qemux86-64 vmdk

[YOCTO #9170]

(From OE-Core rev: 88c081b10902ec52928be78ad320c474bb918e01)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Paul Eggleton 13a31b15ec oe-publish-sdk: fix remote publishing
A typo in the command prevented the last part of the publish from
succeeding.

(From OE-Core rev: 5d51bd1f02fb20e02d0de0ac9874d7f9a6f5ddc6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:14 +00:00
Paul Eggleton 9926425bbd oe-publish-sdk: improve help output slightly
This was just copy-and-pasted from devtool - set a reasonable
description and tweak the sdk parameter help text.

Also add a copyright statement and drop the opening comment describing
the command-line syntax that duplicated the help output (with at least
one mistake in it).

(From OE-Core rev: b18f9cb62e12d068fb840fd7ab9f35b4f039e649)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 905286ce46 oe-publish-sdk: drop SDK installer file from published output
We don't really need the SDK installer in the published output, for two
reasons:

1) The directory produced is for the consumption of devtool sdk-update,
   and the installer isn't used by that at all
2) It wouldn't really make sense to point users at the update directory
   to download the SDK installer because it contains a bunch of things
   that aren't meant for manual download, so it wouldn't be very tidy.

Leaving the file present can mislead you into thinking the opposite of
both of the above.

(From OE-Core rev: a9ec72b7897ffc0b901c1ccbcbe3cabbc7ac41ee)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 0523378082 devtool: add: create git repository if URL specified as positional argument
When we add from a fetched URL we are supposed to turn the resulting
source tree into a git repository (if it isn't already one). However, we
were using the older deprecated option name here instead of the
positional argument, so "devtool add -f <url>" resulted in the repo
being created but "devtool add <url>" didn't, which was wrong.

Also update the oe-selftest tests to check that this worked.

(From OE-Core rev: a7b6b1f8cc1c096724f794ac9dee312b0f771f66)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 11c1d30152 devtool: add: delete externalsrc files on npm recipe do_install
The npm class just installs whatever is in ${S}; if you're using
externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs
by default) plus singletask.lock will end up in the final package, which
isn't really right. Introduce a variable so we know the path the files
will be installed into within npm.bbclass, and append to do_install
within the workspace bbappend to delete the files.

(From OE-Core rev: 766845e06db9d7d595e836ea1364c16fa132a413)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 552a68ad1c devtool: configure-help: fix error if do_configure not already run
The code here for running do_configure if it hadn't already been run was
using the wrong string substitution parameters; fix it and test it.

(From OE-Core rev: b2677a4448dbc42e523c731b953b44006749252c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Paul Eggleton 06845723d4 devtool: sdk-install: add option to allow building from source
By default the sdk-install subcommand expects to restore the requested
items from sstate and fails if it can't. If the user is OK with building
from source, add a -s/--allow-build option to allow them to do that. In
the process, ensure we show the status output while we're installing.

Also add the missing header to the top of the file.

(From OE-Core rev: a86b426cdd465ec5cb08bb5fa7729e4e673d94bb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:13 +00:00
Peter Kjellerstedt dab6d59e47 oe-buildenv-internal: Correct the sed expression which updates $PATH
Without this, the code that adds paths to $PATH could cause it to end
up with a trailing : which would then cause an error from the sanity
checker.

(From OE-Core rev: 9c200760cbbe322ed884729eb395f389c863e1c8)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-21 11:57:31 +00:00
Peter Kjellerstedt 76f10fd046 oe-buildenv-internal: Some clean up
* Consistent indentation (four spaces)
* Use [ -z ...] and [ -n ... ] where possible
* Unset temporary variables
* Use $(...) instead of `...`
* Avoid an unnecessary call to expr

(From OE-Core rev: 791eec016792c3f4c04b12ae6ff93c1e23266f87)

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>
2016-03-20 23:12:30 +00:00
Peter Kjellerstedt 4d1efc38ca oe-buildenv-internal: Add variables individually to BB_ENV_EXTRAWHITE
Instead of adding all variables to BB_ENV_EXTRAWHITE as one, treat
them separately and add them one by one as needed.

(From OE-Core rev: 516b63fd9dea6fcc304fca920206467d2565dede)

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>
2016-03-20 23:12:30 +00:00
Peter Kjellerstedt 39ac332f66 oe-buildenv-internal: Add paths to $PATH individually
Instead of assuming that the path to the scripts directory always is
in $PATH directly before the bitbake directory, treat them as separate
paths and add them individually to $PATH.

(From OE-Core rev: 5b9e91a3b1d4f56c8646d7d7937ab453cc9c40a0)

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>
2016-03-20 23:12:30 +00:00
Daniel Istrate ee4f61b7e1 oe-selftest: Fixed --list-tests-by tag option
Commit 35be679513 broke the
--list-tests-by tag option.
This patch fixes that.

Having a module in lib/oeqa/selftest named testmodule:
class TestClass(oeSelfTest):
    @tag(feature='tag1')
    def test_func1(self):
        pass
    @tag(feature=('tag1', 'tag2'))
    def test_func2(self):
        pass
    @tag(feature=('tag2', 'tag3'))
    def test_func3(self):
        pass
    @tag(feature=('tag1', 'tag2', 'tag3'))
    def test_func4(self):
        pass

$ oe-selftest --list-tests-by tag tag1
 ID  TAG(s)            NAME        CLASS      MODULE
----  ----------------  ----------  ---------  --------
      tag1              test_func1  TestClass  testmodule
      tag1, tag2        test_func2  TestClass  testmodule
      tag1, tag2, tag3  test_func4  TestClass  testmodule
______________________________
Filtering by:	 tag
Looking for:	 tag1
Total found:	 3

$  oe-selftest --list-tests-by tag tag1 tag2
  ID  TAG(s)            NAME        CLASS      MODULE
----  ----------------  ----------  ---------  --------
      tag1              test_func1  TestClass  testmodule
      tag1, tag2        test_func2  TestClass  testmodule
      tag1, tag2, tag3  test_func4  TestClass  testmodule
      tag2, tag3        test_func3  TestClass  testmodule
______________________________
Filtering by:	 tag
Looking for:	 tag1, tag2
Total found:	 4

$ oe-selftest --list-tests-by tag tag*
  ID  TAG(s)            NAME        CLASS      MODULE
----  ----------------  ----------  ---------  --------
      tag1              test_func1  TestClass  testmodule
      tag1, tag2        test_func2  TestClass  testmodule
      tag1, tag2, tag3  test_func4  TestClass  testmodule
      tag2, tag3        test_func3  TestClass  testmodule
______________________________
Filtering by:	 tag
Looking for:	 tag*
Total found:	 4

(From OE-Core rev: 28c1cffacf341ad64a5b68d8a0176f92b49135c0)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:29 +00:00
Markus Lehtonen 51464e7b89 devtool: change config symlink name to .config.new
Otherwise (if the symlink is named .config) kernel build considers
source tree as dirty and fails.

[YOCTO #9270]

(From OE-Core rev: d36699b28c661880957d744420df9e23cdd76957)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:27 +00:00
Paul Eggleton 600b7007f6 recipetool: create: don't create extra files directory unconditionally
The extra directory next to the recipe should only be created if there
are files to put into it; currently only the npm plugin does this. I
didn't notice the issue earlier because the test was actually able to
succeed under these circumstances if the recipe file came first in the
directory listing, which was a fault in my original oe-selftest test;
apparently on some YP autobuilder machines the order came out reversed.

With this change we can put the oe-selftest test that highlighted the
issue back to the way it was, with an extra check to reinforce that only
a single file should be created.

(From OE-Core rev: b8b778345eb0997c2cd952a1f61fdd2050b6b894)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20 23:12:25 +00:00
Humberto Ibarra 9dbfbe9940 scripts/oe-selftest: Add short names to most common options
Add short names to most common options in oe-selftest. The options
changed were --run-tests, --run-all-tests, --list-tests and
--list-modules.

[Yocto #9079]

(From OE-Core rev: 05f699e3c2847f0c64118df8ffd43bf2f95ed4d1)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:48 +00:00
Ross Burton 9e69963f11 python: move ast module into python-core
The compile() method returns objects that inherit from ast.AST so it's best that
python-core contains this class.

[YOCTO #8684]

(From OE-Core rev: 48bc643a4ebe74d0fa49fedbe7b0fd63fd0003e8)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:47 +00:00
Humberto Ibarra 35be679513 scripts/oe-selftest: Add search expression matching to run/list options
The oe-selftest script required an exact matching for the parameters
passed to its run-tests-by and list-tests-by options. Many tests
can be retrieved here and filtering is a must.

This patch add this filtering functionality by enabling the use
of wildcards such as "*".

[Yocto #8916]

(From OE-Core rev: 01a242645cc12daed3f4da30d8c49813642d75e6)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:47 +00:00
Paul Eggleton bc0e99d2b1 recipetool: create: shrinkwrap and lockdown npm modules
"npm shrinkwrap" creates a file that ensures that the exact same
versions get fetched the next time the recipe is built. lockdown is
similar but also includes sha1sums of the modules thus validating they
haven't changed between builds. These ensure that the build is
reproducible.

Fixes [YOCTO #9225].

(From OE-Core rev: 277377f13b2b771915eb853e336ca24b84523ed1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton 309b2e6c57 recipetool: create: support creation of additional files by plugins
Allow plugins to create additional files to go alongside the recipe. The
plugins don't know what the output filename is going to be, so they need
to put the files in a temporary location and add them to an "extrafiles"
dict within extravalues where the destination filename is the key and
the temporary path is the value.

devtool add was also extended to ensure these files get moved in and
preserved upon reset if they've been edited by the user.

(From OE-Core rev: 334b9451111b7e3efbb43b3a4eecebcab8ec6f0e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton 2279eb2a4c recipetool: create: check if npm available if npm:// URL specified
If the user specifies an npm:// URL then the fetcher needs npm to be
available to run, so check if it's available early rather than failing
later.

(From OE-Core rev: a08d12ad867c292f7474731a0fe5e51e712446d6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton 91455005b6 recipetool: create: split npm module dependencies into packages
Rather than rolling all of an npm module's dependencies into the same
package, split them into one module per package, setting the SUMMARY and
PKGV values from the package.json file for each package. Additionally,
mark each package with the appropriate license using the license
scanning we already do, falling back to the license stated in the
package.json file for the module if unknown. All of this is mostly in
aid of ensuring all modules and their licenses now show up in the
manifests for the image.

Additionally we set the main LICENSE value more concretely once we've
calculated the per-package licenses, since we have more information at
that point.

(From OE-Core rev: 8226805f83d21e7c1d2ba21969f3e8ee4b137496)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton d46827cfd3 recipetool: create: add license file crunching
Matching license texts directly to md5sums only goes so far. Some
licenses make the copyright statement an intrinsic part of the license
statement (e.g. MIT) which of course varies between projects. Also,
people often seem to take standard license texts such as GPLv2 and
reformat them cosmetically - re-wrapping lines at a different width or
changing quoting styles are seemingly popular examples. In order to
match license files to their actual licenses more effectively, "crunch"
out these elements before comparing to an md5sum. (The existing plain
md5sum matching has been left in since it's a shortcut, and our list of
crunched md5sums isn't a complete replacement for it.)

As always, this code isn't providing any guarantees (legal or otherwise)
that it will always get the license correct - as indicated by the
accompanying comments the LICENSE values it writes out to the recipe are
indicative and you should verify them yourself by looking at the
documentation supplied from upstream for the software being built if you
have any concerns.

(From OE-Core rev: 553bb4ea5d51be5179e7d8c019740cf61ece76ea)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton 3fd244b94f recipetool: create: match *LICENSE* as a license file
For example, this picks up a file named MIT-LICENSE.txt.

(From OE-Core rev: 103b4d26b340cbdf70bf43906e293f3497671fdc)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton 2b6a35212d recipetool: create: improve mapping for autotools program macros
Make the following improvements to mapping items specified in
AC_CHECK_PROG, AC_PATH_PROG and AX_WITH_PROG to recipes/classes:

* Produce a map of native recipe -> binary for all binaries currently in
  STAGING_BINDIR_NATIVE and use this when mapping items
* Add some more entries to the class map
* Ignore autotools binaries since they are covered by the inherit of
  autotools
* Ignore coreutils-native since that would almost always be a bogus
  dependency

(From OE-Core rev: 5614c5ae6a004d4367eccc34dd3cc7ee61fb7e57)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Paul Eggleton 1607fac521 recipetool: create: be more tolerant of spacing in configure.ac
Allow for whitespace in appropriate places, and ensure we match all
whitespace chars not just the space character.

(This fixes extracting dependencies from tmux's configure.ac, for
example.)

(From OE-Core rev: 63524ac8093b734aa4f29f4ea47bcc036f748314)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 17:00:29 +00:00
Mariano Lopez a27ca6da59 yocto-bsp: Update templates to 4.4 kernel
Add kernel 4.4 support. kernel 4.1 was left in the
tree for user to choose between 4.1 and 4.4.

[YOCTO #9047]

(From meta-yocto rev: c04093ec9b3cd151cf857bca9ad35bc9a0d4a4b1)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 16:58:14 +00:00
Andre McCurdy 424466b91f oe-setup-builddir: tidy up local.conf and bblayers.conf commentary
Remove obsolete reference to enabling parallel build via local.conf.

Unify wording used to explain that local.conf and bblayers.conf have
been created based on defaults.

(From OE-Core rev: 0073679c60c813c7c8d62bff997feb30ce64543c)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09 16:58:11 +00:00
Paul Eggleton e43fcdf1e8 scripts/hob: drop
The Hob UI is gone from BitBake, so we should remove this shortcut
script.

(From OE-Core rev: 414f0d1ef07bb782ffa15ffd9db648ee2b2d1448)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07 17:17:43 +00:00
Paul Eggleton afb1d09ced recipetool: create: fix support for AX_CHECK_LIBRARY
Clearly I didn't test this part of the code - lists don't have an "add"
method. Needless to say I have tested it now.

(From OE-Core rev: 063ed9058a14775f77e7875d4f6ef5719fa03f18)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07 00:11:38 +00:00
Paul Eggleton 25d9c4e02a devtool: add build-sdk subcommand
Add a build-sdk command which is only available within the extensible
SDK that builds a derivative extensible SDK. The idea is recipes in the
workspace become a part of the new SDK - for example, this allows taking
a vendor provided SDK, adding a few libs and then producing a new SDK
with those included.

When normally building the extensible SDK, the workspace is excluded;
here we need to copy into the new SDK (renaming it in the process); the
recipes' task signatures become locked and thus the sources are no
longer needed, so they are removed along with the workspace bbappends
which would interfere with the locked signatures. Additionally we need
to just copy the configuration files (i.e. local.conf and auto.conf)
rather than filtering and appending to them since that work has already
been done when constructing the original SDK. The extra sstate artifacts
from workspace recipes are also determined and copied into the new SDK
in minimal mode (on the assumption that you won't set up a new sstate
mirror).

This reuses some code from build-image, so that needed to be
generalised to allow that.

Implements [YOCTO #8892].

(From OE-Core rev: 59e207ff6dd4b50a8905e14bc9292cf2794f4e7a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07 00:11:38 +00:00
Paul Eggleton 41eb36dc4c devtool: build-image: rename module
Hyphens aren't allowed in python identifiers, so you shouldn't use them
in module names or they are more difficult to import.

(From OE-Core rev: e8f6db9436dfc923e236f2cbc08f357e3b24fd5d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-07 00:11:37 +00:00
Juro Bystricky 14dd07caac sdk.py: Fix undefined variable
"sdk_update" uses a variable newsdk_path, which was never declared.
This would cause the command:

    devtool sdk-update <poky-sdk-latest>

to fail with an error:
NameError: global name 'newsdk_path' is not defined

The remedy is to declare newsdk_path as it was no doubt intended,
corresponding to the argument specifying <poky-sdk-latest>.

[YOCTO#9042]

(From OE-Core rev: 6ac589a4a9290665f8c5295e2e2a03a2b187b957)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03 10:49:00 +00:00
Paul Eggleton 5c5c13d777 recipetool: create: add basic support for new npm fetcher/class
Add detection for npm modules and support for extracting the name and
version from package.json as is usually part of an npm module contents.

Note: this will likely only produce a buildable recipe if you use an
npm:// URL; simply pointing to a node.js source repository isn't going
to fetch the module's dependencies. It also doesn't set up the
shrinkwrap/lockdown automatically, so there is some room for improvement
later.

Implements [YOCTO #8690].

(From OE-Core rev: 41d0e4d75f13b53a6c1b6a8df9be4742be7534e0)

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>
2016-03-02 23:08:51 +00:00
Paul Eggleton 2be37a9373 recipetool: create: add basic support for generating linux kernel recipes
Add support for detecting a Linux kernel source tree and generating a
basic kernel recipe using meta-skeleton's linux-yocto-custom recipe as a
base.

Implements [YOCTO #8981].

(From OE-Core rev: 39cab544b80ca4450106c9ede3180929ba24703c)

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>
2016-03-02 23:08:51 +00:00
Paul Eggleton 5cf15ffecc recipetool: create: add support for out-of-tree kernel modules
Detect kernel modules by looking for #include <linux/module.h>, and
handle the various styles of Makefile that appear to be used. I was able
to use this code to successfully build a number of external kernel
modules I found.

Implements [YOCTO #8982].

(From OE-Core rev: a85604f2eb2438b4caf0832c2ea15b5822f7e9a1)

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>
2016-03-02 23:08:51 +00:00
Patrick Ohly 431c1e171f combo-layer: handle empty commits during "init --history"
When importing the components during the "combo-layer init" with full
history and relocation into a destination directory, components with
empty commits were not handled because the "mv" command was invoked
with just one parameter.

Replacing that with a find/xargs pair avoids the problem and should
also fix the handling of filenames with special characters (in
particular spaces).

(From OE-Core rev: fd9d08b8ba512151615a03fda61a103760a0683c)

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>
2016-03-02 22:39:43 +00:00
Christopher Larson d4da534faa wic: don't throw away our created swap partition
We were creating the partition, mkswap'ing it, and then not dd'ing it into
place in the final image, as source_file wasn't being set for swap partitions.
This would result in a swap partition that couldn't be enabled on target until
mkswap was run.

(From OE-Core rev: 7580942a66f84c2120763c2d9665e2cec8e25138)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:33:04 +00:00
Paul Eggleton 10290f2245 devtool: upgrade: print new recipe name
Make this consistent with "devtool add" so that the user knows where to
find the new recipe.

(From OE-Core rev: 28fea4a104ba85aded2ecfe891e9bf997d72a103)

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>
2016-02-28 11:33:01 +00:00
Paul Eggleton 5cd3be38f2 devtool: upgrade: drop PR on upgrade
The PR value should be reset to the default when upgrading, so we need
to drop it from the newly created file.

(From OE-Core rev: 4acf8a6912106dd3da5ceee9e30ccce86211d04b)

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>
2016-02-28 11:33:00 +00:00
Paul Eggleton e6f684b10c devtool: upgrade: eliminate unnecessary datastore copy
We aren't modifying the datastore copy here, so we don't need a copy at
all.

(From OE-Core rev: 9f05bf98d4dbcb991b684a2ab480c6638c6be292)

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>
2016-02-28 11:33:00 +00:00
Paul Eggleton 860574edb2 devtool: upgrade: fix several issues with extraction of new source
Fix several issues when extracting the new version source over the top
of the old one (when the recipe is not fetching from a git repo):

* Delete the old source first so we ensure files deleted in the new
  version are deleted. This also has the side-effect of fixing any
  issues where files aren't marked writeable in the old source and thus
  overwriting them failed (harfbuzz 1.1.3 contains such files).
* Fix incorrect variable name in abspath statement that made it a no-op

(From OE-Core rev: 4f7595a514661f0e2418393286849a1cb6c46f0d)

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>
2016-02-28 11:33:00 +00:00
Paul Eggleton 66a781c7e1 devtool: upgrade: fix constructing new branch from tarball releases
When we do an upgrade from one tarball version to another we want to:

1) Check out the old version as a new branch
2) Record the changes between the old and new versions as a commit
3) Check out the old version with patches applied
4) Rebase that onto the new branch

Where we went wrong was step #1 where instead we checked out the old
version with patches applied as the new branch, which meant the rebase
didn't do anything and any changes made by the patches to files still in
the new version were wiped out.

(From OE-Core rev: a4f3e6d5f4c549e36cce1e18801a565a3a3c9b0a)

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>
2016-02-28 11:33:00 +00:00