summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* wic: implement --vars optionEd Bartosh2015-08-301-0/+6
| | | | | | | | | | | | | | | | | This option is used to point wic to the directory with .env files containing list of bitbake variables and their values. If this option is used wic will get bitbake variables from files instead of parsing 'bitbake -e' output. The main reason for this is to support new mode, when bitbake runs wic to produce wic images. In this case wic can't run bitbake again as it's locked, so it will get variables from .env files. (From OE-Core rev: abdfad1cd68fcd7387c2a508ab81512e8f6b93ce) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement getting variables from .env filesEd Bartosh2015-08-301-22/+37
| | | | | | | | | | | | Added functionality of getting variables from <image>.env files to BitbakeVars class. env files will be parsed if the directory with env files is known, i.e. when vars_dir attribute is set. Otherwise 'bitbake -e' output will be parsed. (From OE-Core rev: d21e4c1e56cab750ed4f6031d7f3dc5775a2c2cc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: set default imageEd Bartosh2015-08-301-2/+4
| | | | | | | | | | | Set BitbakeVars.default_image when wic is called with -e option. This makes get_bitbake_var API to use provided image as a default source of variables. (From OE-Core rev: d465233579d5efa2e0578baac67f42a35ad8b993) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add default_image attribute to BitbakeVarsEd Bartosh2015-08-301-0/+6
| | | | | | | | | | | New attribute is used when bitbake variable is requested without specifying image name. The attribute should be set from outside, for example when wic is called with '-e <image>' option. (From OE-Core rev: 38d0b3744b5829333148ac4fc97dc45a8d0ba3a5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: create new method _parse_lineEd Bartosh2015-08-301-10/+17
| | | | | | | | | | | | Moved code that parses one line of 'bitbake -e' output to separate method _parse_line. This method will be also used later to parse lines of .env files. (From OE-Core rev: 49ef04d3c9eeb76cbbc89b27b4dd1570b7a2552b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add BitbakeVars classEd Bartosh2015-08-301-38/+53
| | | | | | | | | | | | | Moved code of getting bitbake variables into separate class. Created singleton object of this class in the module namespace. Preserved existing API get_bitbake_var. (From OE-Core rev: 3229d37993e315c9ca1902849746b9f50f35845c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: deferred call of hlp.get_wic_plugins_help()Ed Bartosh2015-08-302-1/+3
| | | | | | | | | | | | | | | | | | If get_wic_plugins_help is called from wic main module it calls git_bitbake_var at some point. This fails when wic is called from bitbake as 'bitbake -e' can't be run. Moved call of this method to help.py in order to call it later, when BitbakeVariables singleton is properly initialized to get variables from .env files. (From OE-Core rev: d401a8518fb4b0e8adeb34be8948fa780299870c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rename variableEd Bartosh2015-08-301-2/+2
| | | | | | | | | | | | Renamed variable help -> hlp as 'help' is a name of Python built-in function. (From OE-Core rev: 94c85fdaec36bfda509be4a66082a0156bf76695) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove undescore from function nameEd Bartosh2015-08-301-6/+6
| | | | | | | | | | | | | | Renamed __exec_cmd -> _exec_cmd as double underscores cause strange behaviour when function is called in class method. Python complains that __exec_cmd method(!!!) of the same class doesn't exist. (From OE-Core rev: 3b400a06d755e3d437967f60842b1d9bd94f0814) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-internal: Fixes unary operator expected in new TCPSERIAL_PORTNUMAníbal Limón2015-08-301-1/+1
| | | | | | | | | | | | | If $TCPSERIAL_PORTNUM is empty string causes an error because expands the expresion to, $TCPSERIAL_PORTNUM == "" -> == "" (From OE-Core rev: 7bbe24f19e6005eccefd404b3a6d5d9443dd5b36) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: implement build-image pluginEd Bartosh2015-08-301-0/+56
| | | | | | | | | | | | | | | | Implemented new plugin to build image from workspace packages. Plugin creates <image>.bbappend file, adds all workspace packages to the image using IMAGE_INSTALL_append variable in bbappend file. After that it runs 'bitbake <image>'. (From OE-Core rev: 00bc43868da3ea2a4532215d3abef8e150c7b2e5) (From OE-Core rev: fc35c10fed382e385f00b76abcee94a0148b4aee) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: make add_md5 a public APIEd Bartosh2015-08-302-10/+10
| | | | | | | | | | | | Moved _add_md5 function from standard.py to __init__.py to be able to call it from other modules. (From OE-Core rev: ee38bb20dc7ba21dac782d8d13383f81dfedef55) (From OE-Core rev: b07da7d38bcefe8efdd6b22bb9251bef599ef040) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-internal: Make sure tcpserial is always lastRandy Witt2015-08-291-2/+2
| | | | | | | | | | | | If this is not the case, sometimes the additional tcpserial will be enumerated as ttyS0, which is not what we want. Because then it would be the console, and qemurunner would not log things properly. (From OE-Core rev: c71309616a3247cfab969b74d8642ff0bf9b6500) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp / yocto-layer: fix template recipesPaul Eggleton2015-08-252-3/+1
| | | | | | | | | | | * Drop PR = "r0" * Use SUMMARY instead of DESCRIPTION (From meta-yocto rev: 433044641e2500f40fbd72d91bbc38d5cb288c1e) 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>
* runqemu: Add a tcpserial optionRandy Witt2015-08-242-0/+12
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 849d65d55e4df5fa443b2cb7b4cee23913fc9d5a) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/create-recipe: dropPaul Eggleton2015-08-241-2071/+0
| | | | | | | | | | | | | | 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. (From OE-Core rev: df0ef260f36df3993377196962eb6d52ab36b38c) 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>
* wic: add mkhybridiso kickstart fileMihaly Varga2015-08-241-0/+7
| | | | | | | | | | | | | | 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. (From OE-Core rev: e8769d52d6d8c67ba18595ebd27f5022bd0e66c4) 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>
* wic: Add plugin for hybrid iso imageMihaly Varga2015-08-241-0/+538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 289c534b5d990e22e5547496f5f84cc9721ce3ee) 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>
* lib/oe/recipeutils: avoid parsing in get_var_files()Paul Eggleton2015-08-191-2/+2
| | | | | | | | | | | | | 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). (From OE-Core rev: 6ba969f1ac5a1a0e277a21287fc5ae1622a6b14e) 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>
* devtool: fix handling of BBCLASSEXTENDed recipesPaul Eggleton2015-08-192-14/+18
| | | | | | | | | | | | | | | | | 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]. (From OE-Core rev: b63fca00c2e24ad0c8b8b3c492d93ee4372fa92d) 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>
* devtool: extract: remove patches subdirectory when S == WORKDIRPaul Eggleton2015-08-191-2/+1
| | | | | | | | | | | Ensure that the "patches" subdirectory is removed from the right location when S == WORKDIR (e.g. devtool extract makedevs). (From OE-Core rev: 2062c88726400e09599aff51af95799a866b90c9) 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>
* devtool: extract: prevent externalsrc from interfering with extractionPaul Eggleton2015-08-191-0/+2
| | | | | | | | | | | | | | | 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). (From OE-Core rev: 5be16d639d1b78d114755bfd552ac901d0fdf4a9) 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>
* canned-wks: added a qemux86* directdisk recipe for wicCristian Iorga2015-08-191-0/+10
| | | | | | | | | | | qemu-directdisk.wks creates a raw disk image that a qemux86* machine can boot from. (From OE-Core rev: 3b1a2baa95fee7479e85379c0f6f4d54c0db2042) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-pull-request: cleanup bashismsEd Bartosh2015-08-161-3/+4
| | | | | | | | | | | | | 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. (From OE-Core rev: b5c77a94b97b316b7ea075841d18b73e6dccbf2d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: release 0.2.0Ed Bartosh2015-08-091-1/+1
| | | | | | | | | | | | | | | | | 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 (From OE-Core rev: a0f8cb7e0ffa15e101d39463c77707c821250203) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: code cleanup: pylint misc.pyEd Bartosh2015-08-091-19/+21
| | | | | | | | | | Fixed pylint warnings. Increased pylint score from 8.02 to 9.40. (From OE-Core rev: 26d8c70fb8a7cc8f6473ad1779b20b00616740c0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: code cleanup: remove unused codeEd Bartosh2015-08-091-11/+0
| | | | | | | | | | Removed unused global variable wks_vars and 2 unused functions get_wks_var and add_wks_var. (From OE-Core rev: 7d87c821da6a5020e8dde3f1907fb8d6a023b110) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Report recipe name for native commandsEd Bartosh2015-08-091-3/+26
| | | | | | | | | | | | | | | 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] (From OE-Core rev: 1274379c91ee8e2fb9fbb34a6445cd5767eb4a35) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Improve 'wic help overview' contentEd Bartosh2015-08-091-9/+24
| | | | | | | | | | | | | | | 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] (From OE-Core rev: 68d391eaf4fe9fc37e3278255d5da170f98b8763) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: improved usage textEd Bartosh2015-08-091-7/+5
| | | | | | | | | | | | Made command line specification less confusing. Reformatted usage output. [YOCTO #7938] (From OE-Core rev: c4a44ad4c5aa65657b69b811e793f98418159348) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-pull-request: cd to relative directoryEd Bartosh2015-08-091-1/+4
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: 3042956a86167f89beccc5d05f1fad1844e7c36a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Handle device names like tapX@NONERichard Purdie2015-08-091-1/+1
| | | | | | | | | | | | 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] (From OE-Core rev: 6459dde380febce24d2c355d441d9cb3b14409b9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Add error handling for unexpected tap devicesRichard Purdie2015-08-091-0/+8
| | | | | | | | | | 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. (From OE-Core rev: 4238f3b6e320969aaf539e6afb1cb2bfd61bb28b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* combo-layer: fix action_pull for unknown branchPatrick Ohly2015-08-091-3/+15
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: ad4d3b1da190cf08c6ac5f9a94a2a1c4980a184d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* combo-layer: enhance output in action_pullPatrick Ohly2015-08-091-1/+1
| | | | | | | | | | | | | | | 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. (From OE-Core rev: 00d01468a692faf4272894dd328e8c532bcf8b49) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3: remove 2to3 symlink from package python3-2to3Dominic Sacré2015-08-011-1/+1
| | | | | | | | | | | 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. (From OE-Core rev: ff3633fa6a379d502f65b20d6a57d30c59f09ab6) Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* python3: remove package python3-robotparserDominic Sacré2015-08-011-3/+0
| | | | | | | | | | | | | | | | | | 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]. (From OE-Core rev: 9e01909f3239f0a88e20f12e65b6141e547b114a) Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add --bbpath argumentChristopher Larson2015-08-011-4/+11
| | | | | | | (From OE-Core rev: a459b230387b34479212d54edeb3abf2b6274196) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-pull-request: Implement -d optionEd Bartosh2015-08-011-4/+12
| | | | | | | | | | | | | | | 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 (From OE-Core rev: 9b544125e1e3d2cc2db8f5d20d6fd0746f8cef5d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: use tinfoil shutdown methodPaul Eggleton2015-08-011-2/+1
| | | | | | | | | | | 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. (From OE-Core rev: c1f58caad4ff45efd213bf1412304a72903abe7e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* combo-layer: fix AttributeError traceback.Alexander Kanevskiy2015-07-311-2/+2
| | | | | | | | | | | | | 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. (From OE-Core rev: ac4ef551d506a5767946cf2fb717c2fd7f86df9c) Signed-off-by: Alexander Kanevskiy <kad@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gcc: Add support for nativesdk-gccRichard Purdie2015-07-311-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: cd3d874fced2ee4c950d9964d30c0588fd8772e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add scripts/lib and bitbake/lib to pathPaul Eggleton2015-07-271-1/+4
| | | | | | | | | | In particular, this allows us to use code from bitbake's bb module (such as tinfoil). (From OE-Core rev: 5ca91cd0b56eb2da80c781fb46ae0b600c3f1eb9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add libdirs from BBPATH to sys.pathChristopher Larson2015-07-271-0/+7
| | | | | | | | | | | | This ensures that oeqa.selftest.* from layers are found. [YOCTO #7625] (From OE-Core rev: 182b8ed9f26ed8b6a8eb6dcaec82db9aca14b010) 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>
* oe-selftest: obey oeqa.selftest.__path__Christopher Larson2015-07-271-5/+6
| | | | | | | | | | | | | This ensures that all paths that hold selftest tests will be checked (oeqa.selftest is a namespace package). [YOCTO #7625] (From OE-Core rev: 3c60cbced7b101ee52ce4a0a0bce542fd38f1821) 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>
* devtool: also load plugins from BBPATHChristopher Larson2015-07-272-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: f9bc3b27244a141ec7273445d3ea139a047e0ddf) 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>
* recipetool: parse global args earlyChristopher Larson2015-07-271-8/+16
| | | | | | | | | | | | 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. (From OE-Core rev: 899288a1b255052a6ee0f97d42f8c4f0ec3c3140) 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>
* recipetool: also load plugins from BBPATHChristopher Larson2015-07-271-13/+18
| | | | | | | | | | | | | | | 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] (From OE-Core rev: 5753f20acc31d4d8d93069e3daccce1fad27b7ac) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool.append: add extralines arg to appendsrcChristopher Larson2015-07-271-2/+2
| | | | | | | | | | This makes the function more reusable for other sub-commands. (From OE-Core rev: c6feb6e97c9929560b1e3cec280c1d7976ecc030) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: catch BBHandledException from parsingChristopher Larson2015-07-271-3/+5
| | | | | | | | | | This ensures that we don't see a traceback on parsing failures. (From OE-Core rev: 22ba003f62a321c3b8405a03d6c9ee04dc0a62a6) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>