Re: [OE-core] [PATCH 01/17] image.py: write bitbake variables to .env file

2015-08-30 Thread Richard Purdie
On Thu, 2015-08-20 at 14:56 +0300, Ed Bartosh wrote: > Write set of bitbake variables associated with the image into > build/tmp/sysroots//imagedata/.env > > This is needed for wic to be able to get bitbake variables without > running 'bitbake -e'. I've just realised what this code is doing, its

Re: [OE-core] [PATCH 01/17] image.py: write bitbake variables to .env file

2015-08-30 Thread Ed Bartosh
On Sun, Aug 30, 2015 at 12:24:48PM +0100, Richard Purdie wrote: > On Thu, 2015-08-20 at 14:56 +0300, Ed Bartosh wrote: > > Write set of bitbake variables associated with the image into > > build/tmp/sysroots//imagedata/.env > > > > This is needed for wic to be able to get bitbake variables without

Re: [OE-core] [PATCH 2/2] devtool: implement build-image plugin

2015-08-30 Thread Ed Bartosh
Hi Paul, Thank you for review! My answers are below. On Thu, Aug 27, 2015 at 03:07:37PM +0100, Paul Eggleton wrote: > Hi Ed, > > On Monday 24 August 2015 10:33:31 Ed Bartosh wrote: > > Implemented new plugin to build image from workspace packages. > > > > Plugin creates .bbappend file, adds >

Re: [OE-core] [PATCH 4/9] linux-yocto/3.14: cleanups and gcc5 ARM build fixes

2015-08-30 Thread Richard Purdie
On Wed, 2015-08-26 at 22:31 -0400, Bruce Ashfield wrote: > Updating the 3.14 SRCREVs to match the latest kernel meta data updates > and also to merge four patches Richard Purdie located that fix the > gcc 5.x ARM build (we still have boot issues, but building is the > first step). > > Signed-off-b

Re: [OE-core] [PATCH 4/9] linux-yocto/3.14: cleanups and gcc5 ARM build fixes

2015-08-30 Thread Richard Purdie
On Sun, 2015-08-30 at 10:34 -0400, Bruce Ashfield wrote: > On Sun, Aug 30, 2015 at 10:30 AM, Bruce Ashfield > wrote: > > On Sun, Aug 30, 2015 at 9:57 AM, Richard Purdie > > wrote: > >> On Wed, 2015-08-26 at 22:31 -0400, Bruce Ashfield wrote: > >>> Updating the 3.14 SRCREVs to match the latest ker

[OE-core] [PATCH 04/11] devtool: build-image: rename LOG -> logger

2015-08-30 Thread Ed Bartosh
Used logger variable name instead of LOG as it is used in the rest of devtool code. Although Pylint complains about 'logger' being invalid constant name, but it's better to be consistent in naming than make Pylint happy. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 4 ++--

[OE-core] [PATCH 01/11] devtool: make 2 functions public

2015-08-30 Thread Ed Bartosh
Moved standard.py:_parse_recipe -> __init__.py:parse_recipe and standard.py:_get_recipe_file -> __init__.py:get_recipe_file to be able to call them from other modules. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/__init__.py | 27 +++ scripts/lib/devtool/stand

[OE-core] [PATCH 10/11] devtool: build-image: add comments

2015-08-30 Thread Ed Bartosh
Added couple of hopefully useful comments to the code. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image.py index 5bc8213..817703a 100644 --- a/scripts/lib/d

[OE-core] [PATCH 02/11] devtool: build-image: stop using add_md5

2015-08-30 Thread Ed Bartosh
It doesn't make sense to use it as image recipe is not in workspace. It means that we can't do 'devtool reset' for the recipe, which is a main point of using add_md5. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff -

[OE-core] [PATCH 08/11] devtool: build-image: add extra logging

2015-08-30 Thread Ed Bartosh
Added logger calls to show if image is modified by the plugin or not. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image.py index d246fad..563563b 100644

[OE-core] [PATCH 03/11] Revert "devtool: make add_md5 a public API"

2015-08-30 Thread Ed Bartosh
This reverts commit 69c63728dae38d5b1cc9874268f235a07e04d3db. Moved add_md5 back to standard.py as it's not used in any plugin anymore. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/__init__.py | 7 --- scripts/lib/devtool/standard.py | 15 +++ 2 files changed, 11 insertion

[OE-core] [PATCH 09/11] devtool: build-image: remove .bbappend

2015-08-30 Thread Ed Bartosh
Removed .bbappend before generating it again as it may cause tinfoil to fail due to its wrong content. It's safe to do as .bbappend is regenerated anyway. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/lib/devtoo

[OE-core] [PATCH 11/11] oe-selftest: test devtool build-image plugin

2015-08-30 Thread Ed Bartosh
Added test case to test functionaly of build-image plugin: Add two packages to workspace and run 'devtool build-image core-image-minimal'. Checked if command is successful. Checked if expected package is added to generated core-image-minimal.bbappend file. Signed-off-by: Ed Bartosh --- meta/l

