[OE-core] [wic][PATCH 6/6] wic: oe-selftest: Test image compressing

2015-06-23 Thread Ed Bartosh
Added 4 new testcases for 'wic --compress-with compressor' functionality. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 47b70fd..5385562 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest

[OE-core] [wic][PATCH 2/6] wic: Add new argument to wic_create function

2015-06-23 Thread Ed Bartosh
Added 'compressor' argument to wic_create to pass a name of compressor utility to the wic engine. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 29099ee..047c40d 100644 --- a/scripts/lib/image/engine.py +++ b

[OE-core] [wic][PATCH 3/6] wic: Add new argument to direct plugin

2015-06-23 Thread Ed Bartosh
Added 'compressor' argument to Direct plugin API to pass a name of compressor utility. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 047c40d..d5c34b4 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib

[OE-core] [wic][PATCH 1/6] wic: Add --compress-with command line option

2015-06-23 Thread Ed Bartosh
Added -c/--compress-with command line option to 'wic create' subcommand. This option is used to specify compressor utility to compress the image produced by wic. gzip, bzip2 and xz compressors are supported in this implementation. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git

[OE-core] [wic][PATCH 0/6] Implemented image compressing: poky-contrib:ed/wic/compress-with

2015-06-23 Thread Ed Bartosh
. Fixes [YOCTO #7593] Note: This patchset depends on poky-contrib:ed/wic/misc Ed Bartosh (6): wic: Add --compress-with command line option wic: Add new argument to wic_create function wic: Add new argument to direct plugin wic: Implement image compressing wic: Make code more pythonic wic: oe

[OE-core] [PATCH] image-live: Set syslinux timeout to 5s

2015-06-10 Thread Ed Bartosh
Increased syslinux timeout to 5s as 1s default 1s timeout is not enough to notice syslinux prompt on some devices. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/classes/image-live.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/image

[OE-core] [PATCH] initramfs-live-install: Add gptdisk to initramfs

2015-06-10 Thread Ed Bartosh
This is a part of the work to support partiion UUID in installer. gptdisk is going to be used to get partition UUID. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb | 2 +- meta/recipes-core/initrdscripts/initramfs-live

[OE-core] [PATCH] init-install-efi: Implement UUID support

2015-06-10 Thread Ed Bartosh
. Used partition UUID in kernel command line to specify root partition. Used partition UUID in /etc/fstab to specify boot and swap partitions. [YOCTO #6101] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- .../recipes-core/initrdscripts/files/init-install-efi.sh | 16 1

[OE-core] [wic][PATCH] wic: Document creation of empty partition

2015-06-16 Thread Ed Bartosh
Added short explanation of how to create empty pattition to the 'wic help kickstart' command output. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/image/help.py | 4 1 file changed, 4 insertions(+) diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py

[OE-core] [wic][PATCH v2] wic: Document creation of empty partition

2015-06-16 Thread Ed Bartosh
Added short explanation of how to create empty pattition to the 'wic help kickstart' output. [YOCTO #7131] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/image/help.py | 4 1 file changed, 4 insertions(+) diff --git a/scripts/lib/image/help.py b/scripts/lib/image

[OE-core] [wic][PATCH v2] wic: Return error code when wic fails to invoke command

2015-06-16 Thread Ed Bartosh
Return 1 if command doesn't exist or wic is called without any commmand. Return result of invoke_command as wic return code. Added tests for unsupported command and no command. Fixed typo in test case test02_createhelp spotted by this fix. [YOCTO #7856] Signed-off-by: Ed Bartosh ed.bart

[OE-core] [wic][PATCH] wic: Code cleanup: bad-classmethod-argument

2015-06-17 Thread Ed Bartosh
Fixed wrong name for the first argument in class methods. Pylint complains about the issue this way: Class method should have 'cls' as first argument Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/pluginbase.py | 8 scripts/lib/wic

[OE-core] [wic][PATCH] wic: code cleanup: superfluous-parens

2015-06-17 Thread Ed Bartosh
Removed unncecessary parents after 'if' 'del' and 'print' keywords. Fixed pyling warning: Unnecessary parens after 'xxx' keyword Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/image/engine.py| 6 +++--- scripts/lib/image/help.py

[OE-core] [wic][PATCH] wic: Add missing docstrings to plugin classes

2015-06-17 Thread Ed Bartosh
Docstings from plugin classes are used as part of output of 'wic help plugins'. Adding them makes help page more informative. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/plugins/imager/direct_plugin.py | 9 + scripts/lib/wic/plugins/source/bootimg-efi.py

[OE-core] [wic][PATCH] wic: Integrated plugin docstrings into 'wic help plugins' output

2015-06-17 Thread Ed Bartosh
Added mechanism to show docstrings of plugin classes as a part of plugins help page. For missing plugins the following warning message is shown: class 'plugin class spec' is missing docstring. [YOCTO #7118] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/image/help.py | 18

[OE-core] [wic][PATCH] wic: removed unused command line option

2015-06-17 Thread Ed Bartosh
Removed -i/--infile wic command line option. Removed properties_file and properties arguments of wic_create function. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/image/engine.py | 7 ++- scripts/wic | 8 +++- 2 files changed, 5 insertions(+), 10

[OE-core] [PATCH 09/10] init-install: code cleanup: Replace tabs with spaces

2015-06-15 Thread Ed Bartosh
Cleaned up spaces from init-install* shell scripts. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index a6a8679..dca1432 100644 --- a/meta/recipes-core

[OE-core] [PATCH 10/10] init-install: code cleanup: replace /dev/$device - $device

2015-06-15 Thread Ed Bartosh
Shortened code by including /dev/ prefix into variable. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index dca1432..74372b0 100644 --- a/meta/recipes-core

[OE-core] [PATCH 07/10] init-install: Specify filesystem type in parted command line

2015-06-15 Thread Ed Bartosh
Explicitly specified filesystem type for parted mkpart command. This makes partition table to look more informative. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install

[OE-core] [PATCH 08/10] init-install: Specify partition name in parted command line

2015-06-15 Thread Ed Bartosh
parted allows to use names for partitions if GPT partition table is used on the device. msdos partitioning can have only partition types: 'primary', 'logical' or 'extended'. Used meaningful partition names in parted command line for GPT partitioning. Signed-off-by: Ed Bartosh ed.bart

[OE-core] [PATCH 04/10] init-install-efi: Implement UUID support

2015-06-15 Thread Ed Bartosh
. Used partition UUID in kernel command line to specify root partition. Used partition UUID in /etc/fstab to specify swap partition. Used filesystem UUID in /etc/fstab to specify boot partition. [YOCTO #6101] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core

[OE-core] [PATCH 02/10] initramfs-live-install: Add blkid to initramfs

2015-06-15 Thread Ed Bartosh
Added util-linux-blkid to the list of dependencies of initramfs-live-install and initramfs-live-install-efi. This is a part of the work to support partiion UUID in installer. blkid is going to be used to get partition and filesystem UUIDs. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com

[OE-core] [PATCH 06/10] init-install: Implement UUID support

2015-06-15 Thread Ed Bartosh
Used partition UUID in kernel command line to specify root partition. Searched root device by file system uuid in GRUB configuration. Used partition UUID in /etc/fstab to specify swap partition. Used filesystem UUID in /etc/fstab to specify boot partition. [YOCTO #6101] Signed-off-by: Ed Bartosh

[OE-core] [PATCH 00/10] UUID support in installer (poky-contrib: ed/oe-core/uuid-init-install)

2015-06-15 Thread Ed Bartosh
included into the patchset: [OE-core] [PATCH] image-live: Set syslinux timeout to 5s [OE-core] [PATCH] initramfs-live-install: Add gptdisk to initramfs [OE-core] [PATCH] init-install-efi: Implement UUID support Please review Ed Bartosh (10): image-live: Set syslinux timeout to 5s

[OE-core] [PATCH 05/10] init-install: Use GPT table with GRUB 2

2015-06-15 Thread Ed Bartosh
Changed partition type from 'msdos' to 'gpt'. Added special partition for grub stage2 bootloader. NOTE: This is done only for GRUB 2 as legacy GRUB is rarely used and doesn't support GPT partitions. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core

[OE-core] [PATCH 03/10] busybox: Enable UUID-related options

2015-06-15 Thread Ed Bartosh
Enabled MOUNT_LABEL and VOLUMEID* features for busybox mount to understand 'UUID=' syntax in fstab. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig index c200ee0..468c40e 100644

[OE-core] [PATCH 01/10] image-live: Set syslinux timeout to 5s

2015-06-15 Thread Ed Bartosh
Increased syslinux timeout to 5s as default 1s timeout is not enough to notice syslinux prompt on some devices. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass index 7b770fb..52b6de7 100644 --- a/meta/classes

[OE-core] [wic][PATCH] oe-selftest: wic: Fix testcase

2015-06-16 Thread Ed Bartosh
Fixed test05_build_artifacts testcase by using values of MACHINE and BUILD_SYS bitbake variables in paths to artifacts. Test was failing because of hardcoded machine(qemux86) and build_sys(qemux86-poky-linux) in artifact paths. [YOCTO #7730] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com

[OE-core] [PATCH v2 08/11] init-install: Specify partition name in parted command line

2015-06-16 Thread Ed Bartosh
parted allows to use names for partitions if GPT partition table is used on the device. msdos partitioning can have only partition types: 'primary', 'logical' or 'extended'. Used meaningful partition names in parted command line for GPT partitioning. Signed-off-by: Ed Bartosh ed.bart

[OE-core] [PATCH v2 10/11] init-install: code cleanup: replace /dev/$device - $device

2015-06-16 Thread Ed Bartosh
Shortened code by including /dev/ prefix into variable. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index dca1432..74372b0 100644 --- a/meta/recipes-core

[OE-core] [PATCH v2 07/11] init-install: Specify filesystem type in parted command line

2015-06-16 Thread Ed Bartosh
Explicitly specified filesystem type for parted mkpart command. This makes partition table to look more informative. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install

[OE-core] [PATCH v2 04/11] init-install-efi: Implement UUID support

2015-06-16 Thread Ed Bartosh
. Used partition UUID in kernel command line to specify root partition. Used partition UUID in /etc/fstab to specify swap partition. Used filesystem UUID in /etc/fstab to specify boot partition. [YOCTO #6101] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core

[OE-core] [PATCH v2 09/11] init-install: code cleanup: Replace tabs with spaces

2015-06-16 Thread Ed Bartosh
Cleaned up spaces from init-install* shell scripts. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index a6a8679..dca1432 100644 --- a/meta/recipes-core

[OE-core] [PATCH v2 01/11] image-live: Set syslinux timeout to 5s

2015-06-16 Thread Ed Bartosh
Increased syslinux timeout to 5s as default 1s timeout is not enough to notice syslinux prompt on some devices. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass index 7b770fb..52b6de7 100644 --- a/meta/classes

[OE-core] [PATCH v2 00/11] UUID support in installer (poky-contrib: ed/oe-core/uuid-init-install)

2015-06-16 Thread Ed Bartosh
included into the patchset: [OE-core] [PATCH] image-live: Set syslinux timeout to 5s [OE-core] [PATCH] initramfs-live-install: Add gptdisk to initramfs [OE-core] [PATCH] init-install-efi: Implement UUID support Ed Bartosh (11): image-live: Set syslinux timeout to 5s initramfs-live

[OE-core] [PATCH v2 05/11] init-install: Use GPT table with GRUB 2

2015-06-16 Thread Ed Bartosh
Changed partition type from 'msdos' to 'gpt'. Added special partition for grub stage2 bootloader. NOTE: This is done only for GRUB 2 as legacy GRUB is rarely used and doesn't support GPT partitions. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core

[OE-core] [PATCH v2 11/11] init-install: Properly delete partition table

2015-06-16 Thread Ed Bartosh
Fixed deletion of the partition table by increasing amount of sectors from 2(correct for msdos PT) to 35 as GPT size is 34 sectors + 1 sector for protective MBR. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta

[OE-core] [PATCH v2 06/11] init-install: Implement UUID support

2015-06-16 Thread Ed Bartosh
Used partition UUID in kernel command line to specify root partition. Searched root device by file system uuid in GRUB configuration. Used partition UUID in /etc/fstab to specify swap partition. Used filesystem UUID in /etc/fstab to specify boot partition. [YOCTO #6101] Signed-off-by: Ed Bartosh

[OE-core] [PATCH v2 03/11] busybox: Enable UUID-related options

2015-06-16 Thread Ed Bartosh
Enabled MOUNT_LABEL and VOLUMEID* features for busybox mount to understand 'UUID=' syntax in fstab. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig index c200ee0..468c40e 100644

[OE-core] [PATCH v2 02/11] initramfs-live-install: Add blkid to initramfs

2015-06-16 Thread Ed Bartosh
Added util-linux-blkid to the list of dependencies of initramfs-live-install and initramfs-live-install-efi. This is a part of the work to support partiion UUID in installer. blkid is going to be used to get partition and filesystem UUIDs. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com

[OE-core] [wic][PATCH] wic: do not strip traceback

2015-05-27 Thread Ed Bartosh
Printing only first 5 levels of wic traceback makes it almost useless as the most valuable part of it is stripped. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/wic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wic b/scripts/wic index 1e07dfe

[OE-core] [wic][PATCH] wic: refactored processing of wic exceptions

2015-05-27 Thread Ed Bartosh
standard python traceback. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/errors.py | 34 -- scripts/wic | 11 +-- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/scripts/lib/wic/utils

[OE-core] [wic][PATCH 3/7] wic: Add gpt to the list of supported partition table formats

2015-06-02 Thread Ed Bartosh
Only msdos partition table format was supported by wic source plugins. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index 2fc0357..22c7b0a 100644 --- a/scripts/lib/wic/plugins

[OE-core] [wic][PATCH 4/7] wic: Use gptmbr.bin MBR for gpt partitions

2015-06-02 Thread Ed Bartosh
Used proper syslinux MBR gptmbr.bin for GPT partitons. Added check for unsupported partition formats. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index c28b9af..ab62b7a

[OE-core] [wic][PATCH 6/7] wic: create directdisk-gpt.wks

2015-06-02 Thread Ed Bartosh
directdisk-gpt is the same as directdisk with only one difference: it uses GPT partition table. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com create mode 100644 scripts/lib/image/canned-wks/directdisk-gpt.wks diff --git a/scripts/lib/image/canned-wks/directdisk-gpt.wks b/scripts/lib

[OE-core] [wic][PATCH 5/7] wic: Make _ptable_format public

2015-06-02 Thread Ed Bartosh
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.bart

[OE-core] [wic][PATCH 1/7] wic: set legacy_boot flag for gpt partitions

2015-06-02 Thread Ed Bartosh
This flag is used to tell special purpose software that the GPT partition may be bootable. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index 1c9e3ea..06d4eac 100644 --- a/scripts/lib/wic/utils

[OE-core] [wic][PATCH 2/7] wic: check if part_type is set only for msdos partition table

2015-06-02 Thread Ed Bartosh
Specifying partition type(GUID) makes sense for gpt partition table. Current code checks if part-type is specified and throws exception if it is. This makes sense to do only for msdos partition table. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils

[OE-core] [wic][PATCH 0/7] wic: Fixed support of GPT partition table

2015-06-02 Thread Ed Bartosh
Hi, This is a set of fixes for GPT partition table support in wic. Added new canned .wks and correspondent testcase were added to the codebase. Result direct-gpt core-minimal image was successfully booted on NUC. Ed Bartosh (7): wic: set legacy_boot flag for gpt partitions wic: check

[OE-core] [wic][PATCH 7/7] wic: Test creation of directdisk image with GPT table

2015-06-02 Thread Ed Bartosh
Added new wic testcase to the sute - creation of directdisk-gpt image. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index a2ce2cb..e97dd1d 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest

[OE-core] [wic][PATCH v2 20/20] wic: Code cleanup: unused imports

2015-06-30 Thread Ed Bartosh
Fixed pylint warning unused-import Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 0dc7920..73e8f8b 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -30,18 +30,10 @@ import os

[OE-core] [wic][PATCH v2 13/20] wic: Remove duplicated code

2015-06-30 Thread Ed Bartosh
Moved duplicated code of geting rootfs size out of prepare_rootfs* methods. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 4e8a6a8..72f617a 100644

[OE-core] [wic][PATCH v2 15/20] wic: Add --uuid partition option

2015-06-30 Thread Ed Bartosh
Added --uuid option to the configuration of wks parser. This option specifies partition UUID. The code to process it is already in place. It was implemented for --use-uuid option. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/help.py b/scripts/lib/image

[OE-core] [wic][PATCH v2 18/20] wic: Fix confusing error message

2015-06-30 Thread Ed Bartosh
the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/wic b/scripts/wic index b75d122..ac272c6 100755 --- a/scripts/wic +++ b/scripts/wic

[OE-core] [wic][PATCH v2 16/20] wic: Refactor fstab update code

2015-06-30 Thread Ed Bartosh
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.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b

[OE-core] [wic][PATCH v2 12/20] wic: Refactor prepare_empty_partition API

2015-06-30 Thread Ed Bartosh
Moved code out of prepare_empty_partition* methods to avoid code duplication. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 0741bb2..4e8a6a8 100644

[OE-core] [wic][PATCH v2 11/20] wic: Call methods better way

2015-06-30 Thread Ed Bartosh
Shortened code by using getattr to obtain a method to call for prepare_empty_partition_* and prepare_rootfs_* methods. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH v2 14/20] wic: Fix naming conflict

2015-06-30 Thread Ed Bartosh
Image file name is not unique for the partitions without label. This causes image being rewritten and used as a source for all partitions without label. Wic produces broken or incorrect result images because of that. Added wks line number to the image name to make it unique. Signed-off-by: Ed

[OE-core] [wic][PATCH v2 17/20] wic: Remove __write_partition method

2015-06-30 Thread Ed Bartosh
Moved code of __write_partition to 'assemble' method. This way it should be more readable. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index d61087a..ca4b1f0 100644 --- a/scripts/lib/wic/utils

[OE-core] [wic][PATCH v2 02/20] wic: Test rootfs plugin using image recipes

2015-06-30 Thread Ed Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com create mode 100644 scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest

[OE-core] [wic][PATCH v2 06/20] wic: Remove annoing debug message

2015-06-30 Thread Ed Bartosh
Wic tries to find plugins in every layer and prints a message 'Plugin dir is not a directory or does not exist' if layer doesn't have plugin dir. It causes a lot of duplicated messages in the debug output, which makes it hard to find useful info there. Signed-off-by: Ed Bartosh ed.bart

[OE-core] [wic][PATCH v2 10/20] wic: Get rid of useless variable 'image_rootfs'

2015-06-30 Thread Ed Bartosh
Removed useless variable 'image_rootfs' from 4 prepare_rootfs_* methods. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 489ebe3..e3ae3ce 100644 --- a/scripts

[OE-core] [wic][PATCH v2 09/20] wic: Rename partition images

2015-06-30 Thread Ed Bartosh
Renamed partition images into final image.ppartition number This should make output directory look more organized and easier to understand. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index

[OE-core] [wic][PATCH v2 00/20] miscellaneous fixes. poky-conrib:ed/wic/misc

2015-06-30 Thread Ed Bartosh
to Christopher Larson to point that out to me - added one indentation fix Ed Bartosh (20): wic: Fix misleading message wic: Test rootfs plugin using image recipes wic: Test rootfs plugin using rootfs paths wic: Refactor getting bitbake variables wic: Include mount point into image report wic

[OE-core] [wic][PATCH v2 03/20] wic: Test rootfs plugin using rootfs paths

2015-06-30 Thread Ed Bartosh
Added testcase to create multi-rootfs images using rootfs plugin with paths to rootfs directories in wic command line. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 3cfc2ff..0c503ef 100644 --- a/meta/lib/oeqa

[OE-core] [wic][PATCH v2 08/20] wic: Refactor prepare_rootfs API

2015-06-30 Thread Ed Bartosh
Moved code out of prepare_roots* methods to avoid code duplication. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 324ea69..489ebe3 100644 --- a/scripts/lib

[OE-core] [wic][PATCH v2 07/20] wic: Turn off debug output for 'bitbake -e'

2015-06-30 Thread Ed Bartosh
Switched debug level to 'normal' to prevent huge 'bitbake -e' output to go into wic debug output. This should help to make wic debug info much more clean and easier to read. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils

[OE-core] [wic][PATCH v2 04/20] wic: Refactor getting bitbake variables

2015-06-30 Thread Ed Bartosh
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. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff

[OE-core] [wic][PATCH v2 05/20] wic: Include mount point into image report

2015-06-30 Thread Ed Bartosh
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.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 2ea7e4e..58a9e9d 100644

[OE-core] [wic][PATCH v2 01/20] wic: Fix misleading message

2015-06-30 Thread Ed Bartosh
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] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/wic b/scripts/wic index f9be972..a39ec95

[OE-core] [wic][PATCH v2 19/20] wic: Code cleanup: long lines, identation and whitespaces

2015-06-30 Thread Ed Bartosh
Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 92dcc5a..0dc7920 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image

Re: [OE-core] [wic][PATCH 04/20] wic: Refactor getting bitbake variables

2015-06-30 Thread Ed Bartosh
Hi Cristopher, On Mon, Jun 29, 2015 at 02:48:30PM -0700, Christopher Larson wrote: On Mon, Jun 29, 2015 at 12:10 PM, Ed Bartosh ed.bart...@linux.intel.com wrote: +global _BITBAKE_VARS + +if image not in _BITBAKE_VARS: In general, I’d suggest using a cache class/object

[OE-core] [wic][PATCH 19/20] wic: Code cleanup: long lines, identation and whitespaces

2015-06-29 Thread Ed Bartosh
Fixed pylint warnings bad-continuation, bad-continuation and line-too-long. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 92dcc5a..0dc7920 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image

[OE-core] [wic][PATCH 20/20] wic: Code cleanup: unused imports

2015-06-29 Thread Ed Bartosh
Fixed pylint warning unused-import Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py index 0dc7920..73e8f8b 100644 --- a/scripts/lib/image/engine.py +++ b/scripts/lib/image/engine.py @@ -30,18 +30,10 @@ import os

[OE-core] [wic][PATCH 04/20] wic: Refactor getting bitbake variables

2015-06-29 Thread Ed Bartosh
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. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff

[OE-core] [wic][PATCH 09/20] wic: Rename partition images

2015-06-29 Thread Ed Bartosh
Renamed partition images into final image.ppartition number This should make output directory look more organized and easier to understand. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index

[OE-core] [wic][PATCH 06/20] wic: Remove annoing debug message

2015-06-29 Thread Ed Bartosh
Wic tries to find plugins in every layer and prints a message 'Plugin dir is not a directory or does not exist' if layer doesn't have plugin dir. It causes a lot of duplicated messages in the debug output, which makes it hard to find useful info there. Signed-off-by: Ed Bartosh ed.bart

[OE-core] [wic][PATCH 00/20] miscellaneous fixes. poky-conrib:ed/wic/misc

2015-06-29 Thread Ed Bartosh
Hi, This patchset includes usability fixes, new functionality, code cleanup, refactoring and 2 new test cases for wic. The work was done during verification of multi-rootfs EFI images. Fixes YOCTO #7854 and #7912 Ed Bartosh (20): wic: Fix misleading message wic: Test rootfs plugin using

[OE-core] [wic][PATCH 11/20] wic: Call methods better way

2015-06-29 Thread Ed Bartosh
Shortened code by using getattr to obtain a method to call for prepare_empty_partition_* and prepare_rootfs_* methods. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands

[OE-core] [wic][PATCH 03/20] wic: Test rootfs plugin using rootfs paths

2015-06-29 Thread Ed Bartosh
Added testcase to create multi-rootfs images using rootfs plugin with paths to rootfs directories in wic command line. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index 3cfc2ff..0c503ef 100644 --- a/meta/lib/oeqa

[OE-core] [wic][PATCH 01/20] wic: Fix misleading message

2015-06-29 Thread Ed Bartosh
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] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/wic b/scripts/wic index f9be972..a39ec95

[OE-core] [wic][PATCH 05/20] wic: Include mount point into image report

2015-06-29 Thread Ed Bartosh
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.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 2ea7e4e..58a9e9d 100644

[OE-core] [wic][PATCH 02/20] wic: Test rootfs plugin using image recipes

2015-06-29 Thread Ed Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com create mode 100644 scripts/lib/image/canned-wks/directdisk-multi-rootfs.wks diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest

[OE-core] [wic][PATCH 15/20] wic: Add --uuid partition option

2015-06-29 Thread Ed Bartosh
Added --uuid option to the configuration of wks parser. This option specifies partition UUID. The code to process it is already in place. It was implemented for --use-uuid option. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/image/help.py b/scripts/lib/image

[OE-core] [wic][PATCH 08/20] wic: Refactor prepare_rootfs API

2015-06-29 Thread Ed Bartosh
Moved code out of prepare_roots* methods to avoid code duplication. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 324ea69..489ebe3 100644 --- a/scripts/lib

[OE-core] [wic][PATCH 12/20] wic: Refactor prepare_empty_partition API

2015-06-29 Thread Ed Bartosh
Moved code out of prepare_empty_partition* methods to avoid code duplication. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 0741bb2..4e8a6a8 100644

[OE-core] [wic][PATCH 17/20] wic: Remove __write_partition method

2015-06-29 Thread Ed Bartosh
Moved code of __write_partition to 'assemble' method. This way it should be more readable. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index d61087a..ca4b1f0 100644 --- a/scripts/lib/wic/utils

[OE-core] [wic][PATCH 18/20] wic: Fix confusing error message

2015-06-29 Thread Ed Bartosh
the message looks like this: The following build artifacts are not specified: bootimg-dir, kernel-dir, native-sysroot [YOCTO #7912] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/wic b/scripts/wic index b75d122..ac272c6 100755 --- a/scripts/wic +++ b/scripts/wic

[OE-core] [wic][PATCH 16/20] wic: Refactor fstab update code

2015-06-29 Thread Ed Bartosh
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.bart...@linux.intel.com diff --git a/scripts/lib/wic/imager/direct.py b

[OE-core] [wic][PATCH 13/20] wic: Remove duplicated code

2015-06-29 Thread Ed Bartosh
Moved duplicated code of geting rootfs size out of prepare_rootfs* methods. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 4e8a6a8..72f617a 100644

[OE-core] [wic][PATCH 14/20] wic: Fix naming conflict

2015-06-29 Thread Ed Bartosh
Image file name is not unique for the partitions without label. This causes image being rewritten and used as a source for all partitions without label. Wic produces broken or incorrect result images because of that. Added wks line number to the image name to make it unique. Signed-off-by: Ed

[OE-core] [wic][PATCH 10/20] wic: Get rid of useless variable 'image_rootfs'

2015-06-29 Thread Ed Bartosh
Removed useless variable 'image_rootfs' from 4 prepare_rootfs_* methods. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py index 489ebe3..e3ae3ce 100644 --- a/scripts

[OE-core] [wic][PATCH 07/20] wic: Turn off debug output for 'bitbake -e'

2015-06-29 Thread Ed Bartosh
Switched debug level to 'normal' to prevent huge 'bitbake -e' output to go into wic debug output. This should help to make wic debug info much more clean and easier to read. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com diff --git a/scripts/lib/wic/utils/oe/misc.py b/scripts/lib/wic/utils

[OE-core] [PATCH v2] oe-selftest: Build wic runtime requirements and images before testing

2015-05-21 Thread Ed Bartosh
Some native tools (syslinux, parted, mtools, etc) are required by wic to produce images. Unit tests fail if the tools are not available. Baked tools and image-core-minimal used by wic before running tests. [YOCTO #7730] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oeqa

[OE-core] [PATCH] oe-selftest: Build wic runtime requirements and images before testing

2015-05-21 Thread Ed Bartosh
Some native tools (syslinux, parted, mtools, etc) are required by wic to produce images. Unit tests fail if the tools are not available. Baked tools and image-core-minimal used by wic before running tests. [YOCTO #7730] Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oeqa

[OE-core] [PATCH 16/17] wic: use bitbake variable ROOTFS_SIZE

2015-08-20 Thread Ed Bartosh
, IMAGE_ROOTFS_ALIGNMENT, IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/imager/direct.py | 14 ++ 1 file changed, 14 insertions(+) diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 57b1335

[OE-core] [PATCH 02/17] oe-selftest: test generation of image.env

2015-08-20 Thread Ed Bartosh
Added test case to check if image.env file is generated and contains bitbake variables used in wic code. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- meta/lib/oeqa/selftest/wic.py | 20 1 file changed, 20 insertions(+) diff --git a/meta/lib/oeqa/selftest/wic.py

[OE-core] [PATCH 00/17] Build wic images with bitbake

2015-08-20 Thread Ed Bartosh
) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wic/wic-image-type http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wic-image-type Ed Bartosh (17): image.py: write bitbake variables to .env file oe-selftest: test generation of image.env wic

[OE-core] [PATCH 05/17] wic: create new method _parse_line

2015-08-20 Thread Ed Bartosh
Moved code that parses one line of 'bitbake -e' output to separate method _parse_line. This method will be also used later to parse lines of .env files. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/lib/wic/utils/oe/misc.py | 27 +-- 1 file changed, 17

[OE-core] [PATCH 07/17] wic: set default image

2015-08-20 Thread Ed Bartosh
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. Signed-off-by: Ed Bartosh ed.bart...@linux.intel.com --- scripts/wic | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

<    1   2   3   4   5   6   7   8   9   10   >