summaryrefslogtreecommitdiffstats
path: root/scripts/wic
Commit message (Collapse)AuthorAgeFilesLines
* scripts/wic: explicitly set BUILDDIR within eSDKChang Rebecca Swee Fun2018-01-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When we run wic within eSDK: $ wic create mkefidisk -e core-image-minimal ERROR: BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?) In order to figure out variable values, one must have sourced the OE build environment setup script. However, when we are in within the eSDK environment which isn't initialised like the normal OE build environment, we can't use wic utility with eSDK. Reference: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#wic-requirements While wic ought to be fixed to be able to run without bitbake & native tools [YOCTO #11281], but this is a workaround to set BUILDDIR in the environment so that bitbake environment is setup for wic to build its required native tools. (From OE-Core rev: 03fa13a269d2887cc5d13fd474fb39a2be037f2c) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/wic: fix error of import wic module in eSDK environmentChang Rebecca Swee Fun2018-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | wic modules in scripts/lib/ are needed for wic to work, but path to the python module is not exported in eSDK environment and we were using an absolutized path of wic script within the sysroots. We now changed to use real script path instead, where the wic modules are located. This will also resolved the tracebacks found when running wic from within the eSDK environment. Traceback (most recent call last): File "/tmp/deploy/sdk/poky_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/wic", line 58, in <module> from wic import WicError ImportError: No module named 'wic' (From OE-Core rev: dcea30b885797ece3439cf1201795a975628d664) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/wic: append bitbake executable file path in eSDK environmentChang Rebecca Swee Fun2018-01-131-0/+12
| | | | | | | | | | | | | | wic needs a set of tools to be available from sysroots. wic will find bitbake executable within the environment, and wic was unable to locate bitbake executable within eSDK because it wasn't setup with the OE build environment script. Hence, we need to add bitbake file path into the environment PATH for wic to be able to discover it and import bb modules. (From OE-Core rev: 89df0d31c9dd22ceba4c95a2a56ca78e58d871a8) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/wic: use scriptpath module to find bitbake path and oe lib pathChang Rebecca Swee Fun2018-01-131-4/+3
| | | | | | | | | | Use the scriptpath module in order to standardize the adding of bitbake and meta/lib path to sys.path. (From OE-Core rev: 8aba1fd023ce3c6767bf42b9faf9ec14fd7c4d02) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add option to not change fstabFabio Berton2017-09-261-0/+2
| | | | | | | | | | | | | | | | | Create an option to wic doesn't change fstab file, the final fstab file will be same that in rootfs and wic doesn't update file, e.g adding a new mount point. Users can control the fstab file content in base-files recipe. This is useful if you want to only create an partition but not add fstab mount point or add new mount point using label e.g: LABEL=recovery /recovery auto defaults 0 1 (From OE-Core rev: 00420ec42140c1b752132bda190dede85756d157) Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement 'wic write' commandEd Bartosh2017-08-271-0/+55
| | | | | | | | | | | | This command writes image to the media or another file with the possibility to expand partitions to fill free target space. [YOCTO #11278] (From OE-Core rev: ac5fc0d691aad66ac01a5cde34c331c928e9e25a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: build wic-tools only if wic is run manuallyEd Bartosh2017-07-171-4/+4
| | | | | | | | | | | | | | | When wic can't find native sysroot it tries to build wic-tools However, it's not possible when wic is run from bitbake. Moreover, it's not even feasible anymore as wic-tools should be used only when wic is run manually. Checked if wic is run manually before building wic-tools. (From OE-Core rev: 522ac21831944b06fbcc372ac61762576d792c22) 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>
* wic: get rid of using wic-toolsEd Bartosh2017-07-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | At the moment, when building images with IMAGE_FSTYPES=wic one ends up depending on wic-tools and thus syslinux and grub-efi even when not using those at all. Ideally, building an image with wic should only build the tools and components really needed. The problem is that "wic-tools" is needed also for the manual invocations of wic, in which case everything that might be needed has to be built in advance. Replaced dependency on wic-tools with dependency to a much shorter set of tools that wic uses almost for any image: 'parted', 'gptfdisk', 'dosfstools' and 'mtools'. [YOCTO #11552] (From OE-Core rev: 33ca15b94dbe7204c556c4b5526edd529f6d85f4) 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>
* wic: flatten directory structureEd Bartosh2017-06-231-1/+1
| | | | | | | | | | | Moved misc.py from wic/utils/ to wic/ Removed wic/utils directory (From OE-Core rev: df906f3caa0721756f5ed48fa657e62e05ae2aa3) 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>
* wic: add 'wic rm' commandEd Bartosh2017-06-141-0/+14
| | | | | | | | | | | | Added empty 'wic rm' command that does nothing. The functionality will be added by the next commits. [YOCTO #11283] (From OE-Core rev: f8e42c13609c482359fbdb225fb16a45101ae9ae) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add wic_init_parser_rmEd Bartosh2017-06-141-0/+6
| | | | | | | | | Add parser for 'wic rm' subcommand. (From OE-Core rev: 234b20ae73e15a4926b64449a665169390c66451) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'wic cp' commandEd Bartosh2017-06-141-0/+13
| | | | | | | | | | | | Added empty 'wic cp' command that does nothing. The functionality will be added by the next commits. [YOCTO #11283] (From OE-Core rev: f0dcf39d52185430422cb0c94c7fe99c12764acd) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add wic_init_parser_cpEd Bartosh2017-06-141-0/+16
| | | | | | | | | Add parser for 'wic cp' subcommand and a custom argument type. (From OE-Core rev: df5152c834ef58036b41ad51b19eda6abecd9543) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'wic ls' commandEd Bartosh2017-06-141-0/+15
| | | | | | | | | | Added empty 'wic ls' command that does nothing. The functionality will be added by the next commits. (From OE-Core rev: ba4613469cc2c3d3433be2e2f520f4fff6b3b333) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add wic_init_parser_lsEd Bartosh2017-06-141-0/+25
| | | | | | | | | Added parser for 'wic ls' command. (From OE-Core rev: 8db6f74b684fecc7dd4d23d327a9b6310cdd3ec9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Use argparse instead of optparseAndreas J. Reichel2017-05-231-81/+132
| | | | | | | | | | | | | | | | | | | * optparse is deprecated and will not be developed further (see: https://docs.python.org/2/library/optparse.html) * argparse supports subcommands, which simplifies definition of arguments and options * reimplement help mechanism through sub-subcommands [YOCTO #9636] (From OE-Core rev: 4fe9635c72a6ee1becc47d832ab54724176ee811) Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Daniel Wagner <daniel.wagner@siemens.com> 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>
* scripts/wic: fix typoRobert Yang2017-03-271-2/+2
| | | | | | | | | 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>
* wic: use STAGING_DATADIR as a default for bootimg_dirEd Bartosh2017-03-231-2/+1
| | | | | | | | | | | | 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>
* wic: use image recipe sysroot as defaultEd Bartosh2017-03-041-1/+1
| | | | | | | | | | | | | 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>
* wic: move WicError to lib/wic/__init__.pyEd Bartosh2017-03-041-1/+1
| | | | | | | | | | 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>
* wic: raise WicError in main moduleEd Bartosh2017-03-041-33/+23
| | | | | | | | | 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>
* wic: move errors moduleEd Bartosh2017-03-041-2/+1
| | | | | | | | | 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>
* wic: setup logging in the main wic moduleEd Bartosh2017-03-041-33/+44
| | | | | | | | | | 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>
* wic: Add --exclude-path option to rootfs source plugin.Kristian Amlie2017-02-151-0/+2
| | | | | | | | | | | | | | | | | | | 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>
* wic: remove unused argument scripts_pathEd Bartosh2017-02-151-1/+1
| | | | | | | | | | | | | | 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>
* wic: flatten imager class hierarchyEd Bartosh2017-02-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* wic: get rid of image_output_dir variableEd Bartosh2017-02-021-5/+1
| | | | | | | | | | | 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>
* wic: move oe/misc.py one level upEd Bartosh2017-02-021-1/+1
| | | | | | | | | | | | 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>
* wic: change default output directoryEd Bartosh2017-01-311-1/+1
| | | | | | | | | | | Set default output directory to current dir. [YOCTO #10783] (From OE-Core rev: ad116c4d02ccf36e22fbf3e45e45bc508849a833) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rebuild wic-tools if its sysroot doesn't existEd Bartosh2017-01-231-1/+13
| | | | | | | | | | Rebuild wic-tools if its native sysroot doesn't exist to ensure that all required tools are available. (From OE-Core rev: 0d005d099a2b8ee1303b98710cdc78e06e14ab39) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix getting path of native sysrootEd Bartosh2017-01-231-2/+1
| | | | | | | | | | | | | | wic used STAGING_DIR_NATIVE variable as a path to native sysroot. This doesn't work with recipe specific sysroots as STAGING_DIR_NATIVE points to the native sysroot of the current recipe. Used RECIPE_SYSROOT_NATIVE variable of wic-tools recipe to fix the issue. (From OE-Core rev: de9d7d14cd03e4dfc5812890a53c79b706b56537) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rename command line option -p -> -sEd Bartosh2016-12-131-1/+1
| | | | | | | | | | | | Short variant of wic command line option --skip-build-check is incorretly named -p. It's named -s in wic help and Yocto documentation. (From OE-Core rev: 8d4121459334349f10bfb0f4cda00a8461aab245) 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>
* scripts: Fixed typo in parameter that was causing exceptionHumberto Ibarra2016-07-081-1/+1
| | | | | | | | | | | There is a typo in the logging parameters, "filname" is being used instead of "filename" for yocto-kernel, yocto-layer and wic scripts. This didn't cause issues before since python 2 didn't validate unused parameters but with python >= 3.4.3 an exception is thrown. This patch fixes this parameter name. [YOCTO #9834] (From OE-Core rev: 5d123a6ec0e97652b2ec4295428797a336ef357a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: python3: get rid of __future__ importsEd Bartosh2016-06-031-2/+0
| | | | | | | | | | Removed print_function and with_statement imports from __future__ as they're supported by python 3 by default. (From OE-Core rev: 77ae2daad5d775d710b953cf0c623ce74cb2c274) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use python3 in shebangEd Bartosh2016-06-021-1/+1
| | | | | | | | | | Switched scripts/wic to use python3 as a default python interpreter. (From OE-Core rev: ea6245d2383e2ba905ef9f1ba210e5dadc779ad8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement --bmap optionEd Bartosh2016-05-191-1/+2
| | | | | | | | | | | | This option enables generation of <image>.bmap file for the result image using native bmaptool. [YOCTO #9413] (From OE-Core rev: d64c7b37c40b052510419b4d6629b83319c833e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: replace print statements with print functionEd Bartosh2016-05-141-21/+22
| | | | | | | | | | | | | Print statements have been replaced with print function in Python 3. Replaced them in wic code to be able to run it under both Python 2 and Python 3. [YOCTO #9412] (From OE-Core rev: ee6979a19c77931c3cf6368e695e370d46192fef) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: insert local Python paths at frontMatt Madison2015-12-081-2/+2
| | | | | | | | | | | | This follows how bitbake performs path insertion, and fixes a failure to start wic on Ubuntu 15.10 with the distribution's version of python-ply installed. (From OE-Core rev: 59b1eefb801dfb1d4afe9640e3c8a070d4e1867f) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix short variable namesEd Bartosh2015-09-031-2/+2
| | | | | | | | | | | | Made short variable names longer and more readable. Fixed pylint warnings "Invalid variable name" and "Invalid argument name". (From OE-Core rev: 872cb0d5d79b26f34e6b35d7be8870d245021be4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get rid of listing propertiesEd Bartosh2015-09-031-9/+4
| | | | | | | | | | | | | Functionality of listing and using properties of wic images does not exist in the wic code. However, there are plenty of help and usage content about it, which is very confusing. Removed everything regarding image properties from wic codebase. (From OE-Core rev: af0a6d547a5a3efefdd4900f7079dfd10b85342d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix pylint warning unused-variableEd Bartosh2015-09-031-1/+1
| | | | | | | | | Removed or reworked code with unused variables. (From OE-Core rev: 3644b9f5ca25dfc61d4f5eda0f073c8a879b492b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get rid of scripts/lib/imageEd Bartosh2015-09-031-2/+2
| | | | | | | | | | | Moved content of scripts/lib/image/ to scripts/lib/wic as one directory with the same name as a tool is self-explanatory and less confusing than two. (From OE-Core rev: 5dc02d572794298b3362378cea3d7da654456c44) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement --vars optionEd Bartosh2015-08-301-0/+6
| | | | | | | | | | | | | | | | | 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 to produce wic images. In this case wic can't run bitbake again as it's locked, so it will get variables from .env files. (From OE-Core rev: abdfad1cd68fcd7387c2a508ab81512e8f6b93ce) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: set default imageEd Bartosh2015-08-301-2/+4
| | | | | | | | | | | 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. (From OE-Core rev: d465233579d5efa2e0578baac67f42a35ad8b993) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: deferred call of hlp.get_wic_plugins_help()Ed Bartosh2015-08-301-1/+1
| | | | | | | | | | | | | | | | | | If get_wic_plugins_help is called from wic main module it calls git_bitbake_var at some point. This fails when wic is called from bitbake as 'bitbake -e' can't be run. Moved call of this method to help.py in order to call it later, when BitbakeVariables singleton is properly initialized to get variables from .env files. (From OE-Core rev: d401a8518fb4b0e8adeb34be8948fa780299870c) 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>
* wic: release 0.2.0Ed Bartosh2015-08-091-1/+1
| | | | | | | | | | | | | | | | | Major changes in 0.2.0: - implemented UUID support - fixed support of GPT partition tables - implemented running bitbake from wic - implemented image compressing - started testing with oe-selftest. implemented 17 test cases - used native tools (parted, mkfs, mtools, etc) - usability and documentation fixes - code clenup (From OE-Core rev: a0f8cb7e0ffa15e101d39463c77707c821250203) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Code cleanup: long lines, identation and whitespacesEd Bartosh2015-07-021-9/+17
| | | | | | | | | | Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. (From OE-Core rev: db43e59f41b6bc19152cd4743585a3217015e272) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Fix confusing error messageEd Bartosh2015-07-021-7/+12
| | | | | | | | | | | | | | | | | | | | Wic throws this message when any of the build artifacts are not provided: Build artifacts not completely specified, exiting. (Use 'wic -e' or 'wic -r -b -k -n' to specify artifacts) It was not clear which artifact was not specified. Reworked the code to specify list of missed artifacts. Now the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] (From OE-Core rev: 98912687f15f6d7537746fb38499f739e1a47be9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Refactor getting bitbake variablesEd Bartosh2015-07-021-16/+5
| | | | | | | | | | | | | | | | | | Wic gets bitbake variables by parsing output of 'bitbake -e' command. This implementation improves this procedure as it runs 'bitbake -e' only when API is called and does it only once, i.e. in a "lazy" way. As parsing results are cached 'bitbake -e' is run only once and results are parsed only once per requested set of variables. get_bitbake_var became the only API call. It replaces find_artifacts, find_artifact, find_bitbake_env_lines, get_bitbake_env_lines, set_bitbake_env_lines and get_line_val calls making API much more clear. (From OE-Core rev: 3abe23bd217315246ec2d98dc9c390b85cfe6a92) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Fix misleading messageEd Bartosh2015-07-021-1/+1
| | | | | | | | | | | | | Due to usage of incorrect variable wic produces strange message "No image named None found, exiting." when specified canned .wks doesn't exist. Fixed by replacing wks_file -> argv[0] (From OE-Core rev: 2be905feff3c2166adaa8f50ad09d4b6896461ab) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>