[OE-core] [PATCH 06/11] devtool: build-image: filter out recipes

2015-08-30 Thread Ed Bartosh
Filtered out non-target recipes and recipes with recipe name != package name in build-image plugin. Isolated all logic of getting recipes in _get_recipes function. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 25 + 1 file changed, 21 insertions(+),

[OE-core] [PATCH 05/11] devtool: build-image: improve help and description

2015-08-30 Thread Ed Bartosh
Made parser help message and description more clear in build-image plugin. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image.py inde

[OE-core] [PATCH 07/11] devtool: build-image: generate notification callback

2015-08-30 Thread Ed Bartosh
Added notification callback to .bbapend to notify user that image is modified by build-image plugin. Signed-off-by: Ed Bartosh --- scripts/lib/devtool/build-image.py | 9 + 1 file changed, 9 insertions(+) diff --git a/scripts/lib/devtool/build-image.py b/scripts/lib/devtool/build-image

[OE-core] [PATCH 00/11] Improve build-image plugin

2015-08-30 Thread Ed Bartosh
This set of improvements for build-image plugin hopefully addresses Paul's review comments and suggestions. Paul, thank you for review! The following changes since commit 6b17c3831897ee1d46a763d807c5bd863d426bc1: linux-yocto-3.14: Update to latest revisions (2015-08-30 12:47:51 +0100) are ava

[OE-core] [PATCH] devtool: make plugin_init optional

2015-08-30 Thread Ed Bartosh
So far all devtool and recipetool plugins were expected to have plugin_init function. This function is empty in most of plugins as they don't require initialisation. Making plugin_init optional would allow not having empty plugin_init in every plugin. Signed-off-by: Ed Bartosh --- scripts/lib/d

[OE-core] [PATCH 01/12] image.py: write bitbake variables to .env file

2015-08-30 Thread Ed Bartosh
Write set of bitbake variables used by wic into build/tmp/sysroots//imagedata/.env List of variables is defined in WICVARS variable in meta/classes/image_types.bbclass. This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. Signed-off-by: Ed Bartosh --- meta/c

[OE-core] [PATCH 03/12] wic: add BitbakeVars class

2015-08-30 Thread Ed Bartosh
Moved code of getting bitbake variables into separate class. Created singleton object of this class in the module namespace. Preserved existing API get_bitbake_var. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 91 +++- 1 file changed, 53

[OE-core] [PATCH 08/12] wic: implement --vars option

2015-08-30 Thread Ed Bartosh
This option is used to point wic to the directory with .env files containing list of bitbake variables and their values. If this option is used wic will get bitbake variables from files instead of parsing 'bitbake -e' output. The main reason for this is to support new mode, when bitbake runs wic

[OE-core] [PATCH 02/12] oe-selftest: test generation of .env

2015-08-30 Thread Ed Bartosh
Added test case to check if .env file is generated and contains bitbake variables used in wic code. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 20 1 file changed, 20 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py

[OE-core] [PATCH 12/12] wic: use bitbake variable ROOTFS_SIZE

2015-08-30 Thread Ed Bartosh
If bitbake image is referenced in .ks file and --size is not used there wic uses ROOTFS_SIZE variable to set minimum partition size. ROOTFS_SIZE is calculated in meta/lib/oe/image.py when rootfs is created. The calculation is done using other image parameters: IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGN

[OE-core] [PATCH 11/12] oe-selftest: test building wic image by bitbake

2015-08-30 Thread Ed Bartosh
Added test case to verify building of wic-image-minimal recipe and produced artifacts: manifest and bzipped partitioned image. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/

[OE-core] [PATCH 04/12] wic: create new method _parse_line

2015-08-30 Thread Ed Bartosh
Moved code that parses one line of 'bitbake -e' output to separate method _parse_line. This method will be also used later to parse lines of .env files. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 27 +-- 1 file changed, 17 insertions(+), 10 deletion

[OE-core] [PATCH 10/12] wic-image-minimal: add wic image recipe and .wks

2015-08-30 Thread Ed Bartosh
Added example of recipe and .wks file to create partitioned image. This image is using quite complex partitioning scheme. It uses its own rootfs to populate two partitions in two different ways. It also uses core-image-minimal rootfs to populate another partition. This is how wic reports about ar

[OE-core] [PATCH 05/12] wic: add default_image attribute to BitbakeVars

2015-08-30 Thread Ed Bartosh
New attribute is used when bitbake variable is requested without specifying image name. The attribute should be set from outside, for example when wic is called with '-e ' option. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 6 ++ 1 file changed, 6 insertions(+) diff --g

[OE-core] [PATCH 00/12] V3: Build wic images with bitbake

