Skip to content

V3: Build wic images with bitbake

Ed Bartosh openembedded-core 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 1 replyIn review

Changes in V2 from the cover letter

- Fixed typo in the comment. Thanks Mario!
- Rebased on fresh master

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12image.py: write bitbake variables to .env filemeta/classes/image_types.bbclass meta/lib/oe/image.py+22 -00 replies
2/12oe-selftest: test generation of <image>.envmeta/lib/oeqa/selftest/wic.py+20 -00 replies
3/12wic: add BitbakeVars classscripts/lib/wic/utils/oe/misc.py+53 -380 replies
4/12wic: create new method _parse_linescripts/lib/wic/utils/oe/misc.py+17 -100 replies
5/12wic: add default_image attribute to BitbakeVarsscripts/lib/wic/utils/oe/misc.py+6 -00 replies
6/12wic: set default imagescripts/wic+4 -20 replies
7/12wic: implement getting variables from .env filesscripts/lib/wic/utils/oe/misc.py+37 -220 replies
8/12wic: implement --vars optionscripts/wic+6 -00 replies
9/12image_types.bbclass: add wic image typemeta/classes/image_types.bbclass+12 -00 replies
10/12wic-image-minimal: add wic image recipe and .wksmeta/recipes-extended/images/wic-image-minimal.bb meta/recipes-extended/images/wic-image-minimal.wks+24 -01 reply
11/12oe-selftest: test building wic image by bitbakemeta/lib/oeqa/selftest/wic.py+14 -00 replies
12/12wic: use bitbake variable ROOTFS_SIZEscripts/lib/wic/imager/direct.py+14 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/12] V3: Build wic images with bitbake

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 - <image>[.<machine>].wks file should be put to the same location as image recipe.

To enable this functionality I've implemented generating .env files with bitbake variables and reading them by wic. This seems to be the only way to get bitbake variables in wic when it's run by bitbake as running 'bitbake -e' is not possible as bitbake is locked.

Test cases for new functionality and small improvements are also included into this patchset.

Changes in V2:
- Fixed typo in the comment. Thanks Mario!
- Rebased on fresh master

Changes in V3:
- introduced WICVARS variable to define a list of variables used by wic. only variables mentioned in WICVARS will be written to <image>.env
- rebased on top of fresh master

The following changes since commit 6b17c3831897ee1d46a763d807c5bd863d426bc1:

linux-yocto-3.14: Update to latest revisions (2015-08-30 12:47:51 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib ed/wic/wic-image-type
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wic-image-type

Ed Bartosh (12):
image.py: write bitbake variables to .env file
oe-selftest: test generation of <image>.env
wic: add BitbakeVars class
wic: create new method _parse_line
wic: add default_image attribute to BitbakeVars
wic: set default image
wic: implement getting variables from .env files
wic: implement --vars option image_types.bbclass: add wic image type
wic-image-minimal: add wic image recipe and .wks
oe-selftest: test building wic image by bitbake
wic: use bitbake variable ROOTFS_SIZE

 meta/classes/image_types.bbclass                   |  16 +++
 meta/lib/oe/image.py                               |  18 ++++
 meta/lib/oeqa/selftest/wic.py                      |  34 ++++++
 meta/recipes-extended/images/wic-image-minimal.bb  |  14 +++
 meta/recipes-extended/images/wic-image-minimal.wks |  10 ++
 scripts/lib/wic/imager/direct.py                   |  14 +++
 scripts/lib/wic/utils/oe/misc.py                   | 115 ++++++++++++++-------
 scripts/wic                                        |  12 ++-
 8 files changed, 195 insertions(+), 38 deletions(-)
 create mode 100644 meta/recipes-extended/images/wic-image-minimal.bb
 create mode 100644 meta/recipes-extended/images/wic-image-minimal.wks

--
Ed