aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/ksparser.py
AgeCommit message (Collapse)Author
2017-12-18wic: Introduce --fsuuid and have --use-uuid make use of UUID tooTom Rini
First, allow for wic to be given a filesystem UUID to be used when creating a filesystem. When not provided, wic will generate the UUID to be used. Next, when --use-uuid is passed, we update the fstab to mount things via UUID (and if not found, then use PARTUUID) as UUID is more portable. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-12-18wic: kparser.py: Check for SquashFS and use-uuidTom Rini
The SquashFS filesystem does not support UUIDs so make this combination be an error. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05wic: add 'part-name' argument for naming GPT partitionsArtur Mądrzak
The WIC's 'part' can now give a name for GPT partition in WKS file. It's similar to '--label', but is naming partintions instead file systems. It's required by some bootloaders to partitions have specified names. Signed-off-by: Artur Mądrzak <artur@madrzak.eu> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21wic: implement wks option --mkfs-extraoptsEd Bartosh
This option specifies extra options to pass to mkfs.<fstype> utilities. [YOCTO #11709] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-23wic: remove extra double-quote on documentation stringJean-Francois Dagenais
Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-31wic: allow only supported fstypesEd Bartosh
Restricted possible values of --fstype to the list of supported types. This should catch incorrect values when .wks file is being parsed. Removed checks for empty fstype and mentioning of unsupported fstype 'ontrackdm6aux3'. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-03-04wic: use wic logger in core modulesEd Bartosh
Replaced msger with wic logger in the core wic modules. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-02-15wic: ksparser: set default disk to 'sda'Ed Bartosh
Set default value of --ondisk to 'sda' to ensure we always have disk name for the partition. This is a first step of replacing --ondisk with disk <name> attribute of .wks. This is better as all partitions share the same disk. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-02-15wic: Add --exclude-path option to rootfs source plugin.Kristian Amlie
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. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-02-02wic: move 2 APIs to wic.engineEd Bartosh
Moved find_canned and get_custom_config APIs to engine module. Removed empty wic.utils.misc module. [YOCTO #10619] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-12-22wic: add --fixed-size wks optionMaciej Borzecki
Added new option --fixed-size to wks. The option can be used to indicate the exact size of a partition. The option cannot be added together with --size, in which case an error will be raised. Other options that influence automatic partition size (--extra-space, --overhead-factor), if specifiec along with --fixed-size, will raise an error. If it partition data is larger than the amount of space specified with --fixed-size option wic will raise an error. Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20wic: mountpoint is an optional argumentMaciej Borzecki
According to wic documentation partition mount point is an optional argument. Skipping mount point also makes sense in certain configurations when one needs to specify a partition that is not mounted by the running system, such as a recovery or a mirror partition (in dual rootfs setups). Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-05-14wic: don't use L suffix for integersEd Bartosh
This suffix is not supported by Python 3. Wic code works without it on Python 2 too, so it's safe to remove it. [YOCTO #9412] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14wic: don't inherit classes from objectEd Bartosh
All classes in Python3 are new style classes and don't need to be inherited from object. Wic code works fine without this inheritance even with Python2, so it's harmless to remove it. [YOCTO #9412] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29wic: add --system-id wks optionEd Bartosh
Added new option --system-id to wks parser. The option will be used to set partition system id. [YOCTO #9096] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-03-28wic: fix type of no-table optionEd Bartosh
Type of --no-table option was incorrectly set in new wks parser. It causes parser to require argument for this option, which makes wic to fail with wks files that use --no-table: Error: argument --no-table: expected one argument Changed action parameter to 'store_true' to fix the issue. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04wic: default to empty bootloader configMaciej Borzecki
A kickstart file for non-x86 boards may have no 'bootloader' stanza. It is the usual case if bootloader is setup using other mechanism than through wic, and is for instance a part of u-boot configuration. In such case the 'bootloader' field in the KickStart class will be uninitialized. Instead of adding an empty bootloader line in every kickstart file call the bootloader parser with empty argument list to get defaults namespace. Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-19wic: pylinted ksparser moduleEd Bartosh
Added missing docstrings, fixed wrong indentation and long lines. Final pylint score is 9.89/10 Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: implement search of includesEd Bartosh
Used custom argument type to implement search of include .wks files in canned wks paths. Include files can be specified either by full path or by name. [YOCTO #8848] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: ksparser: add support for includeEd Bartosh
Extended parser to support inclusion of .ks files: recursively called self._parse to parse included .ks Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: use unique partition numberEd Bartosh
This is a preparation for 'include' support. Used unique counter instead of line number for partitions in .ks file. Line numbers can be equal for different .ks files, which can cause problems if one .ks file is included into another. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: move wks parsing code to KickStart._parseEd Bartosh
This is a preparation for implementation of include statement. Parser will be called recursively to parse included .wks files, so it should be available as a method. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: rename kickstarter.py -> ksparser.pyEd Bartosh
kickstarter.py was not the best name for this module as previously there was a directory with the same name in scripts/lib/wic/. All files were removed from it, but .pyc files could still stay there causing imports from wic.kickstart to fail with ImportError: cannot import name KickStart. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>