Age | Commit message (Collapse) | Author | Files |
|
This was overlooked when f6a064d969f4149b was merged.
Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Added new parameter 'api' to sparse_copy function to specify
underlying filemap API to use. By default sparse_copy will
try both available APIs.
Added test case for sparse_copy to wic test suite.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and
would use vda if no grep result, now we have set QB_DRIVE_TYPE to
"/dev/sd" by default, and the device will be /dev/sda, so use sda to
replace vda in the test case.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When using `wic create mkefidisk -e core-image-minimal', the following
error message appeared.
Please bake it with 'bitbake parted-native' and try again.
However, following this command doesn't do any help. The same problem
still appeared.
The problem is that when we 'bitbake parted-native', it doesn't have
anything to do with core-image-minimal. And the required tool 'parted'
is not under core-image-minimal's recipe-sysroot-native directory.
Improve the error message so that following it could get things done.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
FIEMAP API is not supported by tmpfs file system, but
SEEK_HOLE/SEEK_DATA is supported.
Returned back FilemapSeek class that implements support
of SEEK_HOLE/SEEK_DATA API to make sparse_copy API working
on tmpfs again.
This reverts commit 6b80c13f7a82a312a3b981de5a56c66466ba1fac.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
These parameters are copied from the ext image class.
-D will let fsck perform further directory optimizations
-v might be helpful for debugging purpose
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
There is not much sense in creation of empty squashfs
partition. It's also not possible to create empty squashfs
partition of specified size.
Even more, prepare_empty_partition_squashfs method is
absolutely broken. It raises exception when called and
even its signature differs from the rest of of similar
methods. It means that nobody uses it and it's safe
to remove it.
Removed prepare_empty_partition_squashfs method and
testing of empty squashfs partition.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added vfat and msdos to the list of supported fstypes in
'wic help kickstart' output.
[YOCTO #11137]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Explicitly set system id 0x6(FAT16) for msdos partitions.
Removed old code that attempts to achieve the same result
using 'parted ... lba off'.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Used '-F 16' parameter for mkdosfs to create FAT16 partitions for
'msdos' partition type.
[YOCTO #11137]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added prepare_empty_partition_msdos and prepare_rootfs_msdos
methods to support 'msdos' filesystem type.
Created aliases prepare_empty_partition_vfat and prepare_rootfs_vfat
to continue supporting creation of vfat patitiions.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Fixed wic code that loops through hard-coded list of known fstypes
to find prepare_rootfs_<fstype> or prepare_empty_partition_<fstype>
methods and silently skipping unknown fstypes.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
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>
|
|
Removed unused APIs 'outs' and 'quiet'.
Removed 'catch' parameter from runner.runtool API as wic
uses only one value of it. Removed the code that handles
unused values of 'catch' parameter.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced runner.show call to exec_cmd call in bootimg-pcbios
plugin. Removed runner.show API as it's not used anywhere else.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
If bootloader artifacts are not found in default bootimg_dir
use wic-tools sysroot for the same purpose. This should
prevent wic from failing if bootloader artifacts can't be
found in image native sysroot.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed fsimage plugin and prepare_rootfs_from_fs_image API as
they duplicate functionality of rawcopy plugin. Fsimage plugin makes
wic to remove the image artifact from deployment directory, which
can cause problems too.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
FIEMAP API was added to Linux kernel 2.6.28 back in 2008
SEEK_HOLE and SEEK_DATA API was added much letter.
As FIEMAP is used by filemap module as a default API it's
safe to remove FileMpSeek class as it's never used.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Partition UUID for msdos partitioning is based on a 4 bytes long
system identifier. Wic uses random number to generate system
identifier. For the numbers starting with 0 partition uuid is
shorter, which makes wic images non-bootable as kernel expects
8 charactest in PARTUUID parameter.
Padded system identifier with '0' when generating partition UUID
to make it always 8 characters long. This should fix the boot
issue.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Fixed test failure caused by using bootimg_dir path
instead of kernel_dir to find systemd-efi bootloader:
FAIL: test_systemd_bootdisk (oeqa.selftest.wic.Wic)
...
FileNotFoundError: [Errno 2] No such file or directory:
'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share'
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Used wic-tools STAGING_DATADIR if syslinux can't be found
in default bootimg_dir.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed do_install_disk and do_configure_partition methods from
bootimage-partition, fsimage and rawcopy plugins as they're empy
and not used.
[YOCTO #10618]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
sparse_copy creates output file that is smaller than input
file when input file ends with unmapped blocks.
Used truncate(<input file size>) when output file is created
to ensure the size of output file will always be equal to
the size of input file.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
bootimg_dir is usually set to the value of STAGING_DATADIR and
kernel_dir - to the value of DEPLOY_DIR_IMAGE, so usage of
kernel_dir is more logical in bootimg-efi, bootimg-partition and
rawcopy plugins.
Replaced usage of bootimg_dir to kernel_dir in 3 above mentioned
plugins that use DEPLOY_DIR_IMAGE as a default artifact location.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Changing bootimg_dir in plugins is a dangerous hack as this
value comes from wic command line and can be used by multiple
plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Removed broken unused plugin.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This patch avoids the creation of a corrupt EXT file system.
Since there are no checks if a EXT file system was successfully created,
this should add to prevent possible system failures.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
We don't need the gap that the extended partition occupies if we
already know that we have less than five partitions. Saves up to one
full alignment of space.
Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
If we are both having a bootloader and a U-Boot environment file, we
can end up with two entries using "--source rawcopy" and "--no-table",
and since they reuse the same file [1], their cleanup handlers will
try to delete the same file twice. So make sure we only do it once.
[1] Although they reuse the same file, the resulting output is
correct, so it appears the file is accessed in properly sequential
order.
Signed-off-by: Kristian Amlie <kristian.amlie@mender.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
This patches removes the empty space in front of the copied file which
was skipped. Without this reduction it's not possible to place a
partition with rawcopy and skip parameter on a desired alignment.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Without the int() function this variable will be a string. This will led
to a error in Filemap on line 545 due wrong types.
> [...]
> File
> ".../poky/scripts/lib/wic/filemap.py", line 545, in sparse_copy
> if start < skip < end:
> TypeError: unorderable types: int() < str()
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
|
Added 3 new targets to directdisk-bootloader-config.cfg to
match hddimg syslinux config.
This is a preparation for dropping hddimg in favor of wic.
[YOCTO #11044]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Installed vesamenu.c32 and its dependencies to support
vesamenu ui in syslinux config.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced forgotten calls of logger.error with raising
WicError exception. Otherwise errors will be ignored.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Defined variable 'out' to fix this exception:
UnboundLocalError: local variable 'out' referenced before assignment
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Added search paths to the debug message to make it
easier to see where the native command is searched.
[YOCTO #11017]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Currently there is no way to specify a dependency on native
tools for wic without modifying wic-tools recipe. Obvious
way to make it more flexible is to use image sysroot and
wic-tools together to find an executable.
Modified run_native_cmd to use image and wic-tools sysroots
to find native executable.
[YOCTO #11017]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Made PluginMeta to populate global PLUGINS dictionary that
is accessed by PluginMgr. This should make the code more
understandable as PluginMgr don't need to get data directly
from PlugnMeta attribute.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
As PluginMgr class contains only one method it's
better to move it to pluginbase to have all plugin
related APIs in one module.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Store results of PluginMgr.get_plugins to avoid
loading plugins more than once.
This should speed up finding plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Call methods directly instead of getting them with
get_plugin_methods and then calling.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Throw WicError if do_create method of imager plugin is
not implemented.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Used more readable syntax to specify metaclass for
the base plugin classes.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed all private methods and complicated logic.
Put all code to get plugins into get_plugins method.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Simplified the implementation of get_plugin_methods:
- get rid of looping over the dicrtionary, used access by key instead
- get rid of filling a dictionary that passed as a parameter
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Used get_plugins('source') instead of get_source_plugins to
unify and simplify API to get plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Instead of making a singleton object of PluginMgr class
it's simpler to use PluginMgr class directly as any class
is a singleton.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Removed unused exceptions from error.py
Moved definition of WicError to lib/wic/__init__.py
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
There is no need to raise special exceptions. Raising
WicError should be enough.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|
|
Replaced sys.exit with raising WicError in wic plugins.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
|