Age | Commit message (Collapse) | Author | Files |
|
Fixed test failure caused by using bootimg_dir path
instead of kernel_dir to find systemd-efi bootloader:
FAIL: test_systemd_bootdisk (oeqa.selftest.wic.Wic)
...
FileNotFoundError: [Errno 2] No such file or directory:
'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share'
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Used wic-tools STAGING_DATADIR if syslinux can't be found
in default bootimg_dir.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed do_install_disk and do_configure_partition methods from
bootimage-partition, fsimage and rawcopy plugins as they're empy
and not used.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
sparse_copy creates output file that is smaller than input
file when input file ends with unmapped blocks.
Used truncate(<input file size>) when output file is created
to ensure the size of output file will always be equal to
the size of input file.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
bootimg_dir is usually set to the value of STAGING_DATADIR and
kernel_dir - to the value of DEPLOY_DIR_IMAGE, so usage of
kernel_dir is more logical in bootimg-efi, bootimg-partition and
rawcopy plugins.
Replaced usage of bootimg_dir to kernel_dir in 3 above mentioned
plugins that use DEPLOY_DIR_IMAGE as a default artifact location.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Changing bootimg_dir in plugins is a dangerous hack as this
value comes from wic command line and can be used by multiple
plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed broken unused plugin.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If some layer depends on other tries to find layer dependency, if the
layer dependency isn't found avoid to test the layer and notice the
user.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Sometimes there is a need to only analyze the layer specified by the
command line, the new option -n will disable autodiscovery of layers
and only will try to test specified layers.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The layers isn't required to have a dirctory name start with meta-
so remove the validation.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The meta-world-pkgdata recipe can be modified when a layer is added
may be can add recipes to world target, so exclude by default.
[YOCTO #11162]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
It is a good idea to let the script to choose what stream wants
to dump the logging output.
[YOCTO #11160]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This patch avoids the creation of a corrupt EXT file system.
Since there are no checks if a EXT file system was successfully created,
this should add to prevent possible system failures.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Since the tinfoil2 refactoring, if an error occurred during parsing, we
were showing a traceback and not correctly exiting (since we weren't
calling shutdown()). Fix both of these issues.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
We don't need the gap that the extended partition occupies if we
already know that we have less than five partitions. Saves up to one
full alignment of space.
Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Web applications built using e.g. angular2, usually requires that the
packages in devDependencies are available.
Thus, add an option '--fetch-dev' to both devtool add and recipetool, to
add npm packages in devDependencies to DEPENDS.
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
When "bitbake -k -S none world" failed, the error printed by
yocto-compat-layer.py contained the stack trace multiple times and did not
contain the stderr output from bitbake, making the error hard to understand
and debug:
INFO: ======================================================================
INFO: ERROR: test_signatures (common.CommonCompatLayer)
INFO: ----------------------------------------------------------------------
INFO: Traceback (most recent call last):
File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 144, in get_signatures
stderr=subprocess.PIPE)
File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command 'bitbake -k -S none world' returned non-zero exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/fast/work/poky/scripts/lib/compatlayer/cases/common.py", line 51, in test_signatures
curr_sigs = get_signatures(self.td['builddir'], failsafe=True)
File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 149, in get_signatures
raise RuntimeError(msg)
RuntimeError: Traceback (most recent call last):
File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 144, in get_signatures
stderr=subprocess.PIPE)
File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command 'bitbake -k -S none world' returned non-zero exit status 1
Loading cache...done.
Loaded 1328 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
NOTE: Runtime target 'zlib-qat' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['zlib-qat']
...
Summary: There were 5 ERROR messages shown, returning a non-zero exit code.
The yocto-compat-layer.log was incomplete, it only had the first part
without the command output.
stderr was missing due to stderr=subprocess.PIPE.
Instead of the complicated try/except construct it's better to check
the return code ourselves and raise just a single exception. The
output (both on stderr and in the yocto-compat-layer.log) now is:
INFO: ======================================================================
INFO: ERROR: test_signatures (common.CommonCompatLayer)
INFO: ----------------------------------------------------------------------
INFO: Traceback (most recent call last):
File "/fast/work/poky/scripts/lib/compatlayer/cases/common.py", line 51, in test_signatures
curr_sigs = get_signatures(self.td['builddir'], failsafe=True)
File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 147, in get_signatures
raise RuntimeError(msg)
RuntimeError: Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.
Command: bitbake -k -S none world
Output:
Loading cache...done.
Loaded 1328 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'qat16' (but /fast/work/meta-intel/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb DEPENDS on or otherwise requires it)
ERROR: qat16 was skipped: incompatible with machine qemux86 (not in COMPATIBLE_MACHINE)
...
Missing or unbuildable dependency chain was: ['openssl-qat-dev']
...
Summary: There were 5 ERROR messages shown, returning a non-zero exit code.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If we are both having a bootloader and a U-Boot environment file, we
can end up with two entries using "--source rawcopy" and "--no-table",
and since they reuse the same file [1], their cleanup handlers will
try to delete the same file twice. So make sure we only do it once.
[1] Although they reuse the same file, the resulting output is
correct, so it appears the file is accessed in properly sequential
order.
Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This patches removes the empty space in front of the copied file which
was skipped. Without this reduction it's not possible to place a
partition with rawcopy and skip parameter on a desired alignment.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Without the int() function this variable will be a string. This will led
to a error in Filemap on line 545 due wrong types.
> [...]
> File
> ".../poky/scripts/lib/wic/filemap.py", line 545, in sparse_copy
> if start < skip < end:
> TypeError: unorderable types: int() < str()
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
The yocto-compat-layer script serves as a tool to validate the alignament
of a layer with YP Compatible Layers Programme [1], is based on an RFC
sent to the ML to enable automatic testing of layers [2] that wants to
be YP Compatible.
The tool takes an layer (or set of layers) via command line option -l
and detects what kind of layer is distro, machine or software and then
executes a set of tests against the layer in order to validate the
compatibility.
The tests currently implemented are:
common.test_readme: Test if a README file exists in the layer and isn't
empty.
common.test_parse: Test for execute bitbake -p without errors.
common.test_show_environment: Test for execute bitbake -e without errors.
common.test_signatures: Test executed in BSP and DISTRO layers to review
doesn't comes with recipes that changes the signatures.
bsp.test_bsp_defines_machines: Test if a BSP layers has machines
configurations.
bsp.test_bsp_no_set_machine: Test the BSP layer to doesn't set
machine at adding layer.
distro.test_distro_defines_distros: Test if a DISTRO layers has distro
configurations.
distro.test_distro_no_set_distro: Test the DISTRO layer to doesn't set
distro at adding layer.
Example of usage:
$ source oe-init-build-env
$ yocto-compat-layer.py LAYER_DIR
[YOCTO #10596]
[1] https://www.yoctoproject.org/webform/yocto-project-compatible-registration
[2] https://lists.yoctoproject.org/pipermail/yocto-ab/2016-October/001801.html
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Rewrite Public Domain as PD, as that's what the place holder in
meta/files/common_licenses is called.
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Handle npm packages with multiple licenses (AND and OR).
Prior to this, AND and OR were treated as licensed in their
own.
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Rewrite the 'SEE LICENSE IN EULA' to a single string (without
spaces), to avoid splitting the string later on.
(Otherwise, each word gets split, and assumed to be a license
on it's own.
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Quite a few npm packages declare MIT/X11 as their license. This is equal to
a pure MIT license.
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Added 3 new targets to directdisk-bootloader-config.cfg to
match hddimg syslinux config.
This is a preparation for dropping hddimg in favor of wic.
[YOCTO #11044]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Installed vesamenu.c32 and its dependencies to support
vesamenu ui in syslinux config.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced forgotten calls of logger.error with raising
WicError exception. Otherwise errors will be ignored.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Defined variable 'out' to fix this exception:
UnboundLocalError: local variable 'out' referenced before assignment
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added search paths to the debug message to make it
easier to see where the native command is searched.
[YOCTO #11017]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Currently there is no way to specify a dependency on native
tools for wic without modifying wic-tools recipe. Obvious
way to make it more flexible is to use image sysroot and
wic-tools together to find an executable.
Modified run_native_cmd to use image and wic-tools sysroots
to find native executable.
[YOCTO #11017]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Made PluginMeta to populate global PLUGINS dictionary that
is accessed by PluginMgr. This should make the code more
understandable as PluginMgr don't need to get data directly
from PlugnMeta attribute.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
As PluginMgr class contains only one method it's
better to move it to pluginbase to have all plugin
related APIs in one module.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Store results of PluginMgr.get_plugins to avoid
loading plugins more than once.
This should speed up finding plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Call methods directly instead of getting them with
get_plugin_methods and then calling.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Throw WicError if do_create method of imager plugin is
not implemented.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Used more readable syntax to specify metaclass for
the base plugin classes.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed all private methods and complicated logic.
Put all code to get plugins into get_plugins method.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Simplified the implementation of get_plugin_methods:
- get rid of looping over the dicrtionary, used access by key instead
- get rid of filling a dictionary that passed as a parameter
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Used get_plugins('source') instead of get_source_plugins to
unify and simplify API to get plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Instead of making a singleton object of PluginMgr class
it's simpler to use PluginMgr class directly as any class
is a singleton.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed unused exceptions from error.py
Moved definition of WicError to lib/wic/__init__.py
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
There is no need to raise special exceptions. Raising
WicError should be enough.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced sys.exit with raising WicError in wic plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced sys.exit with raising WicError in the core wic modules.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Moved from lib/wic/utils/ to lib/wic as this is a core module.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed custom logger module msger as it's replaced
by wic logger.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced msger with wic logger in wic source plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced msger with wic logger in the direct plugin.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced msger with wic logger in the core wic modules.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|