Commit Graph

1731 Commits

Author SHA1 Message Date
Richard Purdie 94abdb2eea linux-yocto: Work around PAT issue on qemux86
We have an issue with PAT handling on older processes with limited PAT bits,
see the patch description for the full problem. This replaces the runqemu
workaround with a kernel patch until we can get the kernel trees sorted
out and discuss a proper fix with upstream. It should be safe everywhere
so is applied unconditionally.

(From OE-Core rev: e00f0794a535c8e68ae1c87c8b01dd65645d570b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:45 +00:00
Ed Bartosh ab7cb65ab5 wic: fix processing of --use-uuid
Processing of this option was lost during recent change of
wks parsting. It was discovered during the work on booting
wic images under qemu. Now, when -use-uuid is fixed it's
possible to specify root partition by partition uuid.
This will be done in the following commit.

(From OE-Core rev: b4882e0b84d7fd4c85ee95386e94722485eafc2b)

(From OE-Core rev: 73e9e3f150bf2de9b27c2ccc73e3dee334ee73fe)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh c26a9c3afd runqemu: support path/to/<image>-<machine>.wic
Supported providing wic image path to runqemu:
  runquemu path/to/<image>-<machine>.wic

[YOCTO #8691]

(From OE-Core rev: 58a3bfb1e4b493200820cdf0bf3fc79e31e792de)

(From OE-Core rev: e6150971ea4eea49b802a12aea5ab733e894c92d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh c7f0578b78 runqemu: don't set KERNEL for wic images
Wic images should be boot as is, without pointing qemu to the kernel
binary. Current code doesn't use kernel, but sets KERNEL variable and
shows kernel path in the console output. This can confuse users.

Changed runqemu and runqemu-internal code to avoid setting KERNEL
variable and show kernel path.

(From OE-Core rev: 474caa7ed5ff05caa5d49d270b283882fa616ed1)

(From OE-Core rev: 35e776e00cce25f2c9c45500612fb66022ec4739)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:44 +00:00
Ed Bartosh 2c3a009b20 runqemu: add support for wic images
Quemu should be able to run wic images this way:
    runqemu <machine> <image recipe> wic

Tested with 'runqemu qemux86-64 wic-image-minimal wic'

(From OE-Core rev: 8716be799949cb8bde7fa49cbea61312a3a93bb7)

(From OE-Core rev: dd42931bf99b8bbd4ad452b3941d957f41b81796)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:43 +00:00
Jan Sarenik 64d2f13d1a scripts/sstate-cache-management.sh: Change wording
Use "out of" rather than "from" in the output.

(From OE-Core rev: c712529030c71b45bb8ae647c17319c2647aedff)

Signed-off-by: Jan Sarenik <jajomojo@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-15 16:28:43 +00:00
Richard Purdie 4e0b33413f scripts/runqemu-internal: Work around qemux86 PAT bugs in linux 4.4.1
Since the upgrade of qemux86 to 4.4.1 we're seeing PAT issues when
starting the X server. We need to fix the problem but the failing
sanity tests mask out other issues and we need a workaround.

Merge this for now until we can figure out the full issue. This is
better than changing the kernel defconfig or reverting to old
kernel versions.

(From OE-Core rev: 2749ba318bf322cb5014689532372473004e92b9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-12 18:03:46 +00:00
Paul Eggleton a5095d146d recipetool: create: set S when we set SRC_URI from local git repo
If you specify a local directory which happens to be a git repository
with an origin remote (and it is in fact remote), we can use that for
SRC_URI as implemented by OE-Core revision
b143d414846854dc8b3e0a47358daf5646eded38, however we also need to set S
if the recipe is going to be of any use fetching from that SRC_URI
later.

(From OE-Core rev: 8bbbd2d63f1bc752f9a30054a089dc2caf5fd84c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton ca5a36cbd1 recipetool: create: convert http git URLs that don't end in .git but contain /git/
When recipetool create is given a URL that starts with http(s):// and
contains /git/, such as the URLs at git.yoctoproject.org, it's fairly safe
to assume it's a git repository and not something that should be fetched
with wget, so rewrite the URL.

(From OE-Core rev: 3ca04757a670e8b6f78799cc0454d75691809ac4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton 4c71afb378 recipetool: create: ensure URL parameters don't make it into the name
When auto-detecting the name for a recipe from the URL, strip off any
parameters (";name=value...") before parsing the URL, otherwise this
just ends up in the recipe name which is undesirable.

(From OE-Core rev: d3c46b5d0abd56bcadd4f2f1ef985f13d67f605b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton 86f3464b47 devtool: add: fix adding from a local source directory
Fix a regression introduced in in OE-Core revision
aedfc5a5db1c4b2b80a36147c9a13b31764d91dd where specifying a local source
tree without specifying a name resulted in a traceback.

Fixes [YOCTO #9086].

(From OE-Core rev: 67ea9d21f20a371a0ee443b46326018cb1527b62)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton fa50153bc2 devtool: modify: make -x the default behaviour
It's going to be more common for users not to have the prepared source
tree for a recipe already, so the default behaviour ought to be to
extract it for them from the recipe. Change the default to extract
(effectively making the -x option a no-op) and add a --no-extract/-n
option to disable it. Later we can look at trying to be smart and
reusing an existing source tree instead of erroring out if it exists;
for now this is just the default reversal.

(From OE-Core rev: 80a44e52609a89d9ffe816181ae193af491c06ac)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton f767757b3e recipetool: create: determine name/version from github/bitbucket URLs
Both BitBucket and GitHub provide "release" downloads that unfortunately
don't include the actual project name. For recipetool this means we have
to have special handling for these URLs or else the current code assumes
the name of the project is something like "v0.9.1". Borrow and adapt
some code from autospec to do this, and put it in its own function for
clarity.

(From OE-Core rev: e8435fde7f82c39cc0efe1d4bf043b29f63898e9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton d94c7e367c recipetool: create: support cmake find_library directive
CMake supports a find_library() directive to find named libraries, so
detect dependencies from this.

(From OE-Core rev: d0265bc67f797ee4b7760cf37335994133809abf)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:03 +00:00
Paul Eggleton ddfe74447b devtool: commit for extra tasks that modify source when extracting
When extracting source for a recipe, if there are additional custom
tasks run that make changes to the source, create a commit in the
generated git branch so they are contained. This is particularly
useful for tasks that come before do_patch since otherwise the changes
might get incorporated in the first applied patch, but otherwise it
helps avoid the tree being dirty at any point.

Fixes [YOCTO #7626].

(From OE-Core rev: 997a77d9b20af1778b804778e5d8c8a7424f7582)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:33:02 +00:00
Christopher Larson 6fab5fc1bb recipetool.newappend: add -e/--edit argument
(From OE-Core rev: 2bd518fe3a8cb0022a816a7d1ac8d9a3dedee6d9)

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-11 12:27:49 +00:00
Ross Burton 9237097b79 python: merge python-elementtree into python-xml
python-xml depends on python-elementtree as the latter just contains a C library
used by the former.  However there's no point to this split apart from
increasing the number of packages, so merge -elementtree into python-xml.

(From OE-Core rev: 5f7206eba3953b7f29148ecfb791995773ee5fc7)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-11 12:27:45 +00:00
Maciej Borzecki 7d5d8d0cd9 scripts/lib/bsp/engine: trailing whitespace cleanup
(From meta-yocto rev: 3f19a080b2370c0317f88299d392a5b1a5f9c830)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-08 10:54:56 +00:00
Maciej Borzecki dfeda17ca1 scripts/lib/bsp/engine: fix path separator
Make path to newly generated README file legitimate

(From meta-yocto rev: 32286bb798c2778457b5578b4b590629c96a0ee2)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-08 10:54:56 +00:00
Ioan-Adrian Ratiu eb134c6ee6 isoimage-isohybrid.py: fix cpio working directory
Take `pwd` to be <initial-dir>. The %s path is relative to it. The value
of %s is "output_folder/build". The current code works as follows:

Changing directory to %s and finding the sources (after cd'ing) to cpio
with output redirection to %s/initrd.cpio triggers the following error

"Error: exec_cmd: cd output_folder/build/INITRD && find . | cpio -o -H
newc >output_folder/build/initrd.cpio  returned '1' instead of 0"

This happens because after the cd, `pwd` is <initial-dir>/%s and by the
redirect we write the result to to <initial-dir>/%s/%s/initrd.cpio which
obviously does not exist.

Fix this by getting the sources with "find %s" instead of "cd && find ."

(From OE-Core rev: 07fa4783566d22d46ce719a621eee5404932dbbe)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07 17:29:59 +00:00
Richard Purdie 32b498cba3 scripts/devtool: Add getVarFlag expand argument
(From OE-Core rev: afa9b1081848cf0dbc40bbaf565bcc2ee19e8f6e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06 23:10:44 +00:00
Dominique Hunziker 149cb1769b python-distutils: add missing dependency on python-email
(From OE-Core rev: 1a8efbf4f06d9274cd60ada61d34b6bf42c15dc0)

Signed-off-by: Dominique Hunziker <dominique.hunziker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:02 +00:00
Mihaly Varga 0b82af2aed wic: isoimage-isohybrid: check for syslinux-native
.iso image creation fails if during the image creation syslinux
is baked and syslinux-native is not.

Added new check to verify if both syslinux and syslinux-native
are baked and bake them if these are not installed.

(From OE-Core rev: fd5749832960ad3b85697c2878490d6f008982a3)

Signed-off-by: Mihaly Varga <mihaly.varga@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:02 +00:00
Maciej Borzecki 789463333f wic: default to empty bootloader config
A kickstart file for non-x86 boards may have no 'bootloader' stanza. It
is the usual case if bootloader is setup using other mechanism than
through wic, and is for instance a part of u-boot configuration. In such
case the 'bootloader' field in the KickStart class will be
uninitialized. Instead of adding an empty bootloader line in every
kickstart file call the bootloader parser with empty argument list to
get defaults namespace.

(From OE-Core rev: 264c03e854f77c3b62acb710384f66716ccbf469)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04 23:39:01 +00:00
Olof Johansson 5c35883efc bitbake-whatchanged: avoid double do_ task name prefix
When used with --verbose, the heading for each task looks like

  === The verbose changes of example.do_do_compile:

This should instead be

  === The verbose changes of example.do_compile:

(From OE-Core rev: 628ad5e06d1136809d110a71148721095cb084dc)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-30 11:37:00 +00:00
Paul Eggleton 2c14be3507 gen-lockedsig-cache: fix bad destination path joining
When copying the sstate-cache into the extensible SDK, if the source
path had a trailing / and the destination path did not, there would be a
missing / between the path and the subdirectory name, and you'd end up
with subdirectories like "sstate-cacheCentOS-6.7". There are functions
in os.path for this sort of thing so let's just use them and avoid the
problem.

(From OE-Core rev: 5eb8f15c48b5f39a10eb2b63b026cf1ebfd05533)

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-01-26 22:32:00 +00:00
Ross Burton 2495dfafad scripts/wipe-sysroot: also delete uninative sysroot
The uninative sysroot is in ${STAGING_DIR}-uninative so delete that alongwith
$STAGING_DIR.

(From OE-Core rev: 258668c3cb8f5c00e084e821dae05ba750768bfb)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-26 22:31:58 +00:00
Markus Lehtonen aadb879e5b devtool: extract: use the correct datastore for builddir
(From OE-Core rev: 6f5bec4570a9237681fcee3922209af2a48f6c07)

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-01-26 22:31:58 +00:00
Paul Eggleton 89a7ed5b67 devtool: add configure-help subcommand
When you need to set EXTRA_OECONF for a recipe, you need to know what
options the configure script actually supports; the configure script
however is only accessible from within a devshell and (at least in the
case of autotooled software fetched from an SCM repository) may not
actually exist until do_configure has run. Thus, provide a "devtool
configure-help" subcommand that runs the configure script for a recipe
with --help and shows you the output through a pager (e.g. less),
prefaced by a header describing the current options being specified.

There is basic support for autotools, cmake and bare configure scripts.
The cmake support is a little hacky since cmake doesn't really have a
concise help option that lists user-defined knobs (without actually
running through the configure process), however that being a design
feature of cmake there's not much I can think of to do about that at
the moment.

(From OE-Core rev: 0e5d84d9705091b338000ef02720cfa090f76888)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-26 18:05:14 +00:00
Paul Eggleton 84720c8ce9 devtool: properly handle bb.build.FuncFailed when extracting source
When we run the tasks required to extract the source for a recipe (e.g.
within "devtool modify" or "devtool extract") if one of those tasks
fails you get a bb.build.FuncFailed exception; handle this properly so
you don't see a traceback.

(From OE-Core rev: 95d8631b3bdf216001e57f48277535c65a4cc49e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-26 18:05:13 +00:00
Paul Eggleton c3f0f7be84 devtool: add: warn if modified recipe found in attic directory
If a recipe generated by "devtool add" has been modified since then when
you run "devtool reset", it will be moved into the "attic" subdirectory
of the workspace in case those modifications need to be preserved. It
seems natural that if those modifications were worth preserving we
should warn the user if such a file exists when they run "devtool add"
to create the same recipe again, so they can pick up where they left off
if they want to.

(From OE-Core rev: 0a39b907ff997c3a62c92ab22325c726b612de5b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-26 18:05:13 +00:00
Paul Eggleton e559b66289 devtool: build-image: allow specifying packages to add to image
Provide an option to devtool build-image to specify the list of packages
instead of taking the list of packages produced by recipes in the
workspace. Sometimes you don't want all of these packages; other times
you want to add more.

This is the most immediate fix for [YOCTO #8855], though it is a little
crude so I would like to provide better means of customising the image
contents later.

(From OE-Core rev: b3a44951a74fe58714b72e71a7a558b67a71e1e3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-26 18:05:13 +00:00
Paul Eggleton e00eac862e devtool: move edit-recipe to a separate module
standard.py is getting a bit large; move the "utility" commands to
another module.

(From OE-Core rev: 5089b93f5b341dc28c343f7afe15efda2081ed36)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-26 18:05:13 +00:00
Markus Lehtonen 7a52f67e59 build-perf-test.sh: add eSDK testing
Add simple initial eSDK test. Currently, only download size and
installation time of eSDK is measured. The eSDK to be tested is
generated from the same image that the other tests are run for. This
patch will add two new fields to the global results log and that needs
to be taken into account when examining the results.

(From OE-Core rev: c903c1e1f36a4dd1dc1b7a621fa7a6ffe7411119)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-25 12:44:13 +00:00
Markus Lehtonen 5c367eccf8 build-perf-test.sh: more generic timing function
Make it possible to time also other than bitbake commands. The name of
the log file is changed from bitbake.log to commands.log.

(From OE-Core rev: 7b355dc96255b06f3108a7d02ab0ed408d64bf1b)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-25 12:44:13 +00:00
Paul Eggleton c1f4e929c9 recipetool: create: better fix for fetch error handling
I was a little bit hasty in OE-Core revision
c2cc5abe34169eae92067d97ce1e747e7c1413f5 - it turns out BitBake's
fetcher code is not consistent in whether it logs something useful or
not; when fetching from an http URL it does but with a git repository
it doesn't. In advance of any major reworking of fetch error handling in
BitBake, let's just print the text of the exception and then we know we
have shown something to the user.

Additionally, we were only catching FetchException here but there are
several other classes of exception that the fetcher can raise (e.g.
MalformedUrl); catch the parent BBFetchException class instead so we
avoid tracebacks for those other classes as well.

(From OE-Core rev: 578d3873a6415c9203c185c21cff472f7d2dab02)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Paul Eggleton 10c8d14d1a recipetool: create: fix extraction of name from URLs ending in /
If the URL ends in a / then we want to strip that off the path we split
out of the URL before calling os.path.basename() on it.

(From OE-Core rev: 308189beda8a31541481d09e3d5e86187e843d8d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Paul Eggleton b307e0a604 recipetool: create: extract SRC_URI from local git repositories
If you specify a local directory which happens to be a git repository
with an origin remote (and it is in fact remote), we can use that for
SRC_URI rather than leaving it blank in the recipe.

(From OE-Core rev: b143d414846854dc8b3e0a47358daf5646eded38)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Paul Eggleton 50e40fc91f devtool / recipetool: support specifying a subdirectory within the fetched source
Sometimes you don't want to build an entire project, just a subdirectory
of it; add a --src-subdir option to make that easier. (We still look for
a single subdirectory in what gets unpacked, e.g. what you might find
within a tarball, so whatever you specify with this option is added onto
the end of that.)

(From OE-Core rev: 59682d78f95732e014f78f13e0a05f843860d9bb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Paul Eggleton 7e1691de0a recipetool: create: strip quotes from values extracted from CMakeLists.txt
Quoting is optional in CMakeLists.txt and is occasionally used, so strip
out quotes if they are present.

(From OE-Core rev: 4ffe2e1ec9df05b92a2ad5746fb0ca6d218fd77e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Paul Eggleton 477fa84390 gen-lockedsig-cache: copy correct native sstate into ext SDK
When constructing the sstate-cache directory for the extensible SDK,
we were copying in any matching native sstate packages, and as the
signature doesn't actually change when the distro changes (since
NATIVELSBSTRING is just a path separator for the artifacts and is not
part of the signature) we ended up copying duplicated packages when the
distro changed e.g. upon host distro upgrade. Only search in the
NATIVELSBSTRING-named subdirectory for native packages and the issue
goes away.

Fixes [YOCTO #8885].

(From OE-Core rev: 6c6baf6aa1823b8b20123f505e45c2768a193ad5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:33 +00:00
Paul Eggleton b435225e8a devtool: add sdk-install subcommand
Add the ability to install additional pre-built items (from shared
state) into the extensible SDK. This can already be done implicitly by
adding something to DEPENDS within a recipe you're working on and then
running "devtool build", but it's useful to be able to explicitly
install things particularly if you're using the extensible SDK as a
traditional toolchain.

Note that for this command to be useful you need to have SSTATE_MIRRORS
set in your SDK configuration, and that mirror needs to be populated
with sstate artifacts for recipes you wish to be able to install.

(From OE-Core rev: 3474a42954908d1688fd3a6cb600eed315b27833)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:32 +00:00
Paul Eggleton 44d1a2a45c devtool: sdk-update: improve SDK update process robustness
Make the following improvements to the SDK update process:

* Use a manifest file with sha256sums to track files other than sstate
  and metadata that we need to update - e.g. conf files. This allows us
  to handle where files such as auto.conf may or may not be present,
  as well as the configuration changing without affecting task signatures
  - we still want the config files copied in that case rather than it
  saying nothing needs to be done.
* Write the SSTATE_MIRRORS_append to site.conf rather than local.conf
  so that local.conf remains static (since we don't want to trigger an
  update every time). Also, If there is an SSTATE_MIRRORS value already
  set in the configuration we can skip this and assume it contains the
  needed packages.
* Allow the update process to be run in any directory, don't assume
  we're already at the base of the SDK
* Where practical, fetch remote files into a temporary location and
  then move them to the desired location at the end, to avoid a
  failed update leaving the SDK in a broken state.
* Update all installed do_populate_sysroot / do_packagedata tasks
  instead of using the SDK targets. This ensures any item installed
  through dependencies after installation (e.g. when running
  "devtool build") won't go stale.

(From OE-Core rev: 3d35631121f0e030bc8151f5c23d84008d06f44b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:32 +00:00
Paul Eggleton 3360baa96b devtool: sdk-update: improve temp directory handling
* Use tempfile.mkdtemp() instead of hardcoding temp dir
* Set a variable early for the temp locked sigs file and use that
  everywhere
* Delete the temp dir at the end

(From OE-Core rev: bad5d1a8c047a8118d30d9fa708b021d1599e0dc)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:32 +00:00
Paul Eggleton d193531d5e devtool: build: ensure pkgdata is written out
When you run devtool build, you need to have the pkgdata written out at
the end, so that if what you're adding is a library and the next thing
you add is something that depends on that library, the necessary
information to map the dependency back to the recipe is present. In
practical terms all this means is we need do_packagedata to run in
addition to do_populate_sysroot.

This does mean that do_package needs to run which wasn't running before,
and that means that the few package QA tests that run within do_package
such as installed-vs-shipped will now be run. This may be a bit
bothersome, and prompted a fix for one of our oe-selftest tests as a
result, but I don't see an easy way around it. Ultimately if you care
about using the recipe in an image you'll need to fix any such errors
anyway.

Fixes [YOCTO #8887].

(From OE-Core rev: 6579c7120ee5a541427ff5b6b07f838d52f9fe7c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:32 +00:00
Paul Eggleton d3a4f72896 classes/populate_sdk_ext: add option to bring in pkgdata for world
Add a variable SDK_INCLUDE_PKGDATA which you can set to "1" to include
pkgdata for all recipes in the world target. There are a couple of uses
for this:

1) If you use "devtool add" to add a recipe that builds something which
   depends on anything in world, the dependency can then be correctly
   mapped to the recipe providing it and that recipe can be added to
   DEPENDS, since we have the pkg-config and shared library dependency
   data within pkgdata.
2) You'll be able to search for these recipes and any files they
   package for the target with "devtool search" since that also uses
   pkgdata

This of course assumes you've tailored world through EXCLUDE_FROM_WORLD
to only include recipes you'd want built in your distro, but I think
that's a reasonable assumption; failing that there is a
WORLD_PKGDATA_EXCLUDE variable that you can set to exclude any recipes
you don't want.

Note that this patch relies on functionality implemented in a recent
BitBake patch and will not work without it.

Implements [YOCTO #8600].

(From OE-Core rev: 67149ea097d6fab7496b43e85a40853f40bd527e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24 09:40:32 +00:00
Alejandro Hernandez 2a608cce9f python-setuptools: Upgrade to 19.2
Upgrades python-setuptools to 19.2, easy_install works out of the box
adds the package python-plistlib to the manifest as it is needed by
setuptools now, and also updates runtime dependencies

(From OE-Core rev: 25efefac9f68d34bbb109645a515010b846c3a8b)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:07:14 +00:00
Ed Bartosh 35855a02f8 wic: pylinted ksparser module
Added missing docstrings, fixed wrong indentation and long lines.
Final pylint score is 9.89/10

(From OE-Core rev: 6e5dd42727b40c6b5ba6235026a6cfc78f482ac9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:07:14 +00:00
Ed Bartosh e3b3bcf07a wic: add help for 'include' command
Added description of 'include' parser command to the
'wic help kickstart' output.

(From OE-Core rev: 7481f39382e63ecbb5de406559cc28e5689bd974)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:07:14 +00:00
Ed Bartosh bfaabe5209 wic: move parts of canned .wks into common.wks.inc
In order to give and example of 'include' feature of ks parser
and for testing purposes common parts of 3 canned wks files were
moved into common.wks.inc

(From OE-Core rev: 629c6381669bd4acdb1613229cd095881d2d9cd2)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-20 17:07:13 +00:00