Commit Graph

2555 Commits

Author SHA1 Message Date
Richard Purdie 8b41b5ddfe multilib_header: Update wrapper to handle arm 32/64 bit
Having arm 32/64 bit headers coexisting turns out to be tricky. Unfortunately
our wrapper works using wordsize.h and this differs on arm so we can't use it.

Therefore replicate the logic here for arm. I did look into writing our
own wordsize.h but we also need to remap kernel headers on arm and
since wordsize.h comes from libc, that doesn't work for kernel headers.

(From OE-Core rev: 141dc7136c9c62da1d30132df4b3244fe6d8898d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Aníbal Limón 0dae983296 scripts/lib/compatlayer: detect_layers always use realpath's
If you are using relative paths and change to other folder for
execution it will fail, so use realpaths always.

[YOCTO #11164]

(From OE-Core rev: 14283700f8ec9dcb29cbc00c92d76173f1601bf5)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-31 10:10:29 +01:00
Christopher Larson 87ec35603d sysroot-relativelinks: also consider links to dirs on the host
Dead symlinks, or symlinks to existing files will show up in 'files' of an
os.walk, but symlinks to existing directories show up in 'dirs', so we need to
consider both.

As one example where this is an issue, the symlink from /usr/lib/ssl/certs was
left pointing to /etc/ssl/certs rather than the relative path when the sdk was
built on hosts where the latter exists.

(From OE-Core rev: c5b522378fff13962a5187d9d09979866f805cb5)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-29 16:37:27 +01:00
Abdur Rehman 07171aba2b update_gio_module_cache: fix host user contamination
update_gio_module_cache intercept creates file:
$D${libdir}/gio/modules/giomodule.cache

Change ownership of this file to root:root to avoid user contamination
by host.

(From OE-Core rev: 9a23af37ad11a7176248ade88511f34fe6dd97bb)

Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-29 16:37:27 +01:00
Aníbal Limón 7effe18700 scripts/yocto-compat-layer.py: Add dependency validation in add_layer
Some layers don't have dependencies so add a validation to avoid
exception when trying to None.split().

(From OE-Core rev: 39103285029a0bb7b64dc5a305c484988b4c651a)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-29 16:37:27 +01:00
Leonardo Sandoval e6adeac7aa recipes-kernel: Skip kernel version check on kernel templates
Currently, SRCREV is set to AUTOREV, causing mismatch between PV and the kernel
version shown in the makefile (see below to see the bitbake log). The solution
is to skip this check, suggesting to remove it once SRCREV is locked.

ERROR: linux-yocto-4.10+gitAUTOINC+01f18cba44_53be19cad6-r0.1 do_kernel_version_sanity_check: Package Version (4.10+gitAUTOINC+01f18cba44_53be19cad6) does not match of kernel being built (4.10.5). Please update the PV variable to match the kernel source or set KERNEL_VERSION_SANITY_SKIP="1" in your recipe.
ERROR: linux-yocto-4.10+gitAUTOINC+01f18cba44_53be19cad6-r0.1 do_kernel_version_sanity_check: Function failed: do_kernel_version_sanity_check (log file is located at /home/lsandov1/poky2/build/tmp/work/myqemu-poky-linux/linux-yocto/4.10+gitAUTOINC+01f18cba44_53be19cad6-r0.1/temp/log.do_kernel_version_sanity_check.26904)
ERROR: Logfile of failure stored in: /home/lsandov1/poky2/build/tmp/work/myqemu-poky-linux/linux-yocto/4.10+gitAUTOINC+01f18cba44_53be19cad6-r0.1/temp/log.do_kernel_version_sanity_check.26904
ERROR: Task (/home/lsandov1/poky2/meta/recipes-kernel/linux/linux-yocto_4.10.bb:do_kernel_version_sanity_check) failed with exit code '1

[YOCTO #11064]

(From meta-yocto rev: 79bfd911f826c6c7e26827bb200dd69e6f567b17)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:52:14 +01:00
Stephano Cetola 243693be54 devtool: open kconfig fragment in binary mode
When devtool writes to the kconfig fragment, it writes the output of
the diff command returned from pipe.communicate(). This function
returns binary objects. We should open the kconfig fragment file in
binary mode if we expect to write binary objects to it.

[YOCTO #11171]

(From OE-Core rev: 72bec63ab0e78753fb6ed1794d11beef9485c014)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 08:43:12 +01:00
Ed Bartosh 871363251a wic: fix generation of partition UUID
Partition UUID for msdos partitioning is based on a 4 bytes long
system identifier. Wic uses random number to generate system
identifier. For the numbers starting with 0 partition uuid is
shorter, which makes wic images non-bootable as kernel expects
8 charactest in PARTUUID parameter.

Padded system identifier with '0' when generating partition UUID
to make it always 8 characters long. This should fix the boot
issue.

(From OE-Core rev: bdaba95af2b2c9174311374436f184d2a927f6f1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 11:08:34 +01:00
Leonardo Sandoval 7ddcbc5eca scripts/contrib: scripts that updates kernel templates
Updating the kernel templates (those use by the yocto-bsp script) is a mechanical
process (and prone to errors) which consists of copying latest kernel template then
applying string replacements from old to new kernel version. This script collects
these commands allowing quick updates in the future.

(From meta-yocto rev: 450313d9d8bb1e728ed5a7208decd30f50633be1)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:24 +01:00
Leonardo Sandoval 6ce9cc464a scripts/lib/bsp/substrate: kernel templates for 4.10
New set of templates that target the 4.10 kernel version.

[YOCTO #11174]

(From meta-yocto rev: 8a11b0cc2a1bfaab25200c251b301c812141ba58)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:24 +01:00
Robert Yang 4ca286d45c scripts/wic: fix typo
roofs -> rootfs

(From OE-Core rev: 131629ca6238ea0596f5dd11d659ce2ca63067a4)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:07 +01:00
Markus Lehtonen 5e3eaf7c57 build-perf-test-wrapper.sh: store buildstats under git-notes
In order to dramatically reduce the data footprint of the result
branches. This makes cloning/pulling result repositories a lot faster.
Buildstats can still be accessed, when needed by doing
git fetch refs/notes/buildstats/*:refs/notes/buildstats/*

[YOCTO #10582]

(From OE-Core rev: 5b52bbf09bb2fbec9d2d54f3c3c46c74a09fbfd0)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Markus Lehtonen 746b6fbe68 scripts/oe-git-archive: implement --notes
Option for adding git-notes to the commit.

[YOCTO #10582]

(From OE-Core rev: 0ef7c143262a441c38235ea71832ca7714ce4a35)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Markus Lehtonen e10d1ea082 scripts/oe-git-archive: implement --exclude
May be used for excluding certain files from the commit.

[YOCTO #10582]

(From OE-Core rev: fd125cf694bebefbe9a98fd1bb199d6ca472dad5)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Markus Lehtonen 60f32a00dc scripts/oe-git-archive: fix pushing
Git arguments were badly laid out.

(From OE-Core rev: cea9c1380891a85f686cb3b5cb42b6166f38e8d5)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Markus Lehtonen 7132f54041 oe-build-perf-test: pack all buildstat in one file
Write out all buildstats into one big json file, instead of using
multiple per-measurement files. Individual buildstats will be indexed
using "<test_name>.<measurement_name>" as the key. Also, changes the
per-testcase working directories into temporary directories that will be
removed after test execution as there are no more per-testcase data files
to store permanently.

[YOCTO #10582]

(From OE-Core rev: a7f2e8915db379021f3409ca640de5d3b054a830)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27 08:15:06 +01:00
Ed Bartosh cc970c23a7 wic: use kernel_dir to find systemd-efi bootloader
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'

(From OE-Core rev: 552bd782d9ffe275b8fc7d7cb0b9aaceb51888c3)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24 23:43:33 +00:00
Chen Qi 11b81e3fba runqemu-gen-tapdevs: fix file path in example
Fix the path in example so that '/usr/bin/tunctl' could be found under
this path.

(From OE-Core rev: d1b8e1460b25018ac8f65d3647bc736f3393ed3e)

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-03-24 23:43:32 +00:00
Ed Bartosh fa10b24950 wic: improve getting syslinux path
Used wic-tools STAGING_DATADIR if syslinux can't be found
in default bootimg_dir.

(From OE-Core rev: 79a935cfc86ffce6f4b4f328b90337de36ba6dbb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Ed Bartosh 5c04e37140 wic: remove empty plugin methods
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]

(From OE-Core rev: d58c8ef2836418056f776a9586e0bb0d33afb788)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Ed Bartosh 3ea735d390 wic: use STAGING_DATADIR as a default for bootimg_dir
Default value for bootimg_dir was not set in main wic script
unlike the rest of artifacts: kernel_dir, roofts_dir and
native_sysroot. Set it to the value of STAGING_DATADIR for
consistency and to avoid confusion of wic plugin developers.

(From OE-Core rev: afc486b6316f1118c8dcc74a5e217bb217dd1f85)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Ed Bartosh b78c564cca wic: fix bug in sparse_copy
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.

(From OE-Core rev: 567186f995302a095a771baede4ff5034d1d1862)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Ed Bartosh 627952a234 wic: use kernel_dir instead of bootimg_dir
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.

(From OE-Core rev: 48a5d67d7cafdeac821e6f35bea380521ef017d5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Ed Bartosh ce627abf86 wic: don't set creator.bootimg_dir in plugins
Changing bootimg_dir in plugins is a dangerous hack as this
value comes from wic command line and can be used by multiple
plugins.

(From OE-Core rev: 2457ea5338f7309316b474562b4723e8cb09286d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Ed Bartosh d38d526991 wic: remove rootfs_pcbios_ext plugin
Removed broken unused plugin.

(From OE-Core rev: 6d162118a2567ccbcdbc2a9ca14a8c358fa1a055)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23 13:19:49 +00:00
Aníbal Limón f57eac5dc9 scripts/yocto-compat-layer.py: Handle layer dependencies when test
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.

(From OE-Core rev: 1e7cf9bb71521f1632dd2e6b01fe7fcc95732983)

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-22 11:35:22 +00:00
Aníbal Limón 4703aa2b3b scripts/yocto-compat-layer.py: Add option to disable layer autodiscovery
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.

(From OE-Core rev: f2f6f0c938226802163698ef14a8a9103da362a0)

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-22 11:35:22 +00:00
Aníbal Limón 995cb88233 scripts/lib/compatlayer: Remove require of meta- in layer dir name
The layers isn't required to have a dirctory name start with meta-
so remove the validation.

(From OE-Core rev: 576c6486f547b1d7422cdd12f688aef74ee632ae)

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-22 11:35:22 +00:00
Aníbal Limón 6786f662cd scripts/compatlayer: Add exclude of meta-world-pkgdata on get_signatures
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]

(From OE-Core rev: cde30d70b04eb66bff66a351ddf733022e98ddab)

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-22 11:35:22 +00:00
Aníbal Limón 07dd071bf6 scripts/yocto-compat-layer.py: Make output log argument optional
Only create a log file when --output-log option is specified, since
logger is dumping to stdout by default is better to let the user
decide if a log needs to be created.

[YOCTO #11160]

(From OE-Core rev: f91ccdeb8b0b3e4063ed2bf22215a25f8902cbd9)

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-22 11:35:22 +00:00
Aníbal Limón 1e3ef54408 scripts/yocto-compat-layer.py: Dump log to stdout instead of stderr
The common unix tools uses stdout as standard for log output, by default
python logging uses stderr if not stream is specified.

[YOCTO #11160]

(From OE-Core rev: 95ad04f7daed17bde5be5fc264f6c731fecfdfa9)

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-22 11:35:21 +00:00
Aníbal Limón 15e65f5f07 scriptutils: Add support for specify stream on logger_create
It is a good idea to let the script to choose what stream wants
to dump the logging output.

[YOCTO #11160]

(From OE-Core rev: 60c9b06f4085f6bddb6aa397a38bfc2ceb10f964)

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-22 11:35:21 +00:00
Daniel Schultz 898de507d3 wic: partition.py: Add fsck to avoid corrupt EXT file systems
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.

(From OE-Core rev: 95ac3d0637cad7e12f246b8bd64ab64348df0483)

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
brian avery ab34d08772 gen-lockedsig-cache: catch os.link error
We do a hard link to speed up sdk creation but if your sstate-cache is
across a file system boundary, this tries and fails. This patch catches
that error and does a copy instead.

(From OE-Core rev: fb9fdd7a74917cdcab039aa3a9a9944b18246fea)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Paul Eggleton 995b02b00c devtool: tidy up handling of parse failures
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.

(From OE-Core rev: 18304036e1b513fd12c049dbf549ba75c503ed84)

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-03-22 11:35:21 +00:00
Kristian Amlie 76d182c757 wic/partionedfs: Avoid reserving space for non-existing ext. partition
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.

(From OE-Core rev: 485315dc170e29962a8848db38db73abafd0586e)

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-03-22 11:35:20 +00:00
Anders Darander 6fa0fda116 devtool/recipetill: npm install of devDependencies
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.

(From OE-Core rev: f246f820d53b459596fde6758a09f7a0d7db7c4c)

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-22 11:35:20 +00:00
Ed Bartosh 4a57a7bc8d runqemu: output network configuration
runqemu adds network configuration parameters to the kernel
command line to configure guest networking. This works only
for the images that run with external kernel using qemu -kernel
parameter. It doesn't work for the images that use bootloader
to boot kernel as -kernel parameter is not used and network
configuration is not possible to get.

Added host and guest ip addresses and netmask of tap link
to the runqemu output. This should allow external programs
that execute runqemu to get network configuration.

[YOCTO #10833]

(From OE-Core rev: cf66a1850677548aa63a54276fa4917f40259daf)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:19 +00:00
Robert Yang 766dccf975 runqemu: only boot ramfs when specified
This can fix a problem:
IMAGE_FSTYPES += "iso"
$ bitbake core-image-minimal
$ runqemu qemux86

It may boot core-image-minimal-initramfs rather than core-image-minimal, this
is not what we want usually. This patch makes it avoid booting ramfs when there
are other choices, or when it is specified, for example, "runqemu qemux86 ramfs"

(From OE-Core rev: 614bde6774f4dfd414066bbaf75ed422943e37ab)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17 16:53:04 +00:00
Robert Yang 0079607387 runqemu: add -h and --help
Fixed:
$ runqemu -h
runqemu - INFO - Assuming MACHINE = -h
runqemu - INFO - Running MACHINE=-h bitbake -e...
[snip]
Exception: FSTYPE is NULL!

[YOCTO #10941]

(From OE-Core rev: 6b9dd7a589537b12da648be50298cf7d36461797)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:33 +00:00
Robert Yang ac451ea84c runqemu: improve when no machine specified
Fixed:
$ runqemu core-image-minimal
[snip]
Exception: FSTYPE is NULL!
[snip]

Get DEPLOY_DIR_IMAGE from "bitbake -e" to make it work.

[YOCTO #10471]

(From OE-Core rev: ca551b72a020782f164703765b97156000b908d2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Juro Bystricky 68e57fa748 runqemu: independent network and rootfs setup
Presently, runqemu sets up rootfs as part of network setup.
In case there is no network desired we will end up without rootfs
as well.
This patch sets up network and rootfs independently.
It is also possible to bypass setup of rootfs if QB_ROOTFS is set to "none".

(From OE-Core rev: 006ab8c6bcfe9d065c215cab15289357cefc9259)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Patrick Ohly ef0c54ab70 yocto-compat-layer: improve error handling in signature creation
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.

(From OE-Core rev: 5b9ac62ab535d2791b9713857e1016f49f53dd8d)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
Alexander Kanavin ba6106a3e2 scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c
(From OE-Core rev: bab25f09d34a32301e483ff0700add1209809b14)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Alexander Kanavin aa17362d33 scripts/rpm2cpio.sh: replace 5.x version with 4.x version
(From OE-Core rev: a7da1aade118d1ccf1b286f82556cd9f706bd2a4)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-14 14:42:17 +00:00
Kristian Amlie 0cfcdf2e95 wic/direct.py: Avoid exception if using multiple rawcopy/no-table entries.
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.

(From OE-Core rev: f1a3eac376c4600cdb128d870ad9b7e9d51ed9c0)

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-03-11 16:09:14 +00:00
Richard Purdie 0efe58df2e runqemu-gen-tapdevs: Improve help text with an example
Figuring how the correct commandline isn't trivial, improve the help
text with RSS in mind.

(From OE-Core rev: 056a9da9f3ac2bc175f19243b11864ca90eee28b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:11 +00:00
Daniel Schultz 8dddce21c4 wic: filemap: Fixed spared_copy skip
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.

(From OE-Core rev: 5c024d71f9413b81ee1707dbc41f0721f8f27bdb)

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Daniel Schultz 52de84763d wic: plugins: rawcopy: Fixed wrong variable type
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()

(From OE-Core rev: 46b5814bcdc0e7e3cb293e877e2aa949baf5fef8)

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10 14:50:10 +00:00
Nikunj Kela d49dba9a6a relocate_sdk.py: skip debug files from relocation
Debug files only have debug symbols hence don't need
to be relocated. Relocation script throws errors when
run on the debug files. This change skips these files
that have zero size.

(From OE-Core rev: 132e8bfd499c713eb63075fd6380317b60f0bd27)

(From OE-Core rev: 93b73b2495f9cb18741837c5437de629adfd3780)

Signed-off-by: Nikunj Kela <nkela@cisco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-08 11:52:57 +00:00
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