summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2015-07-16runqemu-internal: add temporary disk interface to qemuarm64Cristian Iorga
Starting with qemu 2.4, a disk needs be attached via a specified interface, even if that interface is none. In case of qemuarm64 machine, the board is virtual, so a none interface it works correctly. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
2015-07-16create-pull-request: Fix error on 2.0 versions of gitBen Shelton
On 2.0 versions of git, the create-pull-request script exits with the warning "No match for commit... Are you sure you pushed 'HEAD' there?". This is due to a change in behavior where git used to guess the branch you meant, but no longer does. See the thread at http://www.spinics.net/lists/git/msg233050.html for more information. To accommodate the new behavior, if the COMMIT_ID is set to the default of "HEAD", make it point explicitly to $BRANCH instead. Signed-off-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16combo-layer: implement --hard-reset optionMarkus Lehtonen
This option causes combo-layer to do git fetch and hard reset instead of git pull in the component repositories. This makes sure that the local component repositories are always in sync with the remote - tolerating force pushes and overriding any locally made changes. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16combo-layer: only allow fast-forward when pullingMarkus Lehtonen
Only allow fast-forward merges in the component repositories when doing git-pull. This makes it possible to spot problems (i.e. rewriting of history) in the component upstream . Also, this change prevents the creation of local-only merge commits in the component repositories. These merges cause "last_revision" field of the combo-layer config to point to a git commit that is only present in the users local component repository but nowhere in upstream. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16python-io: Add runtime dependency on contextlibAsh Charles
The python-io package includes ssl.py module which imports the contextlib library. This applied to Python 2.7.9 but not 3.3. Signed-off-by: Ash Charles <ashcharles@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-12recipetool/append: Fix selftest failure with multilibRichard Purdie
If you have multilib enabled, it finds lib32-base-files instead of base-files for test_recipetool_appendfile_basic causing a test failure. Add a fix for this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-10wic: Set default set of bitbake variablesEd Bartosh
Set default set of bitbake variables to the set of variables for the first parsed image. This allows wic to find proper bitbake varibale values if it's called with '-e <image>' even without specifying image in the call of get_bitbake_var. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07combo-layer: modified to generate better commit messages.Puustinen, Ismo
This patch includes support for a global section in combo-layer.conf called [combo-layer-settings]. Supported in this section is key "commit_msg"; its value is the template for the git commit message that updates the last_revision. The template can include substitution for the updated component list: ${components}. The substituted value will either be a comma-separated list of components or "all components", if combo-layer was invoked without component list argument. If the key is not present, the old default value is used for the commit message. Configuration file example: [combo-layer-settings] commit_msg = pulled in the latest changes for ${components}. Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07scripts/oe-selftest: Added mechanism for including/removing bblayers.incDaniel Istrate
When oe-selftest starts it includes bblayers.inc into bblayers.conf When oe-selftest ends it deletes bblayers.inc and the included line from bblayers.conf Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02runqemu-internal: correctly set format for root FS as rawCristian Iorga
qemu guesses via probing the format of root FS, but gives a warning and restricts write operations on block 0. Fix it by setting correctly the format as raw for more machines and non-KVM machines. In some cases, replaced the way machine disk is set for qemu. Fix for [YOCTO #7918] Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02wic: Code cleanup: unused importsEd Bartosh
Fixed pylint warning unused-import Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Code cleanup: long lines, identation and whitespacesEd Bartosh
Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Fix confusing error messageEd Bartosh
Wic throws this message when any of the build artifacts are not provided: Build artifacts not completely specified, exiting. (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts) It was not clear which artifact was not specified. Reworked the code to specify list of missed artifacts. Now the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Remove __write_partition methodEd Bartosh
Moved code of __write_partition to 'assemble' method. This way it should be more readable. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Refactor fstab update codeEd Bartosh
Made the code to backup and restore fstab only if it's modified. Cleaned up the code. Made it more pythonic. Improved code readability by moving code from several tiny methods into one place. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Add --uuid partition optionEd Bartosh
Added --uuid option to the configuration of wks parser. This option specifies partition UUID. The code to process it is already in place. It was implemented for --use-uuid option. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Fix naming conflictEd Bartosh
Image file name is not unique for the partitions without label. This causes image being rewritten and used as a source for all partitions without label. Wic produces broken or incorrect result images because of that. Added wks line number to the image name to make it unique.
2015-07-02wic: Remove duplicated codeEd Bartosh
Moved duplicated code of geting rootfs size out of prepare_rootfs* methods.
2015-07-02wic: Refactor prepare_empty_partition APIEd Bartosh
Moved code out of prepare_empty_partition* methods to avoid code duplication. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Call methods better wayEd Bartosh
Shortened code by using getattr to obtain a method to call for prepare_empty_partition_* and prepare_rootfs_* methods. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Get rid of useless variable 'image_rootfs'Ed Bartosh
Removed useless variable 'image_rootfs' from 4 prepare_rootfs_* methods. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Rename partition imagesEd Bartosh
Renamed partition images into <final image>.p<partition number> This should make output directory look more organized and easier to understand. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Refactor prepare_rootfs APIEd Bartosh
Moved code out of prepare_roots* methods to avoid code duplication. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Turn off debug output for 'bitbake -e'Ed Bartosh
Switched debug level to 'normal' to prevent huge 'bitbake -e' output to go into wic debug output. This should help to make wic debug info much more clean and easier to read. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Remove annoing debug messageEd Bartosh
Wic tries to find plugins in every layer and prints a message 'Plugin dir is not a directory or does not exist' if layer doesn't have plugin dir. It causes a lot of duplicated messages in the debug output, which makes it hard to find useful info there. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Include mount point into image reportEd Bartosh
Wic doesn't show any information for the partition if label is not set. Fixed this by adding mount point to the report. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Refactor getting bitbake variablesEd Bartosh
Wic gets bitbake variables by parsing output of 'bitbake -e' command. This implementation improves this procedure as it runs 'bitbake -e' only when API is called and does it only once, i.e. in a "lazy" way. As parsing results are cached 'bitbake -e' is run only once and results are parsed only once per requested set of variables. get_bitbake_var became the only API call. It replaces find_artifacts, find_artifact, find_bitbake_env_lines, get_bitbake_env_lines, set_bitbake_env_lines and get_line_val calls making API much more clear. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Fix misleading messageEd Bartosh
Due to usage of incorrect variable wic produces strange message "No image named None found, exiting." when specified canned .wks doesn't exist. Fixed by replacing wks_file -> argv[0] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Test rootfs plugin using image recipesEd Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-27recipetool: add appendsrcfile(s) sub-commandsChristopher Larson
This adds the `appendsrcfile` and `appendsrcfiles` sub-commands, which let the user add or replace one or more files in the recipe sources, either in a path relative to `S` or `WORKDIR`. Each file gets added to `SRC_URI` as a file:// URI, using the subdir= parameter to specify the destination directory. Examples: # Adds our defconfig as file://defconfig. If it's already in SRC_URI, it # won't be duplicated. recipetool appendsrcfile --workdir meta-mylayer linux-mel defconfig recipetool appendsrcfiles --workdir meta-mylayer linux-mel defconfig # Does the same, handling the different local filename recipetool appendsrcfile --workdir meta-mylayer linux-mel defconfig.mine defconfig # Adds our device tree files to the source tree recipetool appendsrcfiles --destdir arch/arm/boot/dts meta-mylayer linux-mel *.dts Of course, for the latter example to be of use, the new dts files would need to be added to `KERNEL_DEVICETREE` as well, and depending on the kernel, `DEFCONFIG` or `KERNEL_DEFCONFIG` may need to be set. Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27recipetool.append: use argparse types for validationChristopher Larson
This validates the arguments early, when argparse is parsing the arguments, in a consistent way. Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oe-selftest: timestamp the test runsRoss Burton
The selftest can take a couple of hours to run, so add a custom result class to timestamp the output to make it easy to spot any slow tests. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-26wic: Make code more pythonicEd Bartosh
Used more pythonic way to make a list. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26wic: Implement image compressingEd Bartosh
Implemented compressing result image with specified compressor. Updated reporting code to show compressed image. [YOCTO #7593] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26wic: Add new argument to direct pluginEd Bartosh
Added 'compressor' argument to Direct plugin API to pass a name of compressor utility. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26wic: Add new argument to wic_create functionEd Bartosh
Added 'compressor' argument to wic_create to pass a name of compressor utility to the wic engine. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26wic: Add --compress-with command line optionEd Bartosh
Added -c/--compress-with command line option to 'wic create' subcommand. This option is used to specify compressor utility to compress the image produced by wic. gzip, bzip2 and xz compressors are supported in this implementation. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26lib/devtool/standard: Fix patch cleanupRichard Purdie
If patches fail to apply with git, quilt it used as a fallback. If that happens, the code in this class is meant to handle cleanup of these patch files. In the case where ${S} is a subdir of the git tree, the code doesn't correctly set the patches directory. This change correctly sets the patches directory (which is different to the location of the git repository). [YOCTO #7911] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23python-2.7/3.4-manifest.inc: add missing dependencies for python-netserverHenning Heinold
* SimpleHTTPServer imports shutil so we need definitly python-shell * SocketServer can be run without the threading modul, but I think we should run the full blown stuff, so let us add python-threading * this work was sponsored by sysmocom GmbH Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: removed unused command line optionEd Bartosh
Removed -i/--infile wic command line option. Removed properties_file and properties arguments of wic_create function. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: code cleanup: superfluous-parensEd Bartosh
Removed unncecessary parents after 'if' 'del' and 'print' keywords. Fixed pyling warning: Unnecessary parens after 'xxx' keyword Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: Return error code when wic fails to invoke commandEd Bartosh
Return 1 if command doesn't exist or wic is called without any commmand. Return result of invoke_command as wic return code. Added tests for unsupported command and no command. Fixed typo in test case test02_createhelp spotted by this fix. [YOCTO #7856] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: Integrated plugin docstrings into 'wic help plugins' outputEd Bartosh
Added mechanism to show docstrings of plugin classes as a part of plugins help page. For missing plugins the following warning message is shown: <class '<plugin class spec>'> is missing docstring. [YOCTO #7118] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: Add missing docstrings to plugin classesEd Bartosh
Docstings from plugin classes are used as part of output of 'wic help plugins'. Adding them makes help page more informative. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: Code cleanup: bad-classmethod-argumentEd Bartosh
Fixed wrong name for the first argument in class methods. Pylint complains about the issue this way: Class method should have 'cls' as first argument Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: Document creation of empty partitionEd Bartosh
Added short explanation of how to create empty pattition to the 'wic help kickstart' output. [YOCTO #7131] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu-internal: set mutual exclusiveness for serial and nographic optionsJagadeesh Krishnanjanappa
Use "-nographic" option only if "serial" option is not specified. Otherwise we get below error when 'runqemu <kernel_image> <rootfs_image> serial' is executed, (snip) QEMU 2.2.0 monitor - type 'help' for more information (qemu) qemu-system-aarch64: -serial stdio: cannot use stdio by multiple character devices -- CUT -- Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu-script: define console for qemuarm NFS bootingJagadeesh Krishnanjanappa
Add console=ttyAMA0,115200 as one of the boot parameters for qemuarm, in order to print bootlog messages on the console. Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu-internal: add support to boot arm64 qemu target via NFSJagadeesh Krishnanjanappa
Add required boot parameters inorder to boot arm64 qemu target via NFS Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu: fix MACHINE being detected as qemuarm for qemuarm64 kernel imageJagadeesh Krishnanjanappa
Basically, runqemu script autodetects MACHINE type based on the kernel image name; if MACHINE name is not specified. Since 'qemuarm' string is common in both qemuarm amnd qemuarm64 kernel image names, the MACHINE type is considered as 'qemuarm' even when qemuarm64 kernel image name is given in command line. Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>