aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2015-08-24runqemu: Add a tcpserial optionRandy Witt
The option was added so that the qemurunner could start a second tcp serial port without adding machine conditional logic to qemurunner. The issue that made this necessary was that when "virt" is passed to qemu-system-aarch64, the normal mechanism for specifying a tcp serial port does not work. This is because the hardware for the "virt" machine is hardcoded in the device tree blob and the addition devices must be virtio devices. So runqemu can specify virtio for qemuarm64 whereas it seems all other qemu machines work with the "-serial tcp*" option. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24scripts/create-recipe: dropPaul Eggleton
We have "recipetool create" (or "devtool add" which wraps it) instead which works pretty well now, is written in Python and thus can call into BitBake/OE code easily, and can do things that create-recipe can't; any future improvements should go into recipetool and therefore I think we'd rather people used it instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24wic: add mkhybridiso kickstart fileMihaly Varga
Add kickstart file for generating a hybrid bootable iso image using isoimage-isohybrid plugin, the output image is HYBRID_ISO_IMG-cd.iso, the label is HYBRIDISO, and the rootfs.img file is an image with ext3 file system, and uses grub as bootloader for EFI boot and syslinux for legacy boot. Signed-off-by: Mihaly Varga <mihaly.varga@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-24wic: Add plugin for hybrid iso imageMihaly Varga
This plugin creates a hybrid, legacy and EFI bootable ISO image. The generated image can be used on optical media as well as USB media. Legacy boot uses syslinux and EFI boot uses grub or gummiboot (not implemented yet) as bootloader. The plugin creates the directories required by bootloaders and populates them by creating and configuring the bootloader files. The plugin adds an image file to the iso which contains the directory tree of the rootfs folder specified by the --rootfs argument or by the IMAGE_ROOTFS bitbake variable. Using the isohybryd tool, the created .iso image is enhanced by a MBR for booting from disk storage devices, consequently the provided iso image could be copyed directly by dd comand onto USB drive or could be burned to an optical media by using a suitable image burner. The plugin depends on parted, e2fstools, syslinux, grub, cdrtools, dosfstools and mtools program. Some of the functions in this plugin were inspired from bootimg-efi.py and bootimg-pcbios.py plugins implemented by Tom Zanussi. Signed-off-by: Mihaly Varga <mihaly.varga@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19lib/oe/recipeutils: avoid parsing in get_var_files()Paul Eggleton
Let's have the caller do this and then the function is a bit more flexible (e.g. we can choose to parse with bbappends or not); fix up calls to this function appropriately (of which there are only two, both within devtool). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19devtool: fix handling of BBCLASSEXTENDed recipesPaul Eggleton
If a recipe is BBCLASSEXTENDed (e.g. to -native), its PN value and the name of the bbappend will be different; we were assuming them to be the same when reading in the workspace, leading to us seeing the base recipe name everywhere afterwards. Also add a test so we ensure this doesn't regress in future. Fixes [YOCTO #8157]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19devtool: extract: remove patches subdirectory when S == WORKDIRPaul Eggleton
Ensure that the "patches" subdirectory is removed from the right location when S == WORKDIR (e.g. devtool extract makedevs). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19devtool: extract: prevent externalsrc from interfering with extractionPaul Eggleton
In case the user has set up externalsrc outside of devtool, force EXTERNALSRC to blank for the recipe when extracting so that the original source URI is still in SRC_URI and we're still able to extract it. (This isn't a problem with devtool itself because the bbappends within the workspace layer that apply externalsrc are explicitly filtered out when devtool parses a recipe). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-19canned-wks: added a qemux86* directdisk recipe for wicCristian Iorga
qemu-directdisk.wks creates a raw disk image that a qemux86* machine can boot from. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-16create-pull-request: cleanup bashismsEd Bartosh
Made create-pull-request POSIX compatible: - Replaced /bin/bash -> /bin/sh in shebang. - Replaced usage of pushd/popd with generic shell commands. - Tested on zsh and dash. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-09wic: release 0.2.0Ed Bartosh
Major changes in 0.2.0: - implemented UUID support - fixed support of GPT partition tables - implemented running bitbake from wic - implemented image compressing - started testing with oe-selftest. implemented 17 test cases - used native tools (parted, mkfs, mtools, etc) - usability and documentation fixes - code clenup Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09wic: code cleanup: pylint misc.pyEd Bartosh
Fixed pylint warnings. Increased pylint score from 8.02 to 9.40. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09wic: code cleanup: remove unused codeEd Bartosh
Removed unused global variable wks_vars and 2 unused functions get_wks_var and add_wks_var. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09wic: Report recipe name for native commandsEd Bartosh
exec_native_cmd was modified to report recipe to build native programs. Pairs executable->recipe are hardcoded as it's not possible to obtain this information automatically. [YOCTO #7631] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09wic: Improve 'wic help overview' contentEd Bartosh
Included full console output and example of the .wks file into the 'wic help overview' content. Used qemux86-64 machine instead of crownbay to make example working without cloning additional layers. [YOCTO #7940] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09wic: improved usage textEd Bartosh
Made command line specification less confusing. Reformatted usage output. [YOCTO #7938] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09create-pull-request: cd to relative directoryEd Bartosh
create-pull-request -d path creates empty patches if directory is specified as a path, i.e. ./bitbake or ./bitbake/ or full path. It behaves expected way only if script is run with -d bitbake, i.e. relative dir name doesn't contain '\'. Fixed this unwanted behaviour by changing directory and running git format-patch in it with --relative, without specifying relative path as a parameter. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09runqemu: Handle device names like tapX@NONERichard Purdie
ip list can return devices in the form tapX@NONE. If it does so, ensure we handle that case correctly. Newer distros appear to do this in some cases. [YOCTO #8129] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09runqemu: Add error handling for unexpected tap devicesRichard Purdie
In theory the code reduces the tap device number to an integer. This patch adds error checking to ensure that does happen and that the script exits if something unexpected happens. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09combo-layer: fix action_pull for unknown branchPatrick Ohly
When reconfiguring the branch to something not already fetched, action_pull fails with error: pathspec '<new branch name>' did not match any file(s) known to git. It is the "git checkout" which fails like that. To solve this, try the faster "git checkout + git pull" first and only if that fails, fall back to the slow "git fetch + git checkout". In the conf.hard_reset case, do the checkout always after the git fetch. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-09combo-layer: enhance output in action_pullPatrick Ohly
The git operations can fail, for example when the branch is unknown or misconfigured. Better move the info message and extend it such that it is printed first and provides the necessary context, because otherwise the CalledProcessError exception gets dumped without mentioning for which component it occurred. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01python3: remove 2to3 symlink from package python3-2to3Dominic Sacré
The 2to3 symlink conflicts with its Python 2 equivalent in package python-2to3. The Python 3 version of the tool is still available as 2to3-3.4. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01python3: remove package python3-robotparserDominic Sacré
robotparser has been moved to urllib.robotparser in Python 3, and gets packaged as part of python3-netclient alongside the rest of urllib. This causes python3-modules to depend on an empty/missing python3-robotparser package. robotparser.py is relatively small and has no dependencies outside urllib, so it makes more sense to eliminate the python3-robotparser package than to alter the manifest for python3-netclient. Part of the fix for [YOCTO #8048]. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-01devtool: add --bbpath argumentChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31create-pull-request: Implement -d optionEd Bartosh
This options allows to generate patches against relative directory by using git format-patch --relative option. See more details about --relative option in git diff manual page. For example generating bitbake patchsets from poky can be done this way: create-pull-request -u contrib -d ./bitbake Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-31devtool: use tinfoil shutdown methodPaul Eggleton
Tinfoil now has its own shutdown method, use it instead of calling into cooker - not only is it the right thing to do from an API perspective, it also ensures proper lock handling. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31combo-layer: fix AttributeError traceback.Alexander Kanevskiy
Commit c908a423f85a84ddd8249abd00254f29d47df74b introduced a new issue in combo-layer that leads to a traceback as args.hard_reset is an unknown variable. This change defines an appropriate destination for the command args parser and fixes the reference. Signed-off-by: Alexander Kanevskiy <kad@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31gcc: Add support for nativesdk-gccRichard Purdie
Being able to build a nativesdk gcc is useful, particularly in cases where the host compiler may be of an incompatible version (or a 32 bit compiler is needed). Sadly, building nativesdk-gcc is not straight forward. We install nativesdk-gcc into a relocatable location and this means that its library locations can change. "Normal" sysroot support doesn't help in this case since the values of paths like "libdir" change, not just base root directory of the system. In order to handle this we do two things: a) Add %r into spec file markup which can be used for injected paths such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). b) Add other paths which need relocation into a .gccrelocprefix section which the relocation code will notice and adjust automatically. This patch adds tweaks to the relocation script to handle the new section too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27oe-selftest: add scripts/lib and bitbake/lib to pathPaul Eggleton
In particular, this allows us to use code from bitbake's bb module (such as tinfoil). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27oe-selftest: add libdirs from BBPATH to sys.pathChristopher Larson
This ensures that oeqa.selftest.* from layers are found. [YOCTO #7625] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27oe-selftest: obey oeqa.selftest.__path__Christopher Larson
This ensures that all paths that hold selftest tests will be checked (oeqa.selftest is a namespace package). [YOCTO #7625] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27devtool: also load plugins from BBPATHChristopher Larson
This makes it easier to extend, as a layer can add its own sub-commands. Argument parsing is also separated into two steps, the same way it's done in recipetool, as we need access to the global command-line arguments early, before plugins are loaded, both for debugging arguments and for the bitbake path (we need to load the bitbake module to get tinfoil, which is now needed to load the plugins). Rather than constructing tinfoil once and passing it through into sub-commands for their use, we have to construct it for configuration metadata, use it, and then shut it down, as some sub-commands call out to recipetool, which needs its own tinfoil instance, and therefore needs to acquire the bitbake lock. If we're still holding the lock at that point, that's clearly a problem. [YOCTO #7625] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27recipetool: parse global args earlyChristopher Larson
This separates the argument parsing into two steps, which lets us apply global settings like enabling debugging before the plugins load, so we can see the paths where plugins are being loaded. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27recipetool: also load plugins from BBPATHChristopher Larson
This makes it easier to extend, as a layer can add its own sub-commands. The bitbake path setup is moved earlier, as it has to be done before tinfoil_init. [YOCTO #7625] Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27recipetool.append: add extralines arg to appendsrcChristopher Larson
This makes the function more reusable for other sub-commands. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-27recipetool: catch BBHandledException from parsingChristopher Larson
This ensures that we don't see a traceback on parsing failures. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-22recipetool: appendsrcfile: handle S == STAGING_KERNEL_DIRChristopher Larson
When determining the path from WORKDIR to the extracted sources, we're using S, but if S is in work-shared, that's problematic and won't give us good results, so assume 'git' for that case, warning when appropriate. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22recipetool: appendsrcfile: use -D, not -d for destdirChristopher Larson
-d is already taken for --debug. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-22recipetool: appendsrcfile: fix duplicate SRC_URI checkChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21Revert "create-pull-request: Fix error on 2.0 versions of git"Ross Burton
This breaks create-pull-request for git <2, which is many people. This reverts commit 7ee64ea60ede5477b2f9a355d93bdc556e6b7895. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>