Age | Commit message (Collapse) | Author | Files |
|
Interesting bug was found during implementation of 'include'
parser command.
Build directory was removed in do_configure_partition method of
bootimg- source plugins. This can cause removal of previously
prepared partition images if /boot partition is mentioned after
other partitions in .ks file.
Moved work directory removal to direct.py before processing
partitions.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Used partitions and configfile bootloader attributes instead of
using getters get_bootloader_file and get_partitions.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Got rid of get_rootfs and set_rootfs java-like getter and
setter. Renamed rootfs to rootfs_dir to be consistent with
the name of kickstart parameter --rootfs-dir.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
New data structure is less nested than old one.
Adjusted bootloader and partitions fields:
self.ks.handler.bootloader -> self.ks.bootoader
self.ks.handler.partitions -> self.ks.partitions
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Used KickStart parser class instead of pykickstart API.
This commit breaks wic as data structures and field names
provided by new API are a bit different from old ones.
This issue will be addressed in the following commits.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
It was wrongly assumed that part.size is meagured in Mb. In fact it's
in Kb, so there is no need to convert bitbake variable ROOTFS_SIZE as
it's also in Kb.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Wic uses bitbake variable ROOTFS_SIZE to set correspondent
partition size. This variable is a literal representing
float value. Wic crashes trying to convert it to int with
the error: invalid literal for int() with base 10: '10166.0'
Fixed this by converting variable to float and rounding result.
This should work for int and float literals.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Made short variable names longer and more readable.
Fixed pylint warnings "Invalid variable name" and
"Invalid argument name".
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Renamed variables named as Python builtin functions.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed or reworked code with unused variables.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If bitbake image is referenced in .ks file and --size is not used
there wic uses ROOTFS_SIZE variable to set minimum partition size.
ROOTFS_SIZE is calculated in meta/lib/oe/image.py when rootfs is
created. The calculation is done using other image parameters:
IMAGE_ROOTFS_SIZE, IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR
and IMAGE_ROOTFS_EXTRA_SPACE.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixed pylint warning unused-import
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Fixed pylint warnings bad-continuation, bad-continuation and
line-too-long.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Made the code to backup and restore fstab only if it's modified.
Cleaned up the code. Made it more pythonic.
Improved code readability by moving code from several tiny
methods into one place.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Wic doesn't show any information for the partition if label is not set.
Fixed this by adding mount point to the report.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Implemented compressing result image with specified compressor.
Updated reporting code to show compressed image.
[YOCTO #7593]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added 'compressor' argument to Direct plugin API to
pass a name of compressor utility.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
With this parameter it's possible to pass generated UUID
into Image class to set it for partition when it's created.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Replaced DirectImageCreator._get_boot_config private method
with a 'rootdev' property.
Simplified the code and API.
Used 'uuid' property instead of incorrectly used 'part_type'.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Names with one leasding underscore considered protected in Python.
_ptable_format is accessed outside of its class.
Made it public by removing underscore.
This pylint warning should be fixed now:
Access to a protected member _ptable_format of a client class
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Here is what PEP8(Style Guide for Python Code) says about this:
Wildcard imports (from <module> import *) should be avoided, as they
make it unclear which names are present in the namespace, confusing
both readers and many automated tools.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Used exec_native_cmd instead of find_binary_path to run parted.
Got rid of find_binary_path as it's not used anywhere else.
There are several tools wic is trying to find not only in sysroot,
but also in host root. Parted is a special as on some distros it's
installed in /usr/sbin, which is not in the user's PATH. This makes
wic to fail with error "External command 'parted' not found, exiting."
[YOCTO #7122]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixed pylint warning
'No space allowed around keyword argument assignment'
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixed pylint warning 'Unused import'
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Commit 0a6668f6e60b4195ff4163c00fc972bacdb27b4b still included some
debug and is not working properly as the new fstab is generated too
late.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
__write_fstab() is already iterating over parts. There is now need to
call it fort each parts.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
For some architectures it is necessary to reserve space on disk without
it being present in the partition table.
For example, u-boot on i.mx is placed at an offset of 1kB on the sdcard.
While it would be possible to create a partition at that offset and
place u-boot there, it would then be necessary to update the default
u-boot environment to use partition 2 on the mmc instead of partition 1.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
MMC block device partitions are named differently than other block
devices and use the scheme: mmcblk<devnum>p<partnum>, ex: mmcblk0p1,
mmcblk0p2. The current code generates incorrect parition names missing
'p' infix for fstab entries. The patch resolves this problem.
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
To support yocto on systems with python3 as default version, scripts
should use /usr/bin/env python in the shebang, as this allows the use of
a fake env to mimic python2 as default version.
This patch simply replaces occurrences of #!/usr/bin/python with
#!/usr/bin/env python and was done with this oneliner:
git grep -lE '^#!/usr/bin/python' | xargs \
sed -i 's|/usr/bin/python|/usr/bin/env python|'
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
The first iterations of wic very shortsightedly catered to two
specific use-cases and added special-purpose params for those cases so
that they could be directly given their corresponding boot artifacts.
(hdddir and staging_data_dir).
As more use-cases are added, it becomes rather obvious that such a
scheme doens't scale, and additionally causes confusion for plugin
writers.
This removes those special cases and states explicitly in the help
text that plugins are responsible for locating their own boot
artifacts.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
As well as any other stray instances of mic in the codebase that can
be removed.
We don't really need to carry around legacy naming, and the history is
in git.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
|