Skip to content

Build wic images with bitbake

Ed Bartosh openembedded-core 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest17 patches 2 repliesIn review
  2. v117 patches 3 repliesSuperseded

Changes in v2 from the cover letter

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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17image.py: write bitbake variables to .env filemeta/lib/oe/image.py+23 -00 replies
2/17oe-selftest: test generation of <image>.envmeta/lib/oeqa/selftest/wic.py+19 -00 replies
3/17wic: remove undescore from function namescripts/lib/wic/utils/oe/misc.py+6 -60 replies
4/17wic: add BitbakeVars classscripts/lib/wic/utils/oe/misc.py+53 -380 replies
5/17wic: create new method _parse_linescripts/lib/wic/utils/oe/misc.py+17 -100 replies
6/17wic: add default_image attribute to BitbakeVarsscripts/lib/wic/utils/oe/misc.py+6 -00 replies
7/17wic: set default imagescripts/wic+4 -20 replies
8/17wic: implement getting variables from .env filesscripts/lib/wic/utils/oe/misc.py+37 -220 replies
9/17wic: implement --vars optionscripts/wic+6 -00 replies
10/17wic: rename variablescripts/lib/image/help.py+2 -20 replies
11/17wic: deferred call of hlp.get_wic_plugins_help()scripts/lib/image/help.py scripts/wic+3 -10 replies
12/17image_types.bbclass: add wic image typemeta/classes/image_types.bbclass+12 -02 replies
13/17wic-image-minimal: add wic image recipe and .wksmeta/recipes-extended/images/wic-image-minimal.bb meta/recipes-extended/images/wic-image-minimal.wks+24 -00 replies
14/17oe-selftest: test building wic image by bitbakemeta/lib/oeqa/selftest/wic.py+14 -00 replies
15/17image.py: set bitbake variable ROOTFS_SIZEmeta/lib/oe/image.py+3 -10 replies
16/17wic: use bitbake variable ROOTFS_SIZEscripts/lib/wic/imager/direct.py+14 -00 replies
17/17image.py: add script output to the rootfs logmeta/lib/oe/image.py+4 -10 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 00/17] 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

The following changes since commit bb34181b42b62e0476ba9e12f9125ed9f785cf23:

bitbake: lib/bb/main: avoid importing all server/UI modules on every execution (2015-08-24 23:47:07 +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 (17):
image.py: write bitbake variables to .env file
oe-selftest: test generation of <image>.env
wic: remove undescore from function name
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
wic: rename variable
wic: deferred call of hlp.get_wic_plugins_help() image_types.bbclass: add wic image type
wic-image-minimal: add wic image recipe and .wks
oe-selftest: test building wic image by bitbake image.py: set bitbake variable ROOTFS_SIZE
wic: use bitbake variable ROOTFS_SIZE image.py: add script output to the rootfs log

 meta/classes/image_types.bbclass                   |  12 ++
 meta/lib/oe/image.py                               |  32 +++++-
 meta/lib/oeqa/selftest/wic.py                      |  33 ++++++
 meta/recipes-extended/images/wic-image-minimal.bb  |  14 +++
 meta/recipes-extended/images/wic-image-minimal.wks |  10 ++
 scripts/lib/image/help.py                          |   6 +-
 scripts/lib/wic/imager/direct.py                   |  14 +++
 scripts/lib/wic/utils/oe/misc.py                   | 125 ++++++++++++++-------
 scripts/wic                                        |  14 ++-
 9 files changed, 212 insertions(+), 48 deletions(-)
 create mode 100644 meta/recipes-extended/images/wic-image-minimal.bb
 create mode 100644 meta/recipes-extended/images/wic-image-minimal.wks

--
Regards,
Ed