summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/engine.py
Commit message (Collapse)AuthorAgeFilesLines
* logging: use warning instead warnChen Qi2019-04-251-1/+1
| | | | | | | | | | | | | | | | | The warn method is deprecated. We should use the documented warning instead. Quoting from the python's official doc: """ Note: There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead. """ (From OE-Core rev: cc771aa4b74f222f1bea38b0b50196b2fbc97ab4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: Fix missing parted autobuilder failuresRichard Purdie2019-04-251-3/+5
| | | | | | | | | | | | | | | | OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842 broke the ability to find parted as it may be in sbin which is not in PATH for some users on some distros. Iterate on the original patch to fix this and also fix the original problem. (From OE-Core rev: af3803e5189d7814f9dbd238fb6dab200f351e1a) (From OE-Core rev: 68f56a4967d3121940669ca9116e759081b0b73b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine.py: Load paths from PATH environment variableWilliam Bourque2019-04-251-2/+7
| | | | | | | | | | | | | | | | | Load self.paths from environment variable and if it fails, fall back to hardcoded list. This is required for users that would need to load different e2fsprogs binaries if their system's ones are not recent enought (From OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842) (From OE-Core rev: c8331fa157b83a3ed77f77a6e884c7fbc4f1d91b) Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/wic/engine: Fix cp's target path for ext* filesystemsLeonardo Augusto2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python subprocess' shell=True defaults to /bin/sh[1][2], which often refers to a POSIX-compliant shell. As the -e flag is not defined in the POSIX standard[3], some shells may interpret "-e" as the first argument to the echo command, causing the rest of the command line to fail. In this particular case, "echo -e 'cd {}'" is interpreted as "-e cd {}", which causes the first line of the command to fail, and causing cp to always place the source file in the filesystem's root. Replacing "echo -e" for a printf command makes this more portable. This issue only affects "wic cp" for ext* filesystems. [1] https://docs.python.org/2/library/subprocess.html [2] https://docs.python.org/3/library/subprocess.html [3] http://pubs.opengroup.org/onlinepubs/9699919799 (From OE-Core rev: 9a5b703d4e60c3ccdf80b5289b8e6fc91133fcde) (From OE-Core rev: b9ccf44edccd31264890fa790d6120fc9e2c0238) Signed-off-by: Leonardo Augusto <leobsd@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: make engine.py:get_partitions() resilient to parted/dmidecode stderr outputGeoff Parker2019-04-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Running wic commands on Debian 10 systems fail in scripts/lib/wic/engine.py:get_partitions() due to new stderr output captured when trying to parse the output from /sbin/parted as a non-root user. The parted command calls the dmidecode utility, which produces this error as a non-root user: /sys/firmware/dmi/tables/smbios_entry_point: Permission denied /dev/mem: Permission denied scripts/lib/wic/engine.py:get_partitions() calls misc.py:exec_cmd(), a subprocess wrapper which returns a combined stderr and sdtdout. These messages to stderr confuse the partition table parser in get_partitions(). This patch has the partition table parser ignore lines before the expected "BYT;" header string. Running wic in Debian 9 does not have this issue. (From OE-Core rev: 6b5681533eed4e6c00e1cc7ee442c93076f1c976) Signed-off-by: Geoff Parker <geoffhp@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Support for changing the imager.Davis, Michael2019-04-251-1/+1
| | | | | | | | | | (From OE-Core rev: 30b33d787595b8c3120b73c755a432a0f0f30fa7) Signed-off-by: Michael Davis <michael.davis@essvote.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: use up all free space when expanding partitionsAnuj Mittal2018-07-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Currently we just divide up the free space by the number of partitions that need to be re-sized. This leads to problems when a user has explicitly specified a subset of partitions (but not all) that need to re-sized along with the sizes. As an example, for an image with 3 partitions, if we use: wic write image.wic /dev/sdb --expand 1:10G This would lead to paritions 2 and 3 each being re-sized to one thirds of the free space instead of half. Change the behavior to use up all the free space. (From OE-Core rev: a88f1b5d88dbc5fb28be24b9787d73b9e0cdf183) (From OE-Core rev: 167d0c4a9f45e3b8172fc34bf80f3fa587513b0a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: fix errors when expanding partitionsAnuj Mittal2018-07-301-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | The UEFI spec implies that GPT partitions should be assumed to be on a 2048 sector boundary (for a 512 byte sector) and the current logic just divides the free sectors available by the number of partitions that need re-sizing, which may or may not align and the final result might overshoot the limits imposed after alignment. Since we are expanding already aligned partitions, just divide up the free space in multiples of 2048. Also use the exec_cmd wrapper instead of the subprocess call directly. Fixes [YOCTO #12840] (From OE-Core rev: 5eef63f5afdfbab8e30748cb1bf42bf2e6524759) (From OE-Core rev: 2217c4ec7682adce1fe683233d80c6d54888300b) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine.py: improve error message when required tools are missingAnuj Mittal2018-07-021-2/+2
| | | | | | | | | | | | | | | Instead of showing that command 'None' was found, show the name of actual command that wasn't found on the host machine or at the native sysroot path provided by user. (From OE-Core rev: 3157ebb131e01e74689b1f87a35278350f315e7d) (From OE-Core rev: 73697d9e44e92b8e7c0cdd46339981f5633f09af) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement ext fs support for 'wic rm'Ed Bartosh2017-09-111-11/+16
| | | | | | | | | | | Implemented removing files or directories from the ext partition using debugfs tool. (From OE-Core rev: be530b7c7beae6f9fc95eed245cb37066d56581e) 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: implement ext fs support for 'wic cp'Ed Bartosh2017-09-111-4/+9
| | | | | | | | | | | Implemented copying files to the ext partition using debugfs tool. (From OE-Core rev: 1a2bc70e6f85f414e7af48489e24c09ff335486d) 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: implement ext fs support for 'wic ls'Ed Bartosh2017-09-111-5/+10
| | | | | | | | | | | Implemented listing directory contents for ext file system using debugfs tool. (From OE-Core rev: b591ba6f4d684aef3d7666bbdc678954e3255df5) 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: always read image partitionsEd Bartosh2017-08-271-2/+3
| | | | | | | | | | | Got rid of lazy evaluation of self.partitions property. It's not needed because partitions of the source image should be always read. (From OE-Core rev: 1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement 'wic write' commandEd Bartosh2017-08-271-0/+146
| | | | | | | | | | | | 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: extend list of used toolsEd Bartosh2017-08-271-1/+2
| | | | | | | | | | | | | | Added sfdisk, e2fsck, mkswap, resize2fs, mkdosfs to the list of used tools in Disk class. They're going to be used in 'wic write' implementation. Added dependency to util-linux to wic-tools to ensure that sfdisk and mkswap are available from wic-tools native sysroot. (From OE-Core rev: 1add68e4d6150e3038609d8ce7e3cff28fe8fbb8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: added 'fstypes' parameter to Disk.__init__Ed Bartosh2017-08-271-2/+7
| | | | | | | | | | | This parameter specifies list of supported filesystems. So far only 'fat' is supported, but 'wic write' is going to support at least 'fat', 'ext' and 'swap'. (From OE-Core rev: 7cffcdcfdf4f8934d212740a6d7cf136911ebdac) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: convert partition number to intEd Bartosh2017-08-271-2/+2
| | | | | | | | | | Converted partition number to int in order to use it as an index in the list of partitions. (From OE-Core rev: f901f23eb05cd6b86a49ef1b6ec7efaf72f6d685) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get more info from the 'parted print' outputEd Bartosh2017-08-271-1/+8
| | | | | | | | | | | Got partition type and sector sizes from the output of 'parted print'. This info may be used in the implementation of 'wic write' command. (From OE-Core rev: 5c0926d8efa468177b7cb43a5f06b35058255644) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: reimplement getting paths of used toolsEd Bartosh2017-08-271-27/+9
| | | | | | | | | | | | | | So far every used tool have to have separate property and private attribute in the Disk class. This is too verbose, considering that there will be much more tools used. Reimplemented getting tools paths using custom __getattr__ method. This is much more compact and readable. (From OE-Core rev: d1a831a9870bc31e936eb480485b28f1ffc13080) Signed-off-by: Ed Bartosh <ed.bartosh@linux.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: implement removing directoriesEd Bartosh2017-06-141-4/+18
| | | | | | | | | | | | Added support for removing directories using mdeltree utility to Disk.del method [YOCTO #11283] (From OE-Core rev: a5fc61d8f290d370f4bc51d4e2a67a5580edb1b1) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement removing filesEd Bartosh2017-06-141-1/+15
| | | | | | | | | | | | | Added implementation of Disk.del method and wic_r function that removes files from the vfat partition using mdel utility. [YOCTO #11283] (From OE-Core rev: 4abf2d2643c58322d96d63d5f3ffaf52d62c6792) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add 'wic rm' commandEd Bartosh2017-06-141-0/+7
| | | | | | | | | | | | 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: fully implement 'wic cp'Ed Bartosh2017-06-141-1/+10
| | | | | | | | | | | | | Added implementation of Disk.copy method and wic_cp function that copies files/directories to the vfat partition of the partitioned image. [YOCTO #11283] (From OE-Core rev: 416e4599960987f0ce31b3f16f3c6af0bf633a26) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add Disk._put_part_image methodEd Bartosh2017-06-141-0/+5
| | | | | | | | | | | This method copies partition image into the wic image. It will be used in 'wic cp' and 'wic rm' subcommands to copy changed partition back into wic image. (From OE-Core rev: 7a7e6635e2e2ddfff2bca58c860634b7a199b0df) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add mcopy propertyEd Bartosh2017-06-141-0/+5
| | | | | | | | | Added property that points to the mcopy executable. (From OE-Core rev: 05badb6427442388b9bea04c8b184a2ce92362ec) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: add Disk._prop helperEd Bartosh2017-06-141-5/+10
| | | | | | | | | | Added generic helper to use in property methods to access commands in a lazy manner. (From OE-Core rev: 4c1ded3ddbd04ad1640620ec1348831692a93dbe) 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/+7
| | | | | | | | | | | | 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>
* engine: implement listing wic imagesEd Bartosh2017-06-141-2/+82
| | | | | | | | | | | | | Implemented 'wic ls' functionality: - list image partitions - list directory content of vfat partitions [YOCTO #11283] (From OE-Core rev: 61667fabd5746caf773f73b3aeb2a04db13cba38) 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/+4
| | | | | | | | | | 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: Use argparse instead of optparseAndreas J. Reichel2017-05-231-5/+6
| | | | | | | | | | | | | | | | | | | * 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>
* wic: move PluginMgr class to pluginbaseEd Bartosh2017-03-041-1/+1
| | | | | | | | | | | 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>
* wic: remove PluginMgr.get_source_pluginsEd Bartosh2017-03-041-1/+1
| | | | | | | | | | 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>
* wic: use PluginMgr directlyEd Bartosh2017-03-041-3/+3
| | | | | | | | | | | 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>
* 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 core modulesEd Bartosh2017-03-041-12/+9
| | | | | | | | | 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>
* wic: remove msger moduleEd Bartosh2017-03-041-4/+0
| | | | | | | | | | 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>
* wic: use wic logger in core modulesEd Bartosh2017-03-041-8/+11
| | | | | | | | | 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>
* wic: remove unused argument scripts_pathEd Bartosh2017-02-151-4/+3
| | | | | | | | | | | | | | 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-16/+16
| | | | | | | | | | | | | | | | | | | | | | | 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: engine: create output dirEd Bartosh2017-02-021-0/+3
| | | | | | | | | | | 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>
* wic: code cleanupEd Bartosh2017-02-021-1/+1
| | | | | | | | | | | 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>
* wic: move oe/misc.py one level upEd Bartosh2017-02-021-2/+2
| | | | | | | | | | | | 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: move 2 APIs to wic.engineEd Bartosh2017-02-021-1/+32
| | | | | | | | | | | | 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>
* wic: look for wks files in <layer>/wicEd Bartosh2016-12-221-2/+5
| | | | | | | | | | | | | | | | Currently wic looks for wks files in <layer dir>/scripts/lib/wic/canned-wks/ directories. This path is too nested and doesn't look consistent with the naming scheme of layer directories. Added <layer>/wic directory to the list of paths to look for wks files. (From OE-Core rev: 803b5fa798cf7580c7c10401eb04a1cccf51b8ab) 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: implement --bmap optionEd Bartosh2016-05-191-3/+8
| | | | | | | | | | | | 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-10/+10
| | | | | | | | | | | | | 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: fix short variable namesEd Bartosh2015-09-031-32/+30
| | | | | | | | | | | | 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-36/+19
| | | | | | | | | | | | | 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 redefined-builtinEd Bartosh2015-09-031-9/+9
| | | | | | | | | Renamed variables named as Python builtin functions. (From OE-Core rev: bed98142e3e47ac2862ccf8fe3e4bdeabfc91172) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>