aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2017-03-13scripts/oe-setup-rpmrepo: replace createrepo with createrepo_cAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13scripts/rpm2cpio.sh: replace 5.x version with 4.x versionAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-11wic/direct.py: Avoid exception if using multiple rawcopy/no-table entries.Kristian Amlie
If we are both having a bootloader and a U-Boot environment file, we can end up with two entries using "--source rawcopy" and "--no-table", and since they reuse the same file [1], their cleanup handlers will try to delete the same file twice. So make sure we only do it once. [1] Although they reuse the same file, the resulting output is correct, so it appears the file is accessed in properly sequential order. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-10runqemu-gen-tapdevs: Improve help text with an exampleRichard Purdie
Figuring how the correct commandline isn't trivial, improve the help text with RSS in mind. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10wic: filemap: Fixed spared_copy skipDaniel Schultz
This patches removes the empty space in front of the copied file which was skipped. Without this reduction it's not possible to place a partition with rawcopy and skip parameter on a desired alignment. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-10wic: plugins: rawcopy: Fixed wrong variable typeDaniel Schultz
Without the int() function this variable will be a string. This will led to a error in Filemap on line 545 due wrong types. > [...] > File > ".../poky/scripts/lib/wic/filemap.py", line 545, in sparse_copy > if start < skip < end: > TypeError: unorderable types: int() < str() Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08relocate_sdk.py: skip debug files from relocationNikunj Kela
Debug files only have debug symbols hence don't need to be relocated. Relocation script throws errors when run on the debug files. This change skips these files that have zero size. (From OE-Core rev: 132e8bfd499c713eb63075fd6380317b60f0bd27) Signed-off-by: Nikunj Kela <nkela@cisco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-07crosstap: Changes to support Recipe specific sysrootSaul Wold
The crosstap script needed to be updated for recipe specific sysroot changes including adding support for finding the systemtap binaries. [YOCTO #10990] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04yocto-compat-layer.py: Add script to YP Compatible Layer validationAníbal Limón
The yocto-compat-layer script serves as a tool to validate the alignament of a layer with YP Compatible Layers Programme [1], is based on an RFC sent to the ML to enable automatic testing of layers [2] that wants to be YP Compatible. The tool takes an layer (or set of layers) via command line option -l and detects what kind of layer is distro, machine or software and then executes a set of tests against the layer in order to validate the compatibility. The tests currently implemented are: common.test_readme: Test if a README file exists in the layer and isn't empty. common.test_parse: Test for execute bitbake -p without errors. common.test_show_environment: Test for execute bitbake -e without errors. common.test_signatures: Test executed in BSP and DISTRO layers to review doesn't comes with recipes that changes the signatures. bsp.test_bsp_defines_machines: Test if a BSP layers has machines configurations. bsp.test_bsp_no_set_machine: Test the BSP layer to doesn't set machine at adding layer. distro.test_distro_defines_distros: Test if a DISTRO layers has distro configurations. distro.test_distro_no_set_distro: Test the DISTRO layer to doesn't set distro at adding layer. Example of usage: $ source oe-init-build-env $ yocto-compat-layer.py LAYER_DIR [YOCTO #10596] [1] https://www.yoctoproject.org/webform/yocto-project-compatible-registration [2] https://lists.yoctoproject.org/pipermail/yocto-ab/2016-October/001801.html Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04build-perf-test-wrapper.sh: support xml report formatMarkus Lehtonen
Add new command line option '-x' that enbles xml-formatted reports. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/runqemu: avoid overridden user input for bootparamsDmitry Rozhkov
Currently runqemu hardcodes the "ip=" kernel boot parameter when configuring QEMU to use tap or slirp networking. This makes the guest system to have a network interface pre-configured by kernel and causes systemd to fail renaming the interface to whatever pleases it: Feb 21 10:10:20 intel-corei7-64 systemd-udevd[201]: Error changing net interface name 'eth0' to 'enp0s3': Device or resource busy, Always append user input for kernel boot params after the ones added by the script. This way user input has priority over runqemu's default params. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/runqemu: Add always ttyS1 when no serial options are specifiedAníbal Limón
We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES), if not serial or serialtcp options was specified only ttyS0 is created and sysvinit shows an error trying to enable ttyS1: INIT: Id "S1" respawning too fast: disabled for 5 minutes [YOCTO #10491] (From OE-Core rev: 3a0efbbe6bb5a7f0fb3df0f6052b11e56788405f) 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>
2017-03-04scripts/lib/create_npm: handle Public Domain licensesAnders Darander
Rewrite Public Domain as PD, as that's what the place holder in meta/files/common_licenses is called. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/lib/create_npm: handle AND and OR in licensesAnders Darander
Handle npm packages with multiple licenses (AND and OR). Prior to this, AND and OR were treated as licensed in their own. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/lib/create_npm: rewrite see license in eulaAnders Darander
Rewrite the 'SEE LICENSE IN EULA' to a single string (without spaces), to avoid splitting the string later on. (Otherwise, each word gets split, and assumed to be a license on it's own. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04create_npm.py: convert MIT/X11 to MITAnders Darander
Quite a few npm packages declare MIT/X11 as their license. This is equal to a pure MIT license. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04wic: add more targets to directdisk syslinux configEd Bartosh
Added 3 new targets to directdisk-bootloader-config.cfg to match hddimg syslinux config. This is a preparation for dropping hddimg in favor of wic. [YOCTO #11044] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: bootimg-pcbios: add support for syslinux vesamenuEd Bartosh
Installed vesamenu.c32 and its dependencies to support vesamenu ui in syslinux config. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: raise WicError instead of calling logger.errorEd Bartosh
Replaced forgotten calls of logger.error with raising WicError exception. Otherwise errors will be ignored. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: exec_native_cmd: fix undefined variable errorEd Bartosh
Defined variable 'out' to fix this exception: UnboundLocalError: local variable 'out' referenced before assignment Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: exec_native_cmd: improve debug messageEd Bartosh
Added search paths to the debug message to make it easier to see where the native command is searched. [YOCTO #11017] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use image recipe sysroot as defaultEd Bartosh
Switched from using wic-tools recipe sysroot to using image sysroot in wic script. This way is more logical and consistent with the way wic uses other artifacts. [YOCTO #11017] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use 2 sysroots to find native executableEd Bartosh
Currently there is no way to specify a dependency on native tools for wic without modifying wic-tools recipe. Obvious way to make it more flexible is to use image sysroot and wic-tools together to find an executable. Modified run_native_cmd to use image and wic-tools sysroots to find native executable. [YOCTO #11017] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: pluginbase: use global dictionaryEd Bartosh
Made PluginMeta to populate global PLUGINS dictionary that is accessed by PluginMgr. This should make the code more understandable as PluginMgr don't need to get data directly from PlugnMeta attribute. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: move PluginMgr class to pluginbaseEd Bartosh
As PluginMgr class contains only one method it's better to move it to pluginbase to have all plugin related APIs in one module. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: plugin: cache results in get_pluginsEd Bartosh
Store results of PluginMgr.get_plugins to avoid loading plugins more than once. This should speed up finding plugins. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: remove PluginMgr.get_plugin_methodsEd Bartosh
Call methods directly instead of getting them with get_plugin_methods and then calling. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: throw exception if required API is not implementedEd Bartosh
Throw WicError if do_create method of imager plugin is not implemented. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: pluginbase: use python 3 metaclass syntaxEd Bartosh
Used more readable syntax to specify metaclass for the base plugin classes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: reimplement PluginMgr.get_pluginsEd Bartosh
Removed all private methods and complicated logic. Put all code to get plugins into get_plugins method. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: reimplement PluginMgr.get_plugin_methodsEd Bartosh
Simplified the implementation of get_plugin_methods: - get rid of looping over the dicrtionary, used access by key instead - get rid of filling a dictionary that passed as a parameter Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: remove PluginMgr.get_source_pluginsEd Bartosh
Used get_plugins('source') instead of get_source_plugins to unify and simplify API to get plugins. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use PluginMgr directlyEd Bartosh
Instead of making a singleton object of PluginMgr class it's simpler to use PluginMgr class directly as any class is a singleton. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: move WicError to lib/wic/__init__.pyEd Bartosh
Removed unused exceptions from error.py Moved definition of WicError to lib/wic/__init__.py Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: raise WicError instead of ImageError and CreatorErrorEd Bartosh
There is no need to raise special exceptions. Raising WicError should be enough. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: raise WicError in wic pluginsEd Bartosh
Replaced sys.exit with raising WicError in wic plugins. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: raise WicError in core modulesEd Bartosh
Replaced sys.exit with raising WicError in the core wic modules. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: raise WicError in main moduleEd Bartosh
Replaced sys.exit with raising WicError in main module. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: move errors moduleEd Bartosh
Moved from lib/wic/utils/ to lib/wic as this is a core module. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: remove msger moduleEd Bartosh
Removed custom logger module msger as it's replaced by wic logger. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use wic logger in wic source pluginsEd Bartosh
Replaced msger with wic logger in wic source plugins. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use wic logger in imager direct pluginEd Bartosh
Replaced msger with wic logger in the direct plugin. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use wic logger in core modulesEd Bartosh
Replaced msger with wic logger in the core wic modules. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: setup logging in the main wic moduleEd Bartosh
Set up wic logger using standerd logging module. This is going to replace custom msger module. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-01devtool/sdk: Run build-sysroots after installing new thingsRichard Purdie
After running sdk-install we need to ensure that the standalone sysroots are updated as done when the eSDK is originally built. Add such a call so this happens automatically and the envrionment scripts in the SDK work correctly after updates. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01generate-manifest-2.7.py: fix python-tests rdependsMing Liu
A potential flaw was introduced by commit a8dc4bc0: [ python: fix python-tests rdepends ] It made python-tests RDEPENDS on python-modules which is correct, but this should be done in generate-manifest-2.7.py, and re-generate the manifest. Fixed by adding this dependency in generate-manifest-2.7.py as well. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01generate-manifest-3.5.py: add logic to generate native manifestMing Liu
python3-native supposes to RPROVIDE all native packages as added in generate-manifest-3.5.py, but it does not so far, this leads a problem that sometimes bitbake cant find a runtime provider for a python3-*-native when a new runtime dependency on it being required, this usualy happens after a new native python3-* recipe is created or the old native python3-* recipes are upgraded. To avoid manually extending RPROVIDE every time when a new runtime dependency is introduced, an argument '-n/--native' is added to the manifest generator, allowing it create a native python3 manifest, with a RPROVIDE line only, the RPROVIDE should contain all the sub-packages. The generated python-native-3.5-manifest.inc is also added which is included by python3-native recipe. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01generate-manifest-2.7.py: add logic to generate native manifestMing Liu
python-native supposes to RPROVIDE all native packages as added in generate-manifest-2.7.py, but it does not so far, this leads a problem that sometimes bitbake cant find a runtime provider for a python-*-native when a new runtime dependency on it being required, this usualy happens after a new native python-* recipe is created or the old native python-* recipes are upgraded. To give a example, the following commit is trying to address such a issue: commit 4583cd1bb15306e8f0ab7bcd80732e6f35aa4533: [ python-native: Make python-native also RPROVIDE python-unittest-native ] To avoid manually extending RPROVIDE every time when a new runtime dependency is introduced, an argument '-n/--native' is added to the manifest generator, allowing it create a native python manifest, with a RPROVIDE line only, the RPROVIDE should contain all the sub-packages. The generated python-native-2.7-manifest.inc is also added which is included by python-native recipe. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-01scripts/lib/devtool/deploy.py: add --port/-P argument for target connectionTim Orling
Enable using, e.g. host port 2222 for connection to qemu target. Defaults to 22 for standard ssh/scp port. [YOCTO #11079] Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-28runqemu: support UEFI with OVMF firmwarePatrick Ohly
In the simplest case, "runqemu qemux86 <some-image> qcow2 ovmf" for an EFI-enabled image in the qcow2 format will locate the ovmf.qcow2 firmware file deployed by the ovmf recipe in the image deploy directory, override the graphics hardware with "-vga std" because that is all that OVMF supports, and boot with UEFI enabled. ovmf is not built by default. Either do it explicitly ("bitbake ovmf") or make it a part of the normal build ("MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = ' ovmf'"). The firmware file is activated as a flash drive instead of using the qemu BIOS parameters, because that is the recommended method (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764918#47) as it allows storing UEFI variables in the file. Instead of just "ovmf", a full path to an existing file can also be used, just as with the rootfs. That may be useful when making a permanent copy of the virtual machine data files. It is possible to specify "ovmf*" parameters more than once, then each parameter creates a separate flash drive. This way it is possible to use separate flash drives for firmware code and variables: $ runqemu qemux86 <some-image> qcow2 ovmf.code ovmf.vars" Note that rebuilding ovmf will overwrite the ovmf.vars.qcow2 file in the image deploy directory. So when the goal is to update the firmware while keeping variables, make a copy of the variable file and use that: $ mkdir my-machine $ cp tmp/deploy/images/qemux86/ovmf.vars.qcow2 my-machine/ $ runqemu qemux86 <some-image> qcow2 ovmf.code my-machine/ovmf.vars.qcow2 When Secure Boot was enabled in ovmf, one can pick that instead of the non-Secure-Boot enabled ovmf.code: $ runqemu qemux86 <some-image> qcow2 ovmf.secboot.code my-machine/ovmf.vars.qcow2 Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>