Commit Graph

2555 Commits

Author SHA1 Message Date
Saul Wold 07eca81801 crosstap: Changes to support Recipe specific sysroot
The crosstap script needed to be updated for recipe specific sysroot
changes including adding support for finding the systemtap binaries.

[YOCTO #10990]

(From OE-Core rev: 1098bcbc4520874967e7bd23fe798ab1a123fac4)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:56 +00:00
Aníbal Limón 93633edcf8 yocto-compat-layer.py: Add script to YP Compatible Layer validation
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

(From OE-Core rev: e14596ac33329bc61fe38a6582fa91f76ff5b147)

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-04 23:18:19 +00:00
Markus Lehtonen 28376f9552 build-perf-test-wrapper.sh: support xml report format
Add new command line option '-x' that enbles xml-formatted reports.

(From OE-Core rev: 1aa909991c7c6cd484cae35fcc742fbe7af3f8e8)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Dmitry Rozhkov b4b2d6dec4 scripts/runqemu: avoid overridden user input for bootparams
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.

(From OE-Core rev: 3f68b5c8d24b52aed5bb3ed970dd8f779b65b1b3)

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Aníbal Limón 86d6b790eb scripts/runqemu: Add always ttyS1 when no serial options are specified
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)

(From OE-Core rev: ab8d1a73ad5285dbc86352813b24db2adb3c6367)

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-04 23:18:18 +00:00
Anders Darander f573db010f scripts/lib/create_npm: handle Public Domain licenses
Rewrite Public Domain as PD, as that's what the place holder in
meta/files/common_licenses is called.

(From OE-Core rev: d7f0af5aa90a9ef7714c842fb4cb762017820768)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Anders Darander 1da740ef32 scripts/lib/create_npm: handle AND and OR in licenses
Handle npm packages with multiple licenses (AND and OR).
Prior to this, AND and OR were treated as licensed in their
own.

(From OE-Core rev: c0cfd9b1d54b05ad048f444d6fe248aa0500159e)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Anders Darander 837d89b47b scripts/lib/create_npm: rewrite see license in eula
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.

(From OE-Core rev: 39127702cee80c972ee9a447ef4006751f47475e)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Anders Darander ca83f35f5a create_npm.py: convert MIT/X11 to MIT
Quite a few npm packages declare MIT/X11 as their license. This is equal to
a pure MIT license.

(From OE-Core rev: 8df5e731a10cc9ade1266e9daaa26ec7c855c062)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh 13c54959dd wic: add more targets to directdisk syslinux config
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]

(From OE-Core rev: 95bf0af5293a7f5868abd85f4fc15f5c542bfd09)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh bf3e8c4500 wic: bootimg-pcbios: add support for syslinux vesamenu
Installed vesamenu.c32 and its dependencies to support
vesamenu ui in syslinux config.

(From OE-Core rev: 6d7e57ca7e77f3164e4d24470bb1e3ee91a07a89)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh aad85050d7 wic: raise WicError instead of calling logger.error
Replaced forgotten calls of logger.error with raising
WicError exception. Otherwise errors will be ignored.

(From OE-Core rev: 7a5156092699593903a4bedb4cb23cc6e42ea62e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh e3c64a90d7 wic: exec_native_cmd: fix undefined variable error
Defined variable 'out' to fix this exception:
UnboundLocalError: local variable 'out' referenced before assignment

(From OE-Core rev: d994340ec32ec04226ec185a8998775602c8b8bf)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh 97b07710c3 wic: exec_native_cmd: improve debug message
Added search paths to the debug message to make it
easier to see where the native command is searched.

[YOCTO #11017]

(From OE-Core rev: 3e78aa91aa07510a75ec2eecdd2dd00b1c583c26)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh 35df4ad171 wic: use image recipe sysroot as default
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]

(From OE-Core rev: fc94feda4f4785bc020413943c80050adea13dc0)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:18 +00:00
Ed Bartosh 6d5dd6e560 wic: use 2 sysroots to find native executable
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]

(From OE-Core rev: 06f976cb7c593ab14ee221365d9afbaf9de94a91)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh c4b96817e5 wic: pluginbase: use global dictionary
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.

