aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2016-03-26oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITEAndre McCurdy
Use 'sort --unique' to combine the two lists and remove duplicates. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23runqemu-internal: split the code into functionsRobert Yang
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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23runqemu-internal: cleanup unsed codeRobert Yang
* 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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23runqemu: simplify checking for iso and ramfsRobert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23runqemu: add support for qcow2 and vdiRobert Yang
[YOCTO #9168] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23runqemu: remove ISO and RAMFS from help textRobert Yang
They don't work, and the script can check the type correctly. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23runqemu: simplify the checking for vm imagesRobert Yang
* So that we can add more image support easliy. * I think that wic should be vm images. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23runqemu: fix ROOTFS for vmdkRobert Yang
* 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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2016-03-23oe-publish-sdk: fix remote publishingPaul Eggleton
A typo in the command prevented the last part of the publish from succeeding. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23oe-publish-sdk: improve help output slightlyPaul Eggleton
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). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23oe-publish-sdk: drop SDK installer file from published outputPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23devtool: add: create git repository if URL specified as positional argumentPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23devtool: add: delete externalsrc files on npm recipe do_installPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23devtool: configure-help: fix error if do_configure not already runPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-23devtool: sdk-install: add option to allow building from sourcePaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-21oe-buildenv-internal: Correct the sed expression which updates $PATHPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-20oe-buildenv-internal: Some clean upPeter Kjellerstedt
* Consistent indentation (four spaces) * Use [ -z ...] and [ -n ... ] where possible * Unset temporary variables * Use $(...) instead of `...` * Avoid an unnecessary call to expr Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20oe-buildenv-internal: Add variables individually to BB_ENV_EXTRAWHITEPeter Kjellerstedt
Instead of adding all variables to BB_ENV_EXTRAWHITE as one, treat them separately and add them one by one as needed. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20oe-buildenv-internal: Add paths to $PATH individuallyPeter Kjellerstedt
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20oe-selftest: Fixed --list-tests-by tag optionDaniel Istrate
Commit 35be67951305950ba797dc2efddbc7d88fc0556a 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 Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20devtool: change config symlink name to .config.newMarkus Lehtonen
Otherwise (if the symlink is named .config) kernel build considers source tree as dirty and fails. [YOCTO #9270] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-20recipetool: create: don't create extra files directory unconditionallyPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12scripts/oe-selftest: Add short names to most common optionsHumberto Ibarra
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] Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-12python: move ast module into python-coreRoss Burton
The compile() method returns objects that inherit from ast.AST so it's best that python-core contains this class. [YOCTO #8684] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-12scripts/oe-selftest: Add search expression matching to run/list optionsHumberto Ibarra
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] Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: shrinkwrap and lockdown npm modulesPaul Eggleton
"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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: support creation of additional files by pluginsPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: check if npm available if npm:// URL specifiedPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: split npm module dependencies into packagesPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: add license file crunchingPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: match *LICENSE* as a license filePaul Eggleton
For example, this picks up a file named MIT-LICENSE.txt. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: improve mapping for autotools program macrosPaul Eggleton
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 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09recipetool: create: be more tolerant of spacing in configure.acPaul Eggleton
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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09oe-setup-builddir: tidy up local.conf and bblayers.conf commentaryAndre McCurdy
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. 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-07scripts/hob: dropPaul Eggleton
The Hob UI is gone from BitBake, so we should remove this shortcut script. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-06recipetool: create: fix support for AX_CHECK_LIBRARYPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-04devtool: add build-sdk subcommandPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-04devtool: build-image: rename modulePaul Eggleton
Hyphens aren't allowed in python identifiers, so you shouldn't use them in module names or they are more difficult to import. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03sdk.py: Fix undefined variableJuro Bystricky
"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] Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02recipetool: create: add basic support for new npm fetcher/classPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-02recipetool: create: add basic support for generating linux kernel recipesPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-02recipetool: create: add support for out-of-tree kernel modulesPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-02combo-layer: handle empty commits during "init --history"Patrick Ohly
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). Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28wic: don't throw away our created swap partitionChristopher Larson
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. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28devtool: upgrade: print new recipe namePaul Eggleton
Make this consistent with "devtool add" so that the user knows where to find the new recipe. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28devtool: upgrade: drop PR on upgradePaul Eggleton
The PR value should be reset to the default when upgrading, so we need to drop it from the newly created file. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28devtool: upgrade: eliminate unnecessary datastore copyPaul Eggleton
We aren't modifying the datastore copy here, so we don't need a copy at all. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28devtool: upgrade: fix several issues with extraction of new sourcePaul Eggleton
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 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28devtool: upgrade: fix constructing new branch from tarball releasesPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-28devtool: upgrade: fix renaming of recipe if PV is not in namePaul Eggleton
If the actual value of PV isn't in the name of the recipe (for example, a git or svn recipe) there's no point trying to rename it. Additionally, we already have the original filename, there's no need to guess it - just pass it in. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>