2015-08-30 Thread Ed Bartosh
Hi Reviewers, This patchset adds new image type 'wic' to the list of image types supported by bitbake. This should allow to build partitioned image the same way as any other images. New image type can be used in image recipes almost the same way as other image types. There is just one difference

[OE-core] [PATCH 06/12] wic: set default image

2015-08-30 Thread Ed Bartosh
Set BitbakeVars.default_image when wic is called with -e option. This makes get_bitbake_var API to use provided image as a default source of variables. Signed-off-by: Ed Bartosh --- scripts/wic | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/wic b/scripts/wic in

[OE-core] [PATCH 07/12] wic: implement getting variables from .env files

2015-08-30 Thread Ed Bartosh
Added functionality of getting variables from .env files to BitbakeVars class. env files will be parsed if the directory with env files is known, i.e. when vars_dir attribute is set. Otherwise 'bitbake -e' output will be parsed. Signed-off-by: Ed Bartosh --- scripts/lib/wic/utils/oe/misc.py | 59

[OE-core] [PATCH 09/12] image_types.bbclass: add wic image type

2015-08-30 Thread Ed Bartosh
wic image type is used to produce partitioned images. Image configuration should be stored in either ..wks or .wks file. .wks file should be put to the same location as image recipe and have the same name. [YOCTO #7672] Signed-off-by: Ed Bartosh --- meta/classes/image_types.bbclass | 12 ++

Re: [OE-core] [PATCH 10/12] wic-image-minimal: add wic image recipe and .wks

2015-08-30 Thread Richard Purdie
On Sun, 2015-08-30 at 20:47 +0300, Ed Bartosh wrote: > Added example of recipe and .wks file to create partitioned image. > > This image is using quite complex partitioning scheme. > It uses its own rootfs to populate two partitions in two different ways. > It also uses core-image-minimal rootfs t

[OE-core] [PATCH 1/5] image.py: write bitbake variables to .env file

2015-08-30 Thread Ed Bartosh
Write set of bitbake variables used by wic into build/tmp/sysroots//imagedata/.env List of variables is defined in WICVARS variable in meta/classes/image_types.bbclass. This is needed for wic to be able to get bitbake variables without running 'bitbake -e'. Signed-off-by: Ed Bartosh --- meta/c

[OE-core] [PATCH 3/5] wic-image-minimal: add wic image recipe and .wks

2015-08-30 Thread Ed Bartosh
Added example of recipe and .wks file to create partitioned image. This image is using quite complex partitioning scheme. It uses its own rootfs to populate two partitions in two different ways. It also uses core-image-minimal rootfs to populate another partition. This is how wic reports about ar

[OE-core] [PATCH 4/5] oe-selftest: test building wic image by bitbake

2015-08-30 Thread Ed Bartosh
Added test case to verify building of wic-image-minimal recipe and produced artifacts: manifest and bzipped partitioned image. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/

[OE-core] [PATCH 0/5] V4: Build wic images with bitbake

2015-08-30 Thread Ed Bartosh
Hi, This is hopefully last version of the patchset. I've changed location of .wks and .bb files as Richard suggested. The following changes since commit 0f84702f0811cba4b6e6e890d478f6e98937b831: image_types.bbclass: add wic image type (2015-08-30 21:38:23 +0100) are available in the git repos

[OE-core] [PATCH 2/5] oe-selftest: test generation of .env

2015-08-30 Thread Ed Bartosh
Added test case to check if .env file is generated and contains bitbake variables used in wic code. Signed-off-by: Ed Bartosh --- meta/lib/oeqa/selftest/wic.py | 20 1 file changed, 20 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py

[OE-core] [PATCH 5/5] wic: use bitbake variable ROOTFS_SIZE

2015-08-30 Thread Ed Bartosh
If bitbake image is referenced in .ks file and --size is not used there wic uses ROOTFS_SIZE variable to set minimum partition size. ROOTFS_SIZE is calculated in meta/lib/oe/image.py when rootfs is created. The calculation is done using other image parameters: IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGN

[OE-core] [PATCH] buildstats: Outputs 'task recipe elapsed-time' from each buildstats' recipe

2015-08-30 Thread leonardo . sandoval . gonzalez
From: Leonardo Sandoval Given a 'buildstats' path (created by bitbake when setting USER_CLASSES ?= "buildstats" on local.conf) and task names, outputs ' ' for all recipes. Elapsed times are in seconds, and task should be given without the 'do_' prefix. Some useful pipelines 1. Tasks with large

Re: [OE-core] [PATCH 1/5] image.py: write bitbake variables to .env file

2015-08-30 Thread Christopher Larson
On Sun, Aug 30, 2015 at 2:14 PM, Ed Bartosh wrote: > Write set of bitbake variables used by wic into > build/tmp/sysroots//imagedata/.env > > List of variables is defined in WICVARS variable in > meta/classes/image_types.bbclass. > > This is needed for wic to be able to get bitbake variables with