(From OE-Core rev: 68df14eb43103537279824c5f627cc5914b5282c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 0c0ed61992 wic: move PluginMgr class to pluginbase
As PluginMgr class contains only one method it's
better to move it to pluginbase to have all plugin
related APIs in one module.

(From OE-Core rev: 244585b369ecc0019002ca51bf7f8fd506234462)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 93b3eb37ff wic: plugin: cache results in get_plugins
Store results of PluginMgr.get_plugins to avoid
loading plugins more than once.

This should speed up finding plugins.

(From OE-Core rev: 95ba37b394d01a6ed81f32ffa03813a070d682dc)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh b9839fd664 wic: remove PluginMgr.get_plugin_methods
Call methods directly instead of getting them with
get_plugin_methods and then calling.

(From OE-Core rev: efcd07fe17bf55441059b00a5becc3952e0a4075)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 59b72c0b26 wic: throw exception if required API is not implemented
Throw WicError if do_create method of imager plugin is
not implemented.

(From OE-Core rev: 87031c933047a37ddc26be3d04ea17b6e60ea10a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 455ce228df wic: pluginbase: use python 3 metaclass syntax
Used more readable syntax to specify metaclass for
the base plugin classes.

(From OE-Core rev: 808451f154867caef73e00af04f56f051b7d5f6b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh d088d22a38 wic: reimplement PluginMgr.get_plugins
Removed all private methods and complicated logic.
Put all code to get plugins into get_plugins method.

(From OE-Core rev: 9b8c69cdc8500ce065dbe607ba07ee95c1016659)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh d8cf70bf0f wic: reimplement PluginMgr.get_plugin_methods
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

(From OE-Core rev: 875d4eede61b548d64f426c2ef077cc17e50cd45)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 27e172c3b6 wic: remove PluginMgr.get_source_plugins
Used get_plugins('source') instead of get_source_plugins to
unify and simplify API to get plugins.

(From OE-Core rev: aaab003e472416124d7342fc8c4a17c252b83f4d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh ec7b604b1e wic: use PluginMgr directly
Instead of making a singleton object of PluginMgr class
it's simpler to use PluginMgr class directly as any class
is a singleton.

(From OE-Core rev: cbe7dbd31f2292416d8e801e142679c69d9a44bc)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh f8a4bd9950 wic: move WicError to lib/wic/__init__.py
Removed unused exceptions from error.py
Moved definition of WicError to lib/wic/__init__.py

(From OE-Core rev: 15442d072bb6d93bd9b941726f93262503053da5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh af17aa91b3 wic: raise WicError instead of ImageError and CreatorError
There is no need to raise special exceptions. Raising
WicError should be enough.

(From OE-Core rev: b952076cc9f458c3d5eb03e12dc3ec316a44804c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 8da175607c wic: raise WicError in wic plugins
Replaced sys.exit with raising WicError in wic plugins.

(From OE-Core rev: 92e8c81c941597eb2b4b61d5c28833e4826888f8)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh f5ae79da40 wic: raise WicError in core modules
Replaced sys.exit with raising WicError in the core wic modules.

(From OE-Core rev: 1b11437fb25ece5b3eede52344b071e875fa738f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 3d47a212a6 wic: raise WicError in main module
Replaced sys.exit with raising WicError in main module.

(From OE-Core rev: b7c19f1ee8b850806c73ccd6f99c42d94a725fc9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:17 +00:00
Ed Bartosh 79c066b298 wic: move errors module
Moved from lib/wic/utils/ to lib/wic as this is a core module.

(From OE-Core rev: 808c70b81de5c3cfc3dcb01f08213e2ea33b7252)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:16 +00:00
Ed Bartosh 28014087b8 wic: remove msger module
Removed custom logger module msger as it's replaced
by wic logger.

(From OE-Core rev: 8fdceeee99c3fc60649414b39933ec295c810e6b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:16 +00:00
Ed Bartosh 1dd8cca631 wic: use wic logger in wic source plugins
Replaced msger with wic logger in wic source plugins.

(From OE-Core rev: 19a868e9ad12fb27a7f713685d12f3d310fd6961)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:16 +00:00
Ed Bartosh 7c163ada95 wic: use wic logger in imager direct plugin
Replaced msger with wic logger in the direct plugin.

(From OE-Core rev: adeacb4e600b8438bd9db7e83a5cb4a118d186f3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:16 +00:00
Ed Bartosh fe2d602240 wic: use wic logger in core modules
Replaced msger with wic logger in the core wic modules.

(From OE-Core rev: cdd6675951b74075c9b9159f7465a88f83775bac)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:16 +00:00
Ed Bartosh 58ff06f1e7 wic: setup logging in the main wic module
Set up wic logger using standerd logging module.
This is going to replace custom msger module.

(From OE-Core rev: f7d9e33aa129d8ab98dd1971154c29c275d103b0)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04 23:18:16 +00:00
Richard Purdie f73172e64e devtool/sdk: Run build-sysroots after installing new things
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.

(From OE-Core rev: 4f422071d6f9a074986f399d9e648977bd2e0a68)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Ming Liu 5230e490f8 generate-manifest-2.7.py: fix python-tests rdepends
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.

(From OE-Core rev: 13adc5bbfd2ef64133a086ec6c917ac3ef274087)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:10 +00:00
Ming Liu 2f821f3c09 generate-manifest-3.5.py: add logic to generate native manifest
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.

(From OE-Core rev: 800753069f667cd1664d70b3779150c467e3b3fe)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:10 +00:00
Ming Liu e720e3b4af generate-manifest-2.7.py: add logic to generate native manifest
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.

(From OE-Core rev: 0cb15d9559e34faffea1ac0be825d0602f225ba9)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:10 +00:00
Tim Orling ea8b9d5d7b scripts/lib/devtool/deploy.py: add --port/-P argument for target connection
Enable using, e.g. host port 2222 for connection to qemu target.
Defaults to 22 for standard ssh/scp port.

[YOCTO #11079]

(From OE-Core rev: a2bfa2cc9ee19f617f7d3b6447896e45eb855d2e)

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:06 +00:00
Patrick Ohly 715f4e3ec1 runqemu: support UEFI with OVMF firmware
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

(From OE-Core rev: b91fc0893651b9e3069893e36439de0b4e70ad13)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:44 +00:00
Patrick Ohly 63f61a1aff runqemu: also accept -image suffix for rootfs parameter
The magic detection of the rootfs parameter only worked for image
recipes which embedd the "image" string in the middle, as in
"core-image-minimal".

Sometimes it is more natural to call an image "something-image". To
get such an image detected by runqemu, "-image" at the end of a
parameter must also cause that parameter to be treated as the rootfs
parameter.

Inside the image directory, "something-image" has an -<arch> suffix
and thus no change is needed for those usages of
re.search('-image-'). However, while at it also enhance those string
searches a bit (no need for re; any()+map() a bit closer to the
intended logic).

(From OE-Core rev: ca0fad3ad9d75d4198388b2a3133326267fc58db)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:44 +00:00
Patrick Ohly 29618da02d runqemu: fix undefined variable reference in check_arg_path()
'arg' isn't defined, the right name there is 'p'.

This fixes a rather obscure error message when that code path
ends up being taken:

$ runqemu some/existing-file-name
runqemu - ERROR - name 'arg' is not defined
runqemu - ERROR - Try 'runqemu help' on how to use it

(From OE-Core rev: 3f11e4cbb36fc65ff92296065e5f0a508b210ac7)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:44 +00:00
Luck Hoang 1d133ec021 devtool: upgrade: fix error of import recipeutils
upgrade.py imports oe.recipeutils in meta/lib/ but path to oe.recipeutils
is not provided. This fails populate_sdk_ext.

(From OE-Core rev: 5f140359f859fea9cfe8c8d9c9584bceec875adb)

Signed-off-by: Luck Hoang <huyht1205@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:49 -08:00
Markus Lehtonen 3b17343e6f scripts/buildstats-diff: fix epoch numbers in --ver-diff
Incorrect data was printed (recipe name instead of epoch number) when
displaying changes in epoch.

(From OE-Core rev: 5e2b1bfb684dc76963f692172f7457c2249c3266)

(From OE-Core rev: d3f4ec2ad5e83f52f7d3824cfe1f5a64f2d81bcf)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23 12:49:48 -08:00
Ed Bartosh 01b9ab89de wic: direct: move creation of PartitionedImage to __init__
Moved creation of PartitionedImage object from DirectPlugin.create
method to init. It makes the code a bit more readable and logical.

(From OE-Core rev: 9f225ef5620f2e47e762b2fd16fa5f8d6f1f60fd)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 924e84ea8d wic: direct: move generation of part.realnum to PartitionedImage
Moved the code that generates real partition numbers from DirectPlugin
to PartitionedImage.

The idea is to have all code that works with partitions
in PartitionedImage class.

(From OE-Core rev: dbd58b0b32288821d9dd5d1a3118cf7c6e8f098a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 32e2d92913 wic: direct: add PartitionedImage.prepare method
Moved code that calls prepare method of Partition objects
from DirectPlugin to PartitionedImage.prepare.

The idea is to have all code that works with partitions
in PartitionedImage class.

(From OE-Core rev: 700aa424f0aa239cf4149eed4bfb1dc7d9677431)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 01d37e7537 wic: direct: set bootloader.source in the __init__
Moved setting of bootloader source from do_create method
to __init__ as it doesn't have anything to do with image
creation.

(From OE-Core rev: 361b890da1c7b24de0a62516545e4c164830081d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 58528cd5a7 wic: direct: move UUID generation to PartitionedImage
Moved code that generates partition UUIDs from DirectPlugin to
PartitionedImage class as it's more logical to have it there.
This allows the code to be reused by other imager plugins.

Got rid of having yet another list of partitions in PartitionedImage.
Reused the list passed from DirectPlugin.

(From OE-Core rev: 20c70dd617d4abfff507e210610a58a9989f7c9b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh d5f42cad0c wic: direct: add 'realnum' attribute to partition
Replaced call of _get_part_num method with an attribute.
This eliminates the need to call the method and loop over
partitions every time we need to know realnum for partition.

(From OE-Core rev: 96a26b6ddf22346dafa06b00816579439e98445f)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 77dc8e6ef3 wic: direct: remove useless code
Removed catching CreatorError and raising it again.

(From OE-Core rev: c17353c8ec9ecb52368e08dad999aafc9ac1b734)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 870171a205 wic: direct: don't catch ImagerError
Don't transform ImagerError exception into warning.
Let wic to catch it on the upper level.

(From OE-Core rev: 0cc84c81dd4a776aa37c8d1bcdcc3fa3af78d1e4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 417e5fbe2b wic: direct: remove set_bootimg_dir setter
Removed java-like setter set_bootimg_dir. It's more pythonic
to access public attributes directly.

(From OE-Core rev: c2a6ca4883ea59e6492ad3b4aa0e9bc358b87fed)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 6d91c5f6f4 wic: ksparser: set default disk to 'sda'
Set default value of --ondisk to 'sda' to ensure
we always have disk name for the partition.

This is a first step of replacing --ondisk with
disk <name> attribute of .wks. This is better as
all partitions share the same disk.

(From OE-Core rev: caa243a86ba50c676f8eb0a71440885a49f10cc4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh 93906fb830 wic: remove utils/oe/__init__.py
This file and utils/oe folder are not needed anymore as
all modules were removed or moved out of this directory.

(From OE-Core rev: e3b73b1c07620cde423cc7db7e2f7d8b1ad25e25)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:45 -08:00
Ed Bartosh cdcc6e2753 wic: move PartitionedImage class to direct.py
As PartitionedImage is only used in direct.py it makes sense
to move it there. It's easier to maintain (and refactor) it
this way.

(From OE-Core rev: 2550622371f5c50857e5d58eabab01a1823c6fc3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:44 -08:00
Ed Bartosh adf5e2956c wic: move disk operations to PartitionImage class
Disk operations were spread over DirectPlugin, DiskImage and Image
code making the code hard to understand.

Renamed Image class to PartitionedImage.
Removed DiskImage class.
Moved disk operations to PartitionedImage.

There was an implicit support for multiple disks: if different devices
were specified in .wks file (e.g. --ondisk sda and --ondisk sdb), wic
would theoretically generate multiple images. This is quite confusing
option and the code supporting it was broken for a long time. The same
effect (multiple output images) can be achieved in obvious and clear
way - by using multiple .wks files.

This functionality was removed. PartitionedImage works only with
one image. This makes the code less complex and easier to maintain.

(From OE-Core rev: 4dc9dbfc7fbc16d349a019e8973d50905cd28244)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:44 -08:00
Kristian Amlie f6a064d969 wic: Add --exclude-path option to rootfs source plugin.
It will omit the given path from the resulting partition, and if the
given path ends in a slash, it will only delete the content, and keep
the directory.

Since mkfs only accepts whole directories as input, we need to copy
the rootfs directory to the workdir so that we can selectively delete
files from it.

Since we want to use the copyhardlinktree() function, we need to put
the generic oe lib in the module search path.

(From OE-Core rev: 6602392db3d391d926dead49fcc54326015cfe35)

Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:44 -08:00
Ed Bartosh 7cb17e3e9e wic: remove unused argument scripts_path
There is no need to pass scripts_path from main wic module
down the stack as it's not used there.

Removed scripts_path argument from DirectPlugin class
and wic_create function.

(From OE-Core rev: f9f72c506befdff13260f37ded0beaea3aa30fad)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh 74aee7a1a7 wic: direct: remove unused import
Removed unused import of wic.errors module.

(From OE-Core rev: 318ba1edfcf0cacf6adae7e1af625dcb43ec3881)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh 348c9c50c1 wic: direct: remove unused plugin attributes
Removed unused _disks, _disk_format and _disk_names
attributes from DirectPlugin class.

(From OE-Core rev: 178df49cf1674bfcf1cb7295d0494c3b23929d22)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh a9be5de4a1 wic: make sure layout_partitions is called once
Removed artificial _partitions_layed_out attribute and
unneeded call of layout_partitions method.

(From OE-Core rev: 702772edc839c220140ac0572bb14b4e44c81c1c)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh fd1f6fb201 wic: use the same partition object in direct and partitionedfs
Partition attributes were copied to the dictionary in partitionedfs
code, which makes the code hard to follow.

Used partition object passed from direct.py module as is in
partitionedfs.

(From OE-Core rev: 97db24d34847a641868f9ee83aae56f9dd5e0a8a)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh 4edcd63ba1 wic: direct: get rid of _get_parts getter
Replaced _get_parts getter with direct attribute
access to self.parts

Removed code that implicitly created partition
if there are no partitions mentioned in .wks file

(From OE-Core rev: 7ece57a80f4002d0d83dc322092e9178380ab509)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh 6355150674 wic: partitionedfs: rename __create_partition and __add_disk
Renamed private methods with leading double underscores:
__create_partition -> _create_partition
__add_disk -> _add_disk

There is no point to have those names mangled, one underscore
is enough.

(From OE-Core rev: 26f3218070d34ccd4e81fa3b8e1a15c03583d070)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh 86e190a614 wic: partitionedfs: get rid of __add_partition
3 lines long private method __add_partition is called only
from add_partition method. Merged them together to increase
readability.

(From OE-Core rev: b7fb20fffada61211dda6d41f99407618428f23c)

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>
2017-02-15 20:06:44 -08:00
Ed Bartosh b8354df789 wic: partitionedfs: merged __format_disks and create
Private method __format_disks is called only from create
method making the code less readable. Merged the code
into one method.

(From OE-Core rev: b76b1bd404487df38fd99bc0d0e6a59acb10c9d3)

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>
2017-02-15 20:06:44 -08:00
Markus Lehtonen f4ba140c59 build-perf-test-wrapper.sh: fix issues with non-existing path arguments
Without the '-s' option realpath will error out if the given path does
not exist.

(From OE-Core rev: b80aba08ba56c7e8f847966b3593f6cedd1b1ee5)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Markus Lehtonen 1440b3e9aa oe-build-perf-test: drop --commit-results
Drop support for committing results into Git repository. The
functionality was not directly related to testing and feels unnecessary
complication of the script. The functionality has been moved into a
separate oe-git-archive script.

[YOCTO #10582]

(From OE-Core rev: 4de387c0cfcb6b58760c6b6e150474abe82bfe4c)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Markus Lehtonen 37c9f3f180 build-perf-test-wrapper.sh: use oe-git-archive
Start to use the new helper script for archiving results data in Git.

[YOCTO #10582]

(From OE-Core rev: 3d8a1df37407686ed699485c37c8517f1d79755d)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Markus Lehtonen 3c862c647c scripts/oe-git-archive: support creating bare repositories
[YOCTO #10582]

(From OE-Core rev: 995cb3bf2b3303067828a1358051e5e11caad843)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Markus Lehtonen 69c7907bd9 scripts: Implement oe-git-archive
A helper script for committing data to git and pushing it upstream. The
motivation for the script stems from the need to archiving QA test
results in git, but it could be used elsewhere, of course. The script
needs to be run under an initialized build environment because it
utilizes bitbake configuration information.

[YOCTO #10582]

(From OE-Core rev: 801e612b137b9d5366639d5b1635151347da5983)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 20:06:41 -08:00
Richard Purdie bfd0a39bdf classes: Drop now unneeded update_data calls
Now that the datastore works dynamically we don't need the update_data calls
so we can just remove them. They're not actually done anything at all for
a while.

(From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15 09:29:55 -08:00
Paul Eggleton e8f4e06e76 devtool: improve parse failure handling
With the move to tinfoil2, the behaviour when parsing failed has changed
a bit - exceptions are now raised, so handle these appropriately.
Specifically when if parsing the recipe created when running devtool add
fails, rename it to .bb.parsefailed so that the user can run bitbake
afterwards without parsing being interrupted.

(From OE-Core rev: b9592bd3c1ab2155b9f62d18ce593b9c88eff279)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07 14:50:09 +00:00
Paul Eggleton e0a94f2e1f recipetool: create: do not treat numbers in SCM URLs as versions
Numbers within SCM (e.g. git) URLs are extremely unlikely to be valid
version numbers - more likely they are just part of the name, thus don't
try to extract them and use them as the version - doing so causes pretty
bad behaviour within devtool:

--------- snip ---------
$ devtool add https://github.com/inhedron/libtr50
NOTE: Fetching git://github.com/inhedron/libtr50;protocol=https...
...
NOTE: Using default source tree path .../build/workspace/sources/libtr
...
RecursionError: maximum recursion depth exceeded while calling a Python object
--------- snip ---------

(This was because ${PV} was being substituted into the URL, but PV's
value was being set to include ${SRCPV}, so there was a circular
reference.)

(From OE-Core rev: 3427508b6ce865654f8bf01a6fc04b83c70315d3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07 14:50:09 +00:00
Paul Eggleton 6ac9c605e6 recipetool: create: properly handle npm optional dependencies
npm's package.json supports two types of dependencies -
optionalDependencies and dependencies; in the code for creating a recipe
from a non-npm source (e.g. a git repository) we were not handling
optionalDependencies and thus when pointed at a node.js application
outside of npm we weren't taking care of all dependencies.

(From OE-Core rev: 2b66cb9982d10ce1744d430858eaef3e5a72c8c0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-07 14:50:09 +00:00
Ed Bartosh 07f32d7af8 wic: fix call of serial_console_form_kargs
As syslinux module has been recently removed and
serial_consloe_form_kargs became local API in rootfs_pcbios_ext plugin
it should be called without syslinux. prefix.

(From OE-Core rev: d701673b658d879726d6cf846a6d5f4173c3b0e5)

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>
2017-02-05 09:22:18 +00:00
Ed Bartosh f9b58d0d11 wic: isoimage-isohybrid: use wic-tools to get syslinux path
wic-tools recipe specific sysroot contains syslinux as wic-tools
depends on it. Used wic-tools target to get syslinux path should
guarantee that syslinux is installed there and can be used.

(From OE-Core rev: be8ebac3b055070f690d42836bb0fdad32d29204)

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>
2017-02-05 09:22:18 +00:00
Ed Bartosh 71ce8d09e0 wic: flatten imager class hierarchy
wic code is hard to follow due to deep and twiggy class
inheritance tree.

Flatten imager tree:
 wic -> wic_create -> Creator -> DirectPlugin -> DirectImageCreator
to
 wic -> wic_create -> DirectPlugin
by
 removing Creator class and creator module
 merging DirectImageCreator into DirectPlugin

Changed APIs to use the same parameters names.

Passed parsed command line options as an object down the stack.

(From OE-Core rev: 1e28d512341ce470c7afb256a01e597ab87170ca)

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>
2017-02-05 09:22:17 +00:00
Anders Darander 8243ebdbb7 python-3-manifest: split out typing
This allows us to use typing.py without having to add the whole
python3-misc package.

(From OE-Core rev: 66c282541a13f2d1224d3ba933a953c0f613fb2a)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Anders Darander 5776eea84d python-3-manifest: add ipaddress to python3-io
This allows us to use ipaddress without requiring the add the whole
python3-misc.

(From OE-Core rev: d0e9013f6c68104369de940f5dd8a6ef76cd0210)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Anders Darander db6977f72c python-3-manifest: add _compat_pickle to python3-pickle
This allows us to depend on _compat_pickle.* wihtout having to add the whole
python3-misc.

(From OE-Core rev: 6c435672b27d1c97ce3776c98d073a92fde887cd)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Anders Darander 64ab82509d python-3-manifest: add socketserver to netserver
socketserver.* should be part of python3-netserver.

(From OE-Core rev: 8aa71c7133f996f6ed09a3c094e553bed7f33c7a)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Anders Darander ce5661ddc1 python-3-manifest: add argparse to RDEPENDS for netclient
http/server.py requires argparse.

(From OE-Core rev: 04d3e78b31c247ee521a2d4c15286a8c030637cb)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Anders Darander 67127bec02 python3-manifest: move htlm.py to python3-html
This allows us to use html.py without importing misc.

(From OE-Core rev: d1fefcaa10b85837d18458e291a3df9093b3a6ea)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Anders Darander cf610aa69f python-3-manifest: fix adding imp to importlib
Commit: 512334f102a33833d39af53467894315f0715d07
	"python-3.5-manifest: Add imp to importlib"

added imp to importlib in the generated manifest, but not in the generator script.

(From OE-Core rev: bfe1d948ab034017622110c8365be7026e139fbf)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:16 +00:00
Ed Bartosh 3571e3e77f wic: get rid of image_output_dir variable
Used options.outdir instead of image_output_dir.
There is no sense to use extra variable for this.

(From OE-Core rev: c6013dcb158a84d48cc2677f1509681cf9e0a3cb)

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>
2017-02-02 17:37:45 +00:00
Ed Bartosh 14652a42d8 wic: direct: fix creation of work directory
It was a typo in current code: mktemp was used instead of
mkdtemp to create work directory. This is fixed by using
mkdtemp.

Create work directory as a subdirectory of output directory
to make sure both are on the same partition to make moving
of result image faster.

This also fixes possible disk space issues as mkdtemp uses
TMPDIR, TEMP or TMP environment variables to get default value
of its 'dir' parameter. Those variables are usually pointing
to /tmp, which is not the best location to create huge images.

(From OE-Core rev: e6579b4e007ce89000c46c09917fbd3c72f18a73)

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>
2017-02-02 17:37:45 +00:00
Ed Bartosh 81ef850314 wic: engine: create output dir
Make sure output directory exists before creating an image.
Create it if it doesn't exist.

(From OE-Core rev: e52bfb0e81d3fb2a474f08b2e2b8b89aadc61d14)

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>
2017-02-02 17:37:45 +00:00
Ming Liu 6469647f48 scripts/runqemu: fix a typo
(From OE-Core rev: c72d5acb9c2f4a7d4dfe0e78aae832b10aec4429)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:45 +00:00
Markus Lehtonen 42eace0770 build-perf-test-wrapper.sh: implement locking
In order to prevent multiple instances of the script running at the same
time.

(From OE-Core rev: 96a194de890f7ef1e6e5e036b32848e0f9d1bcf5)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:45 +00:00
Ed Bartosh f1957bf59e wic: remove syslinux.py
This module contains singe function serial_console_form_kargs, which
is used only by rootfs_pcbios_ext plugin. Moved it there and removed
syslinux module to make it easy to find and mainain plugin code.

[YOCTO #10619]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:45 +00:00
Ed Bartosh 653aaea3cc wic: code cleanup
Fixed indentation, unused imports, trailing lines etc.

[YOCTO #10619]

(From OE-Core rev: 5fa7768bfb4b6d464c6a812822b0665f52e7bea4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 1f7ce90af6 wic: msger.py: remove unused APIs
Removed unused enable_logstderr and disable_logstderr APIs.

[YOCTO #10619]

(From OE-Core rev: 835f7a5c4c51f3d0d31d0193258b50596ceacb5a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 9048f52f3a wic: removed code from __init__.py
The code deals with non-existing directory
and can be removed.

[YOCTO #10619]

(From OE-Core rev: e148884b8145fad212c4085f2ead5c3e5e3e42a2)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 614851f1db wic: move oe/misc.py one level up
Flattened directory structure:
   moved wic/utils/oe/misc.py -> wic/utils/misc.py

[YOCTO #10619]

(From OE-Core rev: 392532a2748ff2e6412eeb79163662b5168611ce)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 2d6f96048e wic: move 2 APIs to wic.engine
Moved find_canned and get_custom_config APIs to engine module.
Removed empty wic.utils.misc module.

[YOCTO #10619]

(From OE-Core rev: 10e9afac46575d3f557b7cb505daa31ce9ce85fa)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 759c24c404 wci: misc: removed build_name API
This API is not used in wic code.

[YOCTO #10619]

(From OE-Core rev: 9d14cb8bb8cf9559b7ff0efa03427624c18e2506)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 08217a4c80 wic: partition: simlify calling plugin methods
Replaced parse_sourceparams function with list comprehension.
Used local variables instead of attributes.
Moved global variable to the local scope.

[YOCTO #10619]

(From OE-Core rev: 4adbac84046ff744f1452b5ff4d017d17d2d45e2)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh d8a89baffb wic: removed test file
This file is not used anywhere in the wic code.

[YOCTO #10619]

(From OE-Core rev: e3c43ce3261663225aeba50b8c6229577574f9b7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 53bd29d65e wic: renamd direct_plugin.py -> direct.py
As this files is located in plugins/imager subdirectory it's
obvious that it's an imager plugin. Renamed to direct.py to
be consistent with plugin naming scheme.

[YOCTO #10619]

(From OE-Core rev: d5db8c2ee91bdd51bfbb2ebf61aea8ff0378d512)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 8fda677a08 wic: simplified code of direct_plugin
Removed unused methods.
Got rid of get_default_source_plugin and _full_name methods.

[YOCTO #10619]

(From OE-Core rev: c5706f71dee531557a6b1290665283b8637fff6e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 59496d9cdc wic: pylinted direct_plugin
Fixed wrong continued indentation, unused import and
trailing new line pyling warnings.

[YOCTO #10619]

(From OE-Core rev: e78762a4b52c31357ef29a5b93c53db7190fa4f2)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh f36c70b067 wic: improve naming in direct_plugin classes
Synchronized attribure names in DirectImageCreator and
DirectPlugin for better readability. Simplified code,
removed unneeded global variable disk_methods.

(From OE-Core rev: b87b9ef84791615636424a224f74386a4aa0c2fa)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 2db161f1c0 wic: get rid of __rootfs_dir_to_dict method
Replaced class method __rootfs_dir_to_dict with a list
comprehension.

[YOCTO #10619]

(From OE-Core rev: 266fd31410771db4c06539f7368c196a6d03000a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh ee10c2f1bb wic: moved content of direct.py to direct_plugin
This move simplifies directory structure and makes
further refactoring easier. The code from direct.py was used
only in direct_plugin, so it's safe to move it there.

[YOCTO #10619]

(From OE-Core rev: a8f5ebb26183faa9af6eb72f4dabfcf83aa1e8d4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh dba8cf377c wic: removed conf.py and empty config file.
Removed as they're not used anymore in wic code.

(From OE-Core rev: ffa2f3d7bf883d5add911b7c5d0be2b347733524)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 0ff04e1e95 wic: direct_plugin: stop using config manager
This is a preparation to removing conf.py and config/wic.conf
from the codebase.

Got rid of using configmgr global object in direct_plugin and direct
modules. It was used to implicitly parse kickstart file and set
couple of variables.

Replaced usage of configmgr by passing parameters directly to the
DirectImageCreator.

[YOCTO #10619]

(From OE-Core rev: 79191119de010acb107f9392a991108728858441)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Ed Bartosh 65a99448a4 wic: creator: stop using config manager
This is a preparation to removing conf.py and config/wic.conf
from the codebase.

confmgr object is complicated for no reason and almost
useless as all configuration info comes from command line and
bitbake variables. It's used it creator.py to store information
about output directory, logs and some never used functionality
like tmpfs for future use, which doesn't actually happen.

[YOCTO #10619]

(From OE-Core rev: 702ee7a1fe30d87d55ba9528ae89abff4e294fd9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-02 17:37:44 +00:00
Patrick Ohly d99b29838d verify-bashisms: support warnings with more than one line of source code
All warnings start with "possible bashism in", followed by one or more
(in the case of line continuation) lines of source code. To support
more than one line, we now split by matching against the known intro
text.

Example:

 $ verify-bashisms guile
 ...
 /.../openembedded-core/meta/recipes-devtools/guile/guile_2.0.13.bb
  possible bashism in guile_cross_config line 94 ($'...' should be "$(printf '...')"):
         	echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
 			> ${B}/guile-config.cross

(From OE-Core rev: e2dd3621c45e854b4eb054b4d4537487462cdd39)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:41 +00:00
Patrick Ohly 0b95e47180 verify-bashisms: check scripts only once, include original file and line
Several scripts that are defined in .bbclass files end up in multiple
different recipes. It's better (faster, less repetitive error reports)
to check them only once.

In addition, the real information for the developer is where he can
find the script, not which recipe file uses it. verify-bashisms now
prints the original file instead of the recipe whenever possible
(i.e. 'filename' is set) and also bumps the line number so that it is
relative to the file and not the script.

Example with one real error and one added just for testing:

  $ verify-bashisms core-image-minimal core-image-sato
  Loading cache: 100% |#################################################################################| Time: 0:00:00
  Loaded 2935 entries from dependency cache.
  Parsing recipes: 100% |###############################################################################| Time: 0:00:01
  Parsing of 2137 .bb files complete (2101 cached, 36 parsed). 2935 targets, 412 skipped, 0 masked, 0 errors.
  Generating scripts...
  Scanning scripts...

  /.../openembedded-core/meta/classes/populate_sdk_ext.bbclass
   possible bashism in install_tools line 515 (should be 'b = a'):
  	if [ "${SDK_INCLUDE_TOOLCHAIN}" == "1" -a ! -e $unfsd_path ] ; then
   possible bashism in install_tools line 521 (type):
            type fixme

(From OE-Core rev: ca4932b60f464430266cc43e34122b2973e8a200)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:41 +00:00
Patrick Ohly 3108bff175 verify-bashisms: revise update-rc.d whitelist entry
The actual code recently changed to:
   if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then

(From OE-Core rev: 32ae3e686db067a2a63932782970db79eb1703e8)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:41 +00:00
Patrick Ohly 010f9fa86a verify-bashisms: fix problems with tinfoil2
tinfoil2 is based on a client/server architecture, which broke the
verify-bashisms script:

- The tinfoil instance and its data proxies can't be pickled, so
  all interaction with the bitbake server has to run in the main
  script process and only processing of the plain scripts can
  be done with multiprocessing:

  _pickle.PicklingError: Can't pickle <class 'bb.tinfoil.TinfoilCookerAdapter.TinfoilRecipeCacheAdapter'>: attribute lookup TinfoilRecipeCacheAdapter on bb.tinfoil failed

- The multiprocessing pool has to be created before initializing
  tinfoil, otherwise the pool workers end up trying to communicate
  with the bitbake server during shutdown:

  ERROR: UI received SIGTERM
  Process ForkPoolWorker-2:
  Traceback (most recent call last):
    File "/usr/lib/python3.4/multiprocessing/process.py", line 257, in _bootstrap
      util._exit_function()
    File "/usr/lib/python3.4/multiprocessing/util.py", line 286, in _exit_function
      _run_finalizers(0)
    ...
    File "/usr/lib/python3.4/multiprocessing/process.py", line 131, in is_alive
      assert self._parent_pid == os.getpid(), 'can only test a child process'
   AssertionError: can only test a child process

- func() needs to defined before creating the pool to avoid:

  AttributeError: Can't get attribute 'func' on <module '__main__' from '/work/openembedded-core/scripts/verify-bashisms'>

(From OE-Core rev: aa439f11c7f414774843720d68ebe0a6d3375ea6)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:41 +00:00
Patrick Ohly 48c65ddaa4 verify-bashisms: explicitly shut down server
Current tinfoil2 requires manually shutting down the server.
Without that, the script hangs during exit. This might change
in the future.

(From OE-Core rev: 62f42ce063115f4a02c219e323252223818a150f)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:41 +00:00
Patrick Ohly 83469f229d verify-bashisms: point out where to get checkbashisms.pl
The current SourceForge project seems to be unmaintained (last release
2.0.0.2 from 2015) while the copy used by Debian is quite active (last
commit 2016-09-30).

Ideally, checkbashisms.pl should get installed automatically via a
recipe, but for now at least provide the link for manual installation.

(From OE-Core rev: 65e74348b4ed40b24671776410d2a579dcc7abab)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:40 +00:00
Patrick Ohly 15a97dea65 verify-bashisms: fix typo
Variable was renamed, it's now called "output".

(From OE-Core rev: c3d125b4132e5a706f6265a5bcaedafbe8e5355f)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 15:28:40 +00:00
Juro Bystricky 8b448ab012 runqemu: allow bypassing of network setup
At present it is silently assumed all QEMU machines support networking.
As a consequence, one cannot run QEMUs without network emulation
using "runqemu".
This patch allows bypassing any network setup providing the qemuboot.conf
file contains:

    qb_net = none

[YOCTO#10661]

(From OE-Core rev: 6a9454027ced4efbb401a23df94f711b8253c8fa)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:02 +00:00
Andrea Galbusera 6476182c33 oe-publish-sdk: add pyshtables.py to .gitignore
pyshtables.py should be ignored by git as it is generated. If kept in
the repo, causes subsequent runs of sdk-update to fail.

[ YOCTO #10963 ]

(From OE-Core rev: 0ac1387bd12b5d023dea06ffe65d1fdcb050bcb4)

Signed-off-by: Andrea Galbusera <gizero@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:00 +00:00
Ed Bartosh d5b2539213 isoimage-isohybrid: renamed variable hdd_dir
Renamed variable hdd_dir to deploy_dir as this variable is
assigned to the value of DEPLOY_DIR_IMAGE.

(From OE-Core rev: fc84893c319f3e8c72f13c58f25e0b54095c3a49)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 6740b8fdbb isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCH
isoimage-sihybrid plugin uses MACHINE_ARCH to get the name of initrd image.
It doesn't work for all machines, for example for quemux86-64 machine
MACHINE_ARCH is quemux86_64 and initrd name is
core-image-minimal-initramfs-qemux86-64.cpio.gz

Used TRANSLATED_TARGET_ARCH variable to get the initrd image name.
Replaced MACHINE_ARCH->TRANSLATED_TARGET_ARCH in WICVARS variable to
make it available from <image>.env file.

(From OE-Core rev: edf0830412de66eada9ef3f3947ca42e301c5377)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Tom Zanussi 66d08e0fda wic: Look for image artifacts in a common location
Rather than have each image type look for artifacts in image-specific
locations, move towards having them look for artifacts in a common
location, in this case DEPLOY_DIR_IMAGE

Use the existing deploy.bbclass to have the bootloaders put their binaries
in DEPLOY_DIR_IMAGE and then wic will find them and place them in the image

(From OE-Core rev: 1c8acea91e775b1b6f8b25e774aaba3e790fc59b)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 8a04795db6 wic: isoimage-isohybrid: stop using HDDDIR
Stop using HDDDIR in isoimage-isohybrid wic plugin.
This variable is set by hddimg code, which is going to be
removed soon.

All required artifacts should be available from ISODIR.
wic-image.bbclass has been modified to build iso artifacts,
so it should be safe to remove usage of HDDDIR.

[YOCTO #10835]

(From OE-Core rev: 4ceb0df10db7254b290784cabc5279ffa2b946a4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh a508cb384c wic: use INITRD_LIVE in isoimage-isohybrid
INITRD variable is not set if hddimg is disabled.
isoimage-isohybrid can't get correct name for initrd if INITRD
variable is not set.

Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid
code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set.

(From OE-Core rev: c672753be60550b15d5d593c251b61776d5b104d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Jukka Laitinen cebf67086f wic: partitionedfs: set partition name for gpt partitions
Set proper gpt partition name for the partitions in case given
in the configuration

(From OE-Core rev: bc6e6a34f35bd081d828160bab8ee12e770c7e1e)

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh 3407f25216 wic: direct.py: get rid of names with two underscores
Attributes with two leading underscores are mangled in Python
and used mainly for avoiding name clashes with names from
subclasses. They're not needed in most of wic classes.

(From OE-Core rev: 2f92c0490f1acf5a6926fc6654ce3b6588ddcc24)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:32 +00:00
Ed Bartosh d59196c3a8 wic: remove unused API DirectImageCreator.get_disk_names
(From OE-Core rev: f77efbe81a5d3d16ecb1872cf237bb3e56c63c39)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:31 +00:00
Ed Bartosh e9bd1ed673 wic: make workdir a temporary directory
Wic used hardcoded path /var/tmp/wic/ as a work directory,
which caused conflicts if two wic instances run in parallel.

Made work directory unique and temporary. Moved results from
work directory to output directory when they're ready.

[YOCTO #10783]

(From OE-Core rev: 5d948f04823dedfa26a879aa6a5dc23de2bb9354)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:31 +00:00
Ed Bartosh 75318c7b0c wic: get rid of baseimager inheritance
Simplified DirectImageCreator code by removing inheritance
from BaseImageCreator. This inheritance doesn't make much sense
as DirectImageCreator is the only class that was inherited from
BaseImageCreator.

(From OE-Core rev: 4e9952514211ef4b9a3731ce915090385f335a31)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:31 +00:00
Ed Bartosh 88dce2cf41 wic: change default output directory
Set default output directory to current dir.

[YOCTO #10783]

(From OE-Core rev: ad116c4d02ccf36e22fbf3e45e45bc508849a833)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:38:31 +00:00
Markus Lehtonen 48f79758ea scripts/buildstats-diff: simplify timestamp handling
Simply use floats instead of datetime and timedelta objects for handling
timestamps.

(From OE-Core rev: d97c844f388bd4c52248fe597d5985ef20d5a96d)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-28 23:32:16 +00:00
Patrick Ohly 95cdd91a80 runqemu: more verbose error message about missing qemuboot.conf
When invoking "runqemu" with a mistyped image or architecture name,
the resulting error message is about the missing qemuboot.conf,
without any indication about the root cause:

 $ runqemu core-image-mimimal ext4 intel-corei7-64
 runqemu - INFO - Assuming MACHINE = intel-corei7-64
 runqemu - INFO - Running MACHINE=intel-corei7-64 bitbake -e...
 runqemu - INFO - MACHINE: intel-corei7-64
 runqemu - INFO - DEPLOY_DIR_IMAGE: /fast/build/refkit/intel-corei7-64/tmp-glibc/deploy/images/intel-corei7-64
 Traceback (most recent call last):
   File "/work/openembedded-core/scripts/runqemu", line 1095, in <module>
     ret = main()
   File "/work/openembedded-core/scripts/runqemu", line 1082, in main
     config.read_qemuboot()
   File "/work/openembedded-core/scripts/runqemu", line 643, in read_qemuboot
     raise Exception("Failed to find <image>.qemuboot.conf!")
 Exception: Failed to find <image>.qemuboot.conf!

Including the name of the actual file the scripts expects to find plus
adding some hints what to check for might help. The error now is:

 $ runqemu core-image-mimimal ext4 intel-corei7-64
 ...
 Exception: Failed to find <image>.qemuboot.conf = .../tmp-glibc/deploy/images/intel-corei7-64/core-image-mimimal-intel-corei7-64.qemuboot.conf (wrong image name or BSP does not support running under qemu?).

The comment about the BSP is included because that would be the real
reason why the file might be missing.

(From OE-Core rev: 946c4558f6c2726d0f12e48974568188a4ffef0d)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26 10:44:27 +00:00
Ross Burton 53d29591b3 wipe-sysroot: remove
This script was useful to delete the sysroot so that future builds happen from a
clean sysroot.  Now that recipes have their own sysroot this script doesn't need
to exist anymore, and if in fact if used will break your TMPDIR.

(From OE-Core rev: e8bc8dc1b2a54a00792c61e134f48a6c06ad861e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26 10:44:27 +00:00
Benjamin Esquivel 44ac2995b8 selftest: automatically add the meta-selftest layer
adding the meta-selftest layer is a small bump you always encounter
when you want to run selftest. Adding an automatic procedure to include
the layer if it is not yet present.

(From OE-Core rev: b5000dd7b1d74d5dfede869ffa75ed87f5a8553c)

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Paul Eggleton dd83bdb2f7 create-pull-request: fix for OE cgit URL change
The /cgit.cgi/ part is no longer valid in cgit URLs on
git.openembedded.org as of recent infrastructure changes.

(From OE-Core rev: a17ac420290c7e0debddec78b9540ae8726720dc)

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>
2017-01-23 12:05:22 +00:00
Paul Eggleton 61f206195d devtool: check locale and refuse to start if it isn't UTF-8
We need to ensure the locale is UTF-8 or otherwise strange errors will
occur later on during execution - the same reason we check this in
BitBake itself. Unfortunately this check has to be before command line
parsing and therefore showing the help text in response to --help, since
that relies upon parsing bitbake's configuration (as we need to load
plugins in other layers).

Fixes [YOCTO #10908].

(From OE-Core rev: 370c6ba16c72bb52e80da098a5812ed1e09ac659)

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>
2017-01-23 12:05:22 +00:00
Robert Yang 9dd223bf18 runqemu: fixes for slirp, network device and hostfwd
Fixed:
- Add QB_NETWORK_DEVICE to set network device, it will be used by both
  slirp and tap.
- Set QB_NETWORK_DEVICE to "-device virtio-net-pci" in qemuboot.bbclass
  but runqemu will default to "-device e1000" when QB_NETWORK_DEVICE is
  not set, this is because oe-core's qemu targets support
  virtio-net-pci, but the one outside of oe-core may not,
  "-device e1000" is more common.
- Set hostfwd by default: 2222 -> 22, 2323 -> 23, and it will choose a
  usable port when the one like 222 is being used. This can avoid
  conflicts when multilib slirp qemus are running. We can forward more
  ports by default if needed, and bsp.conf can custom it.
- Use different mac sections for slirp and tap to fix conflicts when
  running both of them on the same host.

[YOCTO #7887]

CC: Nathan Rossi <nathan@nathanrossi.com>
CC: Randy Witt <randy.e.witt@linux.intel.com>
(From OE-Core rev: 7dddd090806914a62d977730440d803e48f44763)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Robert Yang 5ea3627dbb runqemu: support multiple qemus running when nfs
Fixed:
* In build1:
  $ runqemu nfs qemux86-64
  In build2:
  $ runqemu nfs qemux86-64

  It would fail before since the port numerbs and conf files are
  conflicted, now make runqemu-export-rootfs work together with runqemu to
  fix the problem.

* And we don't need export PSEUDO_LOCALSTATEDIR in runqemu, the
  runqemu-export-rootfs can handle it well based on NFS_EXPORT_DIR.

* Remove "async" option from unfsd to fix warning in syslog:
  Warning: unknown exports option `async' ignored

* Fixed typos

Both slirp and tap can work.

(From OE-Core rev: 84b2281595bbdb497daa42640e3ee4658bf0bed8)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 8e01802c9f oe-build-perf-test: remove unused imports and fix indent
[YOCTO #10590]

(From OE-Core rev: 0b1892fa9165407a156609ff7cb3708e21bacd8c)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 0981bcb098 oe-build-perf-test: save test metadata in a separate file
The patch introduces a new metadata (.json or .xml) file in the output
directory. All test meta data, e.g. git revision information and tester
host information is now stored there. The JSON report format is slightly
changed as the metadata is not present in results.json anymore.

[YOCTO #10590]

(From OE-Core rev: 2036c646019660e32f1bc277fdec0cdbff0afdd4)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:22 +00:00
Markus Lehtonen 07c245792e oe-build-perf-test: enable xml reporting
Add --xml command line option to oe-build-perf-test script for producing
a test report in JUnit XML format instead of JSON.

[YOCTO #10590]

(From OE-Core rev: 21ae1c491b93675254b7733640662b566ed76f98)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:21 +00:00
Mariano Lopez 46ce0b5ef3 testexport.bbclass: Migrate testexport to use new framework
This migrates current testexport implmentation to use the
new OEQA framework.

[YOCTO #10686]

(From OE-Core rev: 92cb884c989460563a063b29d2be8b7acd20577e)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:21 +00:00
Aníbal Limón 90f4325dd5 scripts/oe-test: Add new oe-test script
The new oe-test script will be use to run test components with
one single script.

The oe-test script search for test components inside meta/lib/oeqa,
the test components needs to implement OETestContextExecutor inside
context module in order to be supported by oe-test.

[YOCTO #10230]

(From OE-Core rev: 04b69cff3957731fa1ed2f7d23f2f616978ed0b7)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 7998501f47 wic: bootimg-pcbios: use wic-tools target
Used wic-tools target to get location of syslinux.

(From OE-Core rev: 5afd7def3b101bb3d650db4d005cb8d36aaf074a)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh e0193182c5 wic: rebuild wic-tools if its sysroot doesn't exist
Rebuild wic-tools if its native sysroot doesn't exist to ensure
that all required tools are available.

(From OE-Core rev: 0d005d099a2b8ee1303b98710cdc78e06e14ab39)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 7d5f44b455 wic: misc.py: add parameter 'cache' to get_bitbake_vars
This parameter will be used to allow or prevent variable caching.

For example, we don't want to cache value of RECIPE_SYSROOT_NATIVE
wic-tools variable as we may decide to rebuild wic-tools.

(From OE-Core rev: e4269fdb4c3ef06b97df063f8586f74986215c83)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 657f1e44b1 wic: fixed test_iso_image test case
Fixed isoimage-isohybrid plulgin and correspondent wic tet case:
- used wic-tools target when getting varlue of STAGING_LIBDIR variable
- ensured that image is built with efi and hddimg enabled

(From OE-Core rev: 5878484da64c38c7fde45bb06d76e22e608eb022)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 349dbad11d wic: fixed recipe name
Renamed grub-efi-native -> grub-efi in NATIVE_RECIPES
dictionary as '-native' suffix is added to the recipe name in
the code.

(From OE-Core rev: cd0e7b20de2de67793d0454f4e5cf6bb6f4a16f7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:18 +00:00
Ed Bartosh 4ab4e155f8 partition.py: use FAKEROOTCMD variable to get path to pseudo
wic used native sysroot to get path to pseudo utility.
This approach doesn't work with recipe specific sysroots.

Using FAKEROOTCMD should fix the issue.

(From OE-Core rev: 03e051d594f285ea3c014d45e9b30028e683c602)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
Ed Bartosh 168f62e427 wic: fix getting path of native sysroot
wic used STAGING_DIR_NATIVE variable as a path to native sysroot.
This doesn't work with recipe specific sysroots as STAGING_DIR_NATIVE
points to the native sysroot of the current recipe.

Used RECIPE_SYSROOT_NATIVE variable of wic-tools recipe
to fix the issue.

(From OE-Core rev: de9d7d14cd03e4dfc5812890a53c79b706b56537)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
Richard Purdie 41fb482ee1 oe-selftest: Error if the user has buildhistory enabled
buildhistory interfers with various tests so error if the user has it enabled,
hence avoiding time spent running the tests only for them to fail.

For example, if there is an sstate cache and something comes from that cache,
you can get a "version went backwards" warning from buildhistory which would
then change the outcome of a test. Its safer/easier to disable it.

(From OE-Core rev: 941ec7c50c30052e346e72fef2920135dba89a21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-20 11:53:49 +00:00
Paul Eggleton 9b3e808624 devtool: fix source extraction to work with recipe specific sysroots
When extracting source for a recipe within devtool (for extract, modify
or upgrade) We need to redirect WORKDIR, STAMPS_DIR etc. under a
temporary directory so that:
 (a) we pick up all files that get unpacked to the WORKDIR, and
 (b) we don't disturb the existing build
However, with recipe-specific sysroots the sysroots for the recipe will
be prepared under WORKDIR, and if we used the system temporary directory
i.e. usually /tmp) as used by mkdtemp by default, then our attempts to
hardlink files into the recipe-specific sysroots will fail on systems
where /tmp is a different filesystem, and we'd have to fall back to
copying the files which is a waste of time. Put the temp directory under
the WORKDIR to prevent that from being a problem.

(From OE-Core rev: e10a973cd9390eacb13bdb99693a0622bd3695f5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
[RP: Add needed mkdirhier call]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-20 11:53:49 +00:00
Markus Lehtonen 56a7f41711 oeqa.utils.metadata: allow storing any bitbake config variables
Make it possible to store any bitbake config variables in the metadata.
Config values will be stored under a new config element in the xml report:
    <config>
        <variable name="MACHINE">qemux86</variable>
    </config>

The value of MACHINE is moved there instead of having a dedicated
<machine> element.

[YOCTO #10590]

(From OE-Core rev: 6e7e6e37664b0a86111272f5f6f4a4e1d0f23302)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:22 +00:00
Markus Lehtonen ceed2c7eb5 oeqa.utils.metadata: rename 'revision' to 'commit'
Revision is a bit vague and could point to a tag, for example. Git
commit objects are unambiguous and persistent so be explicit that the
element should contain git commit hash.

[YOCTO #10590]

(From OE-Core rev: a6521b89e86ddba6bd646dd3974d7b0390323b56)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:22 +00:00
Markus Lehtonen 4e67232f34 oeqa.utils.metadata: drop 'unknown' git data elements
It's better just to not have the xml elements than to have elements with
faux data. One could have git branch named 'unknown', for example.

[YOCTO #10590]

(From OE-Core rev: fce531c21f5e56d0f416b3405a0b0fc5ba567679)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:22 +00:00
Markus Lehtonen df8c0540e4 oeqa.utils.metadata: re-organise distro information
Use the same format, based on /etc/os-release, as for host distro
information.

[YOCTO #10590]

(From OE-Core rev: 0156ef46ccf5334ee72f0202f1089249c62af37b)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:22 +00:00
Robert Yang dcaeaf2df1 runqemu-export-rootfs: fix inconsistent var names
Fixed:
$ runqemu nfs qemux86-64
[snip]
On your target please remember to add the following options for NFS
nfsroot=IP_ADDRESS:/path/to/nfsroot,nfsvers=3,port=,mountprog=,nfsprog=,udp,mountport=
[snip]

Note that the values are null, this is because their var names are
inconsistent.

[YOCTO #10519]

(From OE-Core rev: 10c136a382006c0ec2679a70f47ff2446c10372c)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:20 +00:00
Robert Yang 65a8d4d185 scripts/runqemu: fix checking for <file>.cpio.gz
When "runqemu /path/to/<file>.cpio.gz", it used the last suffix "gz" as
the fstype which was wrong. Check filename against self.fstypes firstly
can fix the problem.

(From OE-Core rev: 68c7589b67a83977331a04356b53aa51680a1d9d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:20 +00:00
Maciej Borzecki cb10cfd64f wic: partitionedfs: account for non-table partitions when checking if logical parititon is needed
Commit 8c1c43b790 `wic: Create a logical partition
only when it is really mandatory` did not account for partitions that are not
present in partition table.

(From OE-Core rev: 57b05e924bba7b2fff07a34690474c0fa3046865)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19 22:47:20 +00:00
Tom Zanussi 1cae998af9 scripts: python3 fixes and new tool ksum
'ksum.py' generates a combined summary of vmlinux and module sizes for
a built kernel, as a quick tool for comparing the overall effects of
systemic tinification changes.  Execute from the base directory of the
kernel build you want to summarize.  Setting the 'verbose' flag will
display the sizes for each file included in the summary.

(From OE-Core rev: 016b19c2589582d7ec3c8cac9cfa75a1edc716fe)

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16 18:05:14 +00:00
Chen Qi 6bb64c8fa4 scripts/oe-selftest: fix typo
Change 'agains' to 'against'.

(From OE-Core rev: b72dba9cadb1ae0ee3feb184af1c5bb4a99f70e3)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16 18:05:14 +00:00
Alistair Francis 7f013f2a54 runqemu: Allow the user to specity no kernel or rootFS
In some cirsumstances the user doesn't want to supply a kernel, rootFS
or DTB to QEMU. This will occur more now that QEMU supports loading
images using a '-device loader' method.

Allow users to specify 'none' for QB_DEFAULT_FSTYPE or QB_DEFAULT_KERNEL
to avoid supplying these options to QEMU.

(From OE-Core rev: 2cc01c4e46b05b7ffcc8a11e7ebde6c43256c3c3)

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16 18:05:13 +00:00
Ed Bartosh fae29ac083 wic: _exec_cmd: produce error if exit code is not 0
Current code doesn't always show error output of the
external command and even ignores non-zero exit code.

Moved checking of exit code value to the lowest level
possible: to _exec_cmd. This should make wic to always
check exit code of the external command and issue
an error if it's not 0.

[YOCTO #10816]

(From OE-Core rev: 7f68001579c08509332d633b27b5c2ea9386b6c9)

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>
2017-01-16 18:05:13 +00:00
Ed Bartosh c1bb8c9b14 direct.py: fix getting image name
part.rootfs_dir was used as an image name in the code.
However, when multi-rootfs feature is used this attribute
points to the name of the rootfs, e.g. if --rootfs command line
is rootfs1=core-image-minimal partf.rootfs_dir is 'rootfs1'.

The code also fails when image name is not provided in wic
commandline. For example, when wic is called with
--rootfs-dir=<path> part.rootfs_dir will contain path and
wic will crash trying to call bitbake -e <path> to get
value of ROOTFS_SIZE variable.

Fixed the code by getting image name properly and checking
if it's not a path.

[YOCTO #10815]

(From OE-Core rev: 2e05d9709f1308fc95d3406b8a409ea982c5b474)

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>
2017-01-16 18:05:13 +00:00
Ed Bartosh e652fa4420 canned-wks: remove mpc8315e-rdb.wks
This file has been moved to meta-yocto-bsp/wic/

(From OE-Core rev: efa7639b31c51e2874ba61fd68f9e2cb51145eaf)

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>
2017-01-16 18:05:13 +00:00
Ioan-Adrian Ratiu 436df4de37 wic/isoimage-isohybrid: remove do_stage_partition()
The purpouse of this function was to check dependencies for building a
hybrid iso and build them using bitbake if not found. Calling bitbake in
this context means this wic plugin itself cannot be instrumented inside
bitbake recipes which is undesirable, the benefits of this are clear:
there is no need to maintain outside scripts to generate an iso using wic
and the isohybrid building logic can be further abstracted away into an
isohybrid.bbclass in the future which can be easily inherited or something
similar.

So remove the function and add all dependencies to NATIVE_RECIPES so that
wic can print useful errors when they're not built.

To automate building the isohybrid image dependencies, add the following
somewhere in your image build inheritence hierarcy (or maybe create a
bbclass in the future to do these sort of things automatically):

DEPENDS += "syslinux syslinux-native cdrtools-native e2fsprogs-native \
            parted-native dosfstools-native mtools-native grub-efi-native"

(From OE-Core rev: ba4346069ab87f1cf942d1928f911eca6a9d65cd)

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16 18:05:12 +00:00
Derek Straka 413e11ba98 python-3.5-manifest: Add http module to the netclient package
Adding http module from Python's standard library. This allow use
of the http module without installing all python-misc modules.

(From OE-Core rev: 3d0060f9703ba39fbdaafcbdf91e0c319b56f7b3)

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16 18:05:12 +00:00
Ed Bartosh 5651e8da60 wic: fix parsing of 'bitbake -e' output
Current parsing code can wrongly interpret arbitrary lines
that are of 'key=value' format as legitimate bitbake variables.

Implemented more strict parsing of key=value pairs using
regular expressions.

(From OE-Core rev: f0ec387ad40fb9c098ac8d761993bc2bacc76e65)

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>
2017-01-16 18:05:12 +00:00
Alejandro Hernandez a250452f56 gummiboot: Remove old gummiboot recipe, related class and wks file
Since the gummiboot project is no longer being maintained
and we are using systemd-boot as a replacement instead,
we can now clean up all remaining gummiboot files.

[YOCTO #10332]

(From OE-Core rev: 65eb3f51b70baaf24de871301a7247d5baed00ed)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-16 18:05:11 +00:00
Paul Eggleton 0f315faff8 oe-selftest: fix behaviour if oe-selftest.log is a dangling symlink
If you delete the log file that the oe-selftest.log symlink points to
but not the symlink itself, because we were using os.path.exists() here
the code assumed that the symlink didn't exist when in fact it still
did. Use os.path.lexists() instead.

(From OE-Core rev: 263af91a0efd21e041ecdb0c40f9b2d4e735f67d)

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>
2017-01-09 13:39:11 +00:00
Alejandro Hernandez 2dce2648e3 gummiboot: Remove/change gummiboot references with systemd-boot
After systemd-boot was introduced, its been tested for a while with no major
issues being found until now, this patch completely replaces all gummiboot
instances with systemd-boot ones, taking the next step into cleaning
up systemd-boot/gummiboot.

[YOCTO #10332]

(From OE-Core rev: f9a61d3400ad9068a6d83b8eb6aefe3098c58e68)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09 13:39:11 +00:00
Richard Purdie 022a8b58c8 meta/scripts: Various getVar/getVarFlag expansion parameter fixes
There were a few straggling expansion parameter removals left for
getVar/getVarFlag where the odd whitespace meant they were missed
on previous passes. There were also some plain broken ussages such
as:

d.getVar('ALTERNATIVE_TARGET', old_name, True)
path = d.getVar('PATH', d, True)
d.getVar('IMAGE_ROOTFS', 'True')

which I've corrected (they happend to work by luck).

(From OE-Core rev: 688f7a64917a5ce5cbe12f8e5da4d47e265d240f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-09 13:39:11 +00:00
Richard Purdie f2b847a290 oe-selftest: Improve BUILDDIR environment handling
Its possible something (like bitbake/tinfoil2) may mess around with the
environment and using the enviroment as a global variable store isn't
particularly nice anyway.

This patch changes the BUILDDIR usages so that the environment isn't used
as a global store and a global variable is used instead. Whilst that
is still not perfect, it does avoid the current double and triple backtraces
we're seeing where tinfoil2/bitbake has trampled the enviroment leading
to failures of failures making debugging even harder.

(From OE-Core rev: 689b676bbf2f1a5fadb04aeb41d5e68e35356545)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-05 13:54:06 +00:00
Patrick Ohly b359e926e2 runqemu: let command line parameters override defaults
It may be necessary to override the parameters gathered for the qemu
invocation. For example, the qemux86 machine configuration sets "-vga
vmware", but when using OVMF as BIOS, only "-vga std" is supported.

By putting the parameters derived from custom runqemu parameters like
"qemuparams" after the parameters derived from the machine
configuration the user gets the possibility to override those.

(From OE-Core rev: b6feb7578d60289c8b6e376cfaac8a3ee45e72f9)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-05 13:54:06 +00:00
Alejandro Hernandez 9d4a69fd0d example-recipe: Fix LDFLAGS compilation issue on newly created recipes
(From meta-yocto rev: aa3e99e24c3234b6f3f19169939d4cd498d0ce36)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-22 08:53:03 +00:00
Ed Bartosh b05b1add7a wic: add kickstart file for MPC8315
Added kickstart file to produce partitioned image for
MPC8315 reference hardware.

[YOCTO #8719]

(From OE-Core rev: 8c873b4fd92b72adfc49d20bbfab4779857fb6c9)

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>
2016-12-22 08:50:17 +00:00
Maciej Borzecki 1988bae5bf wic: add --fixed-size wks option
Added new option --fixed-size to wks. The option can be used to indicate
the exact size of a partition. The option cannot be added together with
--size, in which case an error will be raised. Other options that
influence automatic partition size (--extra-space, --overhead-factor),
if specifiec along with --fixed-size, will raise an error.

If it partition data is larger than the amount of space specified with
--fixed-size option wic will raise an error.

(From OE-Core rev: fdd217ba874bd480e0180830fe2e6bd54dde19d9)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-22 08:50:16 +00:00
Paul Eggleton 358befb76e devtool: modify: fix usage on the kernel
When using devtool modify on the kernel, we have to do a bit of a dance
with tinfoil instances because we only find out that we're working on a
kernel recipe after tinfoil is initialised, but then we need to build
kern-tools-native which we're doing just by running bitbake directly.
With the tinfoil2 changes, a datastore for the recipe that we were
keeping around across the opening and closing of tinfoil is no longer
able to be used. Re-parse the recipe to avoid this problem.

(In future this whole thing will be able to be done in the same tinfoil
instance thanks to tinfoil2, but that refactoring is yet to be done.)

(From OE-Core rev: 06127d0115ba449bf04e2579cd1010065e0ed6e3)

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>
2016-12-22 08:50:16 +00:00
Ed Bartosh 28c79d8aeb wic: look for wks files in <layer>/wic
Currently wic looks for wks files in
<layer dir>/scripts/lib/wic/canned-wks/ directories.
This path is too nested and doesn't look consistent with the
naming scheme of layer directories.

Added <layer>/wic directory to the list of paths
to look for wks files.

(From OE-Core rev: 803b5fa798cf7580c7c10401eb04a1cccf51b8ab)

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>
2016-12-22 08:50:16 +00:00
Ed Bartosh 2f4008d694 oe-selftest: import git module only when needed
git module is not included into standard Python
library and therefore causes import errors on the systems
where PythonGit is not installed.

As git module only used in the code implementing --repository
functionality it's better to import git only in the scope
that requires it.

[YOCTO #10821]

(From OE-Core rev: 66be32c1a075201d6ee0e9b9e10b84e6a2ace745)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-20 15:22:17 +00:00
Christopher Larson db08ffee0a wic: obey the rootfs size from the metadata
When no --size is specified for the rootfs in the .wks, we want to obey the
rootfs size from the metadata, otherwise the defined IMAGE_ROOTFS_EXTRA_SPACE
and IMAGE_OVERHEAD_FACTOR will not be obeyed. In some cases, this can result
in image construction failure, if the size determined by du was insufficient
to hold the files without the aforementioned extra space.

This fallback from --size to ROOTFS_SIZE was already implemented when
--rootfs-dir is specified in the .wks, but it did not occur otherwise, neither
when --rootfs-dir= was passed to `wic create` nor when IMAGE_ROOTFS was used.
This made a certain amount of sense, as this fallback logic happened at such
a level that it wasn't able to identify which partitions were rootfs
partitions otherwise. Rather than doing it at that level, we can do it in
prepare_rootfs(), which is run by the rootfs source plugins.

Note that IMAGE_OVERHEAD_FACTOR and a --overhead-factor in the .wks will now
both be applied when --size isn't specified in the .wks. A warning is added
about this, though a user won't see it unless wic fails or they examine the
do_image_wic log.

Fixes [YOCTO #10815]

(From OE-Core rev: 1d50e11286722c4114c1ae0bc285f846cd85fc4c)

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>
2016-12-17 09:57:04 +00:00
Joshua Lock 6bba41832b scripts: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the
True option from getVarFlag() calls with a regex search and
replace.

Search made with the following regex:
getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\)

(From OE-Core rev: 3e4806063fe11092b2307f113a6c0b0f04104091)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Joshua Lock c0f2890c01 scripts: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 0a36bd96e6b29fd99a296efc358ca3e9fb5af735)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Mariano Lopez 3f6e6f4e69 scripts/runqemu: Allow to use qemu from host.
This will add support to use qemu from the running host,
with this is possible to put qemu-native in ASSUME_PROVIDED
variable.

By default it will try to get qemu from the build sysroot,
and only if it fails will try to use the host's qemu.

(From OE-Core rev: fe7fd2cd3a9c4fb5b31bd3cab81c96a3b81cb540)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Paul Eggleton 229091babb devtool: prevent BBHandledException from showing traceback
If we don't catch this then attempting to run devtool in non-memres mode
when bitbake is already running will produce a traceback instead of just
an error message.

(From OE-Core rev: e01b75dff599ffa2b66e6608b28bbb3564365eee)

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>
2016-12-14 12:30:50 +00:00
Paul Eggleton 4448b2a122 devtool: extract: disable basehash mismatch errors
Using the setVariable commands here followed by buildFile will result in
"basehash mismatch" errors, and that's expected since we are deviating
*at runtime* from what was previously seen by changing these variable
values. Set BB_HASH_IGNORE_MISMATCH to turn off the errors.

(From OE-Core rev: b0169796f294bbec0397b7eae86454a46b68cdc5)

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>
2016-12-14 12:30:50 +00:00
Paul Eggleton 85de43fccd devtool: fix extraction of source to work in memres mode
Extracting the source for a recipe (as used by devtool's extract, modify
and upgrade subcommands) requires us to run do_fetch, do_unpack,
do_patch and any tasks that the recipe has inserted inbetween, and do so
with a modified datastore primarily so that we can redirect WORKDIR and
STAMPS_DIR in order to have the files written out to a place of our
choosing and avoid stamping the tasks as having executed in a real build
context respectively. However, this all gets much more difficult when in
memres mode since we can't call internal functions such as
bb.build.exec_func() directly - instead we need to execute the tasks on
the server. To do this we use the buildFile command which already exists
for the purpose of supporting bitbake -b, and setVariable commands to
set up the appropriate datastore.

(I did look at passing the modified datastore to the buildFile command
instead of using setVar() on the main datastore, however its use of
databuilder makes that very difficult, and we'd also need a different
method of getting the changes in the datastore over to the worker as
well.)

(From OE-Core rev: eb63b5339014fc72ba4829714e0a96a98e135ee2)

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>
2016-12-14 12:30:50 +00:00
Paul Eggleton 86b55e6026 recipetool: add OE lib path
The autotools code imports oe.package; we weren't experiencing a problem
with this probably due to OE itself adding that path previously.

(From OE-Core rev: a61d7bf8447b2d2c65eb34315c86086ff35c8bc9)

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>
2016-12-14 12:30:50 +00:00
Paul Eggleton 45adbe3709 classes/patch: move in logic to commit for additional tasks
If PATCHTOOL is "git", and PATCH_COMMIT_FUNCTIONS is set to "1", for
additional tasks between do_unpack and do_patch, make a git commit. This
logic was previously implemented in devtool itself, but it makes more
sense for it to be implemented in the patch class since that's where the
rest of the logic is for this (or in lib/oe/patch.py). It also makes
it possible for this to work with tinfoil2.

(From OE-Core rev: f24f59ea1d8bc335ea8576f6a346d0935f4a3548)

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>
2016-12-14 12:30:49 +00:00
Paul Eggleton 70ce595237 devtool / recipetool: use tinfoil parsing API
Use Tinfoil.parse_recipe_file() and Tinfoil.parse_recipe() instead of
the recipeutils equivalents, and replace any local duplicate
implementations. This not only tidies up the code but also allows these
calls to work in memres mode.

(From OE-Core rev: f13b56266ee96dfab65a3a7db50e8051aa9f071a)

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>
2016-12-14 12:30:49 +00:00
Paul Eggleton 1e29b57e92 devtool: package: don't try to initialise tinfoil twice
setup_tinfoil() already calls prepare(), we don't need to call it again
ourselves and doing so with tinfoil2 results in "ERROR: Only one copy of
bitbake should be run against a build directory". Calling prepare()
twice should probably still be allowed, so that ought to be fixed
separately, but in the mean time this code is still wrong so fix it
here.

(From OE-Core rev: 38b8a7d4aff096ea0a62f2ddf3fe2de1df591bf5)

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>
2016-12-14 12:30:49 +00:00
Ola x Nilsson d65886bb69 oe-pkgdata-util: Make read-value handle override variables
Some variables in pkgdata files have a package-name override.  When
the bare variable can not be found, try with the override-variant.

PKGSIZE is one such variable, and already had special code to handle this.

Test included.

(From OE-Core rev: 6df99cda894033cba68bc6ab91e47f67e0d788a5)

Signed-off-by: Ola x Nilsson <ola.x.nilsson@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-14 12:30:49 +00:00
Ed Bartosh a5438f8f74 oe-buildenv-internal: show usage output
Show usage text if script is not sourced.
Tested in bash, zsh and dash.

[YOCTO #10751]

(From OE-Core rev: ac7a905b18acb8bd9b2412b6682afbe1d7e18d7b)

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>
2016-12-13 22:55:21 +00:00
Ed Bartosh 556bdb6642 oe-find-native-sysroot: create usage output
Created usage output for oe-find-native-sysroot script.

[YOCTO #10751]

(From OE-Core rev: 8ddfc48c7f3e2ca45c035cec492fdc31c6ad484f)

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>
2016-12-13 22:55:21 +00:00
Ed Bartosh 0ebe2e64ba oe-git-proxy: create usage output
Created usage output for oe-git-proxy script.

[YOCTO #10751]

(From OE-Core rev: ec0fdb5e896fc20dbafcc8ae507b17c011dc56fd)

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>
2016-12-13 22:55:21 +00:00
Ed Bartosh ca916f279f oepydevshell-internal.py: standardize usage output
Made usage output of oepydevshell-internal.py to look
similar to the output of other oe scripts.

[YOCTO #10751]

(From OE-Core rev: e6480af22a7a12c655efed14f8f1aea658f26b1c)

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>
2016-12-13 22:55:21 +00:00
Ed Bartosh 8351dc41a4 oe-setup-builddir: create usage output
Created usage output for oe-setup-builddir script.

[YOCTO #10751]

(From OE-Core rev: 77606455df7d45fd014c3603e1cf1b24efd37695)

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>
2016-12-13 22:55:20 +00:00
Ed Bartosh 78087eba73 oe-setup-rpmrepo: standardize usage output
Made usage output of oe-setup-rpmrepo to look similar to the
output of other oe scripts.

[YOCTO #10751]

(From OE-Core rev: 5423c9a412c680b781417a64b412838845b5d075)

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>
2016-12-13 22:55:20 +00:00