Re: [OE-core] [PATCHv2 0/5] Enable wic in eSDK

2018-01-12 Thread Ed Bartosh
On Thu, Jan 11, 2018 at 10:55:18PM +0800, rebecca.swee.fun.ch...@intel.com wrote: > Hi all, > > As the subject called out: this patch series enable wic in eSDK. > The details of what I have done are documented within the commit message. > Basically wic requires an OE build environment, but we

Re: [OE-core] [PATCH v2] wic: if we can't get from ioctl, try from os.stat()

2018-01-10 Thread Ed Bartosh
On Tue, Jan 09, 2018 at 04:35:24PM +0300, Dogukan Ergun wrote: > Under some conditions, ioctl FIGETBSZ can't return real value. > We can try to use fallback via os.stat() to get block size. > Thank you for the patch! +1 > Source of patch: >

Re: [OE-core] [PATCH 1/1] wic: argparse now used for help functionality.

2017-12-19 Thread Ed Bartosh
On Tue, Dec 12, 2017 at 03:54:04AM -0800, anelliot wrote: > The wic help output formally consisted of manually created strings mixed with > argparse, > which wasunformatted and unusable. This fix cleans up the help messages, > rewrites help > functionality to use argparse, and adds functionality

Re: [OE-core] [PATCH] wic: support filesystem label for rawcopy

2017-11-29 Thread Ed Bartosh
On Tue, Nov 28, 2017 at 01:56:11PM +0100, Martin Hundebøll wrote: > The '--label' argument should work for '--source rawcopy' as it does for > '--source rootfs', so add a method in RawCopyPlugin to update the label > on the temporary filesystem images. > > Signed-off-by: Martin Hundebøll

Re: [OE-core] [PATCHv2 0/4] wic: Further enhance UUID / fstab support

2017-11-22 Thread Ed Bartosh
Hi Tom, Thank you for the great patchset! +1 On Fri, Nov 17, 2017 at 11:08:16AM -0500, Tom Rini wrote: > Hey all, > > So, per Ed's feedback on my first series, I went and spent some time > trying to figure out how to have wic know what the UUID would be when > updating the fstab. It turns out

Re: [OE-core] [PATCH] wic: fallback to dd, if sparse_copy does not work

2017-11-22 Thread Ed Bartosh
On Thu, Nov 16, 2017 at 02:49:43PM +0300, Dogukan Ergun wrote: > Docker's aufs filesystem doesn't support file ioctl operations like FIGETBSZ > or FIEMAP. > Sparse_copy operation will fail if those ioctls are not supported. > If sparse_copy fails while generating wic images, fallback to dd for

Re: [OE-core] [PATCH 1/2] wic: When using --use-uuid make sure that we update the fstab with PARTUUID

2017-11-08 Thread Ed Bartosh
On Wed, Nov 08, 2017 at 10:00:54AM -0500, Tom Rini wrote: > On Wed, Nov 08, 2017 at 01:20:15PM +0200, Ed Bartosh wrote: > > On Tue, Nov 07, 2017 at 09:54:57AM -0500, Tom Rini wrote: > > > On Tue, Nov 07, 2017 at 10:11:35AM +0200, Ed Bartosh wrote: > > > > On Mon, No

Re: [OE-core] [rocko][PATCH] wic: add 'part-name' argument for naming GPT partitions

2017-11-08 Thread Ed Bartosh
On Wed, Nov 08, 2017 at 12:04:09PM +0100, Nicolas Dechesne wrote: > From: Artur 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

Re: [OE-core] [PATCH 1/2] wic: When using --use-uuid make sure that we update the fstab with PARTUUID

2017-11-08 Thread Ed Bartosh
On Tue, Nov 07, 2017 at 09:54:57AM -0500, Tom Rini wrote: > On Tue, Nov 07, 2017 at 10:11:35AM +0200, Ed Bartosh wrote: > > On Mon, Nov 06, 2017 at 07:44:23AM -0500, Tom Rini wrote: > > > On Mon, Nov 06, 2017 at 09:36:20AM -0200, Otavio Salvador wrote: > > > > On M

Re: [OE-core] [PATCH 1/2] wic: When using --use-uuid make sure that we update the fstab with PARTUUID

2017-11-07 Thread Ed Bartosh
On Mon, Nov 06, 2017 at 07:44:17AM -0500, Tom Rini wrote: > > Can you rebase your patchset on top of current master? > > Yes, OK. > > > It would be also nice to get this functionality covered by tests. > > OK, but what part of oe-selftest, and how exactly? Can one easily check > the resulting

Re: [OE-core] [PATCH 1/2] wic: When using --use-uuid make sure that we update the fstab with PARTUUID

2017-11-07 Thread Ed Bartosh
On Mon, Nov 06, 2017 at 07:44:23AM -0500, Tom Rini wrote: > On Mon, Nov 06, 2017 at 09:36:20AM -0200, Otavio Salvador wrote: > > On Mon, Nov 6, 2017 at 8:08 AM, Ed Bartosh <ed.bart...@linux.intel.com> > > wrote: > > > On Fri, Nov 03, 2017 at 08:51:50AM -0400, Tom Rin

Re: [OE-core] [PATCH 1/2] wic: When using --use-uuid make sure that we update the fstab with PARTUUID

2017-11-06 Thread Ed Bartosh
On Fri, Nov 03, 2017 at 08:51:50AM -0400, Tom Rini wrote: > On Fri, Oct 20, 2017 at 09:15:05AM -0400, Tom Rini wrote: > > On Tue, Oct 10, 2017 at 05:01:49PM -0400, Tom Rini wrote: > > > On Thu, Sep 21, 2017 at 01:46:16PM -0400, Tom Rini wrote: > > > > When we have been told to use the UUID we

Re: [OE-core] [PATCH] wic: add 'part-name' argument for naming GPT partitions

2017-11-01 Thread Ed Bartosh
On Tue, Oct 31, 2017 at 04:08:58PM +0100, Nicolas Dechesne wrote: > On Tue, Oct 31, 2017 at 2:33 PM, Ed Bartosh <ed.bart...@linux.intel.com> > wrote: > > > > On Mon, Oct 30, 2017 at 08:53:09PM +0100, Artur Mądrzak wrote: > > > The WIC's 'part' can now give a n

Re: [OE-core] [PATCH] wic: add 'part-name' argument for naming GPT partitions

2017-10-31 Thread Ed Bartosh
On Mon, Oct 30, 2017 at 08:53:09PM +0100, Artur Mądrzak wrote: > The WIC's 'part' can now give a name for GPT partition in WKS file. > It's similar to '--label', but is naming partitions instead file systems. > It's required by some bootloaders to partitions have specified names. > Thank you for

Re: [OE-core] [PATCHv2] image_types: Fix bmaptool support for RSS

2017-10-02 Thread Ed Bartosh
rt installed. > Thank you for the patch. +1 > Signed-off-by: Tom Rini <tr...@konsulko.com> > --- > Changes in v2: > - Switch to checking for '.bmap' not 'bmap', per Ed Bartosh. > --- > meta/classes/image_types.bbclass | 3 +++ > 1 file changed, 3 insertions(+) > > di

Re: [OE-core] [PATCH] image_types: Fix bmaptool support for RSS

2017-09-29 Thread Ed Bartosh
On Fri, Sep 29, 2017 at 08:36:52AM -0400, Tom Rini wrote: > On Fri, Sep 29, 2017 at 02:16:21PM +0300, Ed Bartosh wrote: > > On Wed, Sep 27, 2017 at 01:00:09PM -0400, Tom Rini wrote: > > > With RSS we need to ensure that when making a bmap image that the > > > python3 t

Re: [OE-core] [PATCH] wic: Generate startup.nsh for EFI cases if none found

2017-09-29 Thread Ed Bartosh
On Fri, Sep 29, 2017 at 08:35:42AM -0400, Tom Rini wrote: > On Fri, Sep 29, 2017 at 02:27:57PM +0300, Ed Bartosh wrote: > > On Thu, Sep 28, 2017 at 01:44:29PM -0400, Tom Rini wrote: > > > On Thu, Sep 28, 2017 at 06:47:07PM +0300, Ed Bartosh wrote: > > > > On Wed, Se

Re: [OE-core] [PATCH] wic: Generate startup.nsh for EFI cases if none found

2017-09-29 Thread Ed Bartosh
On Thu, Sep 28, 2017 at 01:44:29PM -0400, Tom Rini wrote: > On Thu, Sep 28, 2017 at 06:47:07PM +0300, Ed Bartosh wrote: > > On Wed, Sep 20, 2017 at 12:03:27PM -0400, Tom Rini wrote: > > > In the case of non-wic images there is logic today to generate a > > > startup.nsh

Re: [OE-core] [PATCH] image_types: Fix bmaptool support for RSS

2017-09-29 Thread Ed Bartosh
On Wed, Sep 27, 2017 at 01:00:09PM -0400, Tom Rini wrote: > With RSS we need to ensure that when making a bmap image that the > python3 that we created is found via /usr/bin/env rather than the host > python3. Otherwise we're relying on the build host to have bmaptool > support installed. > >

Re: [OE-core] [PATCH] wic: Generate startup.nsh for EFI cases if none found

2017-09-28 Thread Ed Bartosh
ug.cgi?id=10073 > This extends the logic we have today in wic to save the > name of the loader that's being placed and if no startup.nsh is provided > already generate the default kind that grub-efi/systemd-boot.bbclass > generate. > > Cc: Ed Bartosh <ed.bart...@linux.intel.com&

Re: [OE-core] [PATCH] image_types: Fix bmaptool support for RSS

2017-09-28 Thread Ed Bartosh
On Wed, Sep 27, 2017 at 01:00:09PM -0400, Tom Rini wrote: > With RSS we need to ensure that when making a bmap image that the > python3 that we created is found via /usr/bin/env rather than the host > python3. Otherwise we're relying on the build host to have bmaptool > support installed. > Can

Re: [OE-core] [PATCH 1/2] wic: When using --use-uuid make sure that we update the fstab with PARTUUID

2017-09-28 Thread Ed Bartosh
On Thu, Sep 21, 2017 at 05:21:44PM -0400, Tom Rini wrote: > On Thu, Sep 21, 2017 at 04:20:30PM -0500, Mark Hatle wrote: > > On 9/21/17 4:15 PM, Otavio Salvador wrote: > > > On Thu, Sep 21, 2017 at 2:46 PM, Tom Rini wrote: > > >> When we have been told to use the UUID we should

Re: [OE-core] [PATCH 3/3] wic: apply --extra-space + --overhead to squashfs

2017-09-13 Thread Ed Bartosh
On Tue, Sep 12, 2017 at 03:23:40PM +0200, Enrico Scholz wrote: > Ed Bartosh <ed.bart...@linux.intel.com> writes: > > > I agree. --size is less suitable for your needs than extra space and > > overhead factor. I still don't like the idea of using them to reserve > >

Re: [OE-core] [PATCH 3/3] wic: apply --extra-space + --overhead to squashfs

2017-09-12 Thread Ed Bartosh
On Tue, Sep 12, 2017 at 02:18:41PM +0200, Enrico Scholz wrote: > Ed Bartosh <ed.bart...@linux.intel.com> writes: > > >> >> >> The --extra-space and --overhead option did not had an effect to > >> >> >> squashfs > >> >

Re: [OE-core] [PATCH 3/3] wic: apply --extra-space + --overhead to squashfs

2017-09-12 Thread Ed Bartosh
On Tue, Sep 12, 2017 at 11:44:02AM +0200, Enrico Scholz wrote: > Ed Bartosh <ed.bart...@linux.intel.com> writes: > > >> >> The --extra-space and --overhead option did not had an effect to > >> >> squashfs > >> >> partitions. Although squ

Re: [OE-core] [PATCH 3/3] wic: apply --extra-space + --overhead to squashfs

2017-09-12 Thread Ed Bartosh
On Mon, Sep 11, 2017 at 04:04:40PM +0200, Enrico Scholz wrote: > Ed Bartosh <ed.bart...@linux.intel.com> writes: > > >> The --extra-space and --overhead option did not had an effect to squashfs > >> partitions. Although squashfs is read-only, it can be usef

Re: [OE-core] [PATCH 3/3] wic: apply --extra-space + --overhead to squashfs

2017-09-11 Thread Ed Bartosh
On Fri, Sep 08, 2017 at 07:33:03PM +0200, Enrico Scholz wrote: > From: Enrico Scholz > > The --extra-space and --overhead option did not had an effect to squashfs > partitions. Although squashfs is read-only, it can be useful to allocate > more space for the on-disk

[OE-core] [PATCH v2 2/3] bmap-tools: switch to Python 3

2017-09-06 Thread Ed Bartosh
bmap-tools is the only recipe in oe-core that still uses Python 2. Switching it to Python 3 should help to get rid of building native Python 2 and its dependencies. [YOCTO #11891] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/recipes-support/bmap-tools/bmap-tools_3.4.

[OE-core] [PATCH v2 3/3] wic: run bmaptool with native Python3

2017-09-06 Thread Ed Bartosh
Modified wic code to run bmaptool using native Python3 from wic-tools native sysroot. [YOCTO #11891] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/imager/direct.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/l

[OE-core] [PATCH v2 1/3] bmap-tools: upgrade to v3.4

2017-09-06 Thread Ed Bartosh
Upgraded to the latest upstream release. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- .../bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meta/recipes-support/bmap-tools/{bmap-tools_3.2.bb

[OE-core] [PATCH v2 0/3] #11891 - Port bmaptools to Python 3

2017-09-06 Thread Ed Bartosh
://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed Bartosh (3): bmap-tools: upgrade to v3.4 bmap-tools: switch to Python 3 wic: run bmaptool with native Python3 .../bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb} | 9 +++-- scripts/lib/wic/plugins/imager/direct

[OE-core] [PATCH 3/3] wic: run bmaptool with native Python3

2017-09-06 Thread Ed Bartosh
Modified wic code to run bmaptool using native Python3 from wic-tools native sysroot. [YOCTO: #11891] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/imager/direct.py | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/l

[OE-core] [PATCH 2/3] bmap-tools: switch to Python 3

2017-09-06 Thread Ed Bartosh
bmap-tools is the only recipe in oe-core that still uses Python 2. Switching it to Python 3 should help to get rid of building native Python 2 and its dependencies. [YOCTO: #11891] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/recipes-support/bmap-tools/bmap-tools_3.4.

[OE-core] [PATCH 1/3] bmap-tools: upgrade to v3.4

2017-09-06 Thread Ed Bartosh
Upgraded to the latest upstream release. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- .../bmap-tools/{bmap-tools_3.2.bb => bmap-tools_3.4.bb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename meta/recipes-support/bmap-tools/{bmap-tools_3.2.bb

[OE-core] [PATCH 0/3] #11891 - Port bmaptools to Python 3

2017-09-06 Thread Ed Bartosh
test_wic_rm_ext test case (2017-09-05 14:28:41 +0300) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed Bartosh (3): bmap-tools: upgrade to v3.4 bmap-tools: switch to Python 3 wic: run

[OE-core] [PATCH 4/7] wic: update help content

2017-09-05 Thread Ed Bartosh
Added ext* partitions to the description of 'wic ls', 'wic cp' and 'wic rm' commands. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/help.py | 64 - 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/s

[OE-core] [PATCH 2/7] wic: implement ext fs support for 'wic cp'

2017-09-05 Thread Ed Bartosh
Implemented copying files to the ext partition using debugfs tool. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py

[OE-core] [PATCH 6/7] wic: selftest: add test_wic_cp_ext test case

2017-09-05 Thread Ed Bartosh
Tested if 'wic cp' correctly copies files to the ext4 partition of the wic image. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 30 ++ 1 file changed, 30 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/

[OE-core] [PATCH 7/7] wic: selftest: add test_wic_rm_ext test case

2017-09-05 Thread Ed Bartosh
Tested if 'wic rm' correctly removes files from the ext4 partition of the wic image. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 23 +++ 1 file changed, 23 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic

[OE-core] [PATCH 1/7] wic: implement ext fs support for 'wic ls'

2017-09-05 Thread Ed Bartosh
Implemented listing directory contents for ext file system using debugfs tool. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/lib/wic/engine.py b/scripts/l

[OE-core] [PATCH 3/7] wic: implement ext fs support for 'wic rm'

2017-09-05 Thread Ed Bartosh
Implemented removing files or directories from the ext partition using debugfs tool. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/scripts/lib/wic/engin

[OE-core] [PATCH 5/7] wic: selftest: add test_wic_ls_ext test case

2017-09-05 Thread Ed Bartosh
Tested if 'wic ls' correctly lists directory contents of the ext* partition. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 16 1 file changed, 16 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/li

[OE-core] [PATCH 0/7] implement wic ls/cp/rm for ext partitions

2017-09-05 Thread Ed Bartosh
) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed Bartosh (7): wic: implement ext fs support for 'wic ls' wic: implement ext fs support for 'wic cp' wic: implement ext fs support

Re: [OE-core] Running wic on target?

2017-08-31 Thread Ed Bartosh
On Thu, Aug 31, 2017 at 09:17:03AM +0200, Mike Looijmans wrote: > I noticed that the "wic" recipes appear to focus on the host only. > > Would it be possible to run "wic" on target? > > For example, it would be really convenient to be able to program the eMMC > using wic and auto-expanding the

[OE-core] [PATCH v2 7/8] wic: always read image partitions

2017-08-25 Thread Ed Bartosh
Got rid of lazy evaluation of self.partitions property. It's not needed because partitions of the source image should be always read. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[OE-core] [PATCH v2 8/8] wic: setlftest: test expanding MBR image

2017-08-25 Thread Ed Bartosh
-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 53 + 1 file changed, 53 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index aaefd4f..aa73ba4 100644 --- a/meta/li

[OE-core] [PATCH v2 6/8] wic: implement 'wic write' command

2017-08-25 Thread Ed Bartosh
This command writes image to the media or another file with the possibility to expand partitions to fill free target space. [YOCTO #11278] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 146 ++ scripts/l

[OE-core] [PATCH v2 5/8] wic: extend list of used tools

2017-08-25 Thread Ed Bartosh
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. Signed-off-by: Ed Bartosh

[OE-core] [PATCH v2 4/8] wic: added 'fstypes' parameter to Disk.__init__

2017-08-25 Thread Ed Bartosh
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'. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 9 +++-- 1 file changed, 7 insertions

[OE-core] [PATCH v2 3/8] wic: convert partition number to int

2017-08-25 Thread Ed Bartosh
Converted partition number to int in order to use it as an index in the list of partitions. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/engine.py b/scripts/l

[OE-core] [PATCH v2 2/8] wic: get more info from the 'parted print' output

2017-08-25 Thread Ed Bartosh
Got partition type and sector sizes from the output of 'parted print'. This info may be used in the implementation of 'wic write' command. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

[OE-core] [PATCH v2 0/8] #11278 - wic: create an option to use entire disk

2017-08-25 Thread Ed Bartosh
changes since commit a087e0bc765ade6386720f22d842e2fc0bd5f128: maintainers.inc: assign newly added recipes (2017-08-24 16:49:57 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed

[OE-core] [PATCH v2 1/8] wic: reimplement getting paths of used tools

2017-08-25 Thread Ed Bartosh
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. Signed-off-by: Ed

[OE-core] [PATCH 10/10] wic: setlftest: test expanding MBR image

2017-08-25 Thread Ed Bartosh
-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 53 + 1 file changed, 53 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index aaefd4f..aa73ba4 100644 --- a/meta/li

[OE-core] [PATCH 08/10] wic: implement 'wic write' command

2017-08-25 Thread Ed Bartosh
This command writes image to the media or another file with the possibility to expand partitions to fill free target space. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 142 +- 1 file changed, 141 inse

[OE-core] [PATCH 07/10] wic: extend list of used tools

2017-08-25 Thread Ed Bartosh
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. Signed-off-by: Ed Bartosh

[OE-core] [PATCH 09/10] wic: always read image partitions

2017-08-25 Thread Ed Bartosh
Got rid of lazy evaluation of self.partitions property. It's not needed because partitions of the source image should be always read. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[OE-core] [PATCH 05/10] wic: convert partition number to int

2017-08-25 Thread Ed Bartosh
Converted partition number to int in order to use it as an index in the list of partitions. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lib/wic/engine.py b/scripts/l

[OE-core] [PATCH 03/10] wic: reimplement getting paths of used tools

2017-08-25 Thread Ed Bartosh
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. Signed-off-by: Ed

[OE-core] [PATCH 01/10] wic: add help and usage content for 'wic write'

2017-08-25 Thread Ed Bartosh
Added wic_write_help and wic_write_usage variables to the help.py module. These variables contain help content that will be used in 'wic write help' and 'wic write --help' output. [YOCTO #11278] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/help.p

[OE-core] [PATCH 02/10] wic: add 'wic write' command

2017-08-25 Thread Ed Bartosh
Added empty 'wic write' command that does nothing. The functionality will be added by the next commits. [YOCTO #11278] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 6 ++ scripts/wic

[OE-core] [PATCH 06/10] wic: added 'fstypes' parameter to Disk.__init__

2017-08-25 Thread Ed Bartosh
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'. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 9 +++-- 1 file changed, 7 insertions

[OE-core] [PATCH 04/10] wic: get more info from the 'parted print' output

2017-08-25 Thread Ed Bartosh
Got partition type and sector sizes from the output of 'parted print'. This info may be used in the implementation of 'wic write' command. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/engine.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

[OE-core] [PATCH 00/10] #11278 - wic: create an option to use entire disk

2017-08-25 Thread Ed Bartosh
: assign newly added recipes (2017-08-24 16:49:57 +0100) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed Bartosh (10): wic: add help and usage content for 'wic write' wic: add 'wic

Re: [OE-core] [PATCH 1/4] wic-image-minimal: drop WKS_FILE_DEPENDS definition

2017-08-02 Thread Ed Bartosh
On Tue, Aug 01, 2017 at 07:13:47PM +0200, liu.min...@gmail.com wrote: > From: Ming Liu > > It's being set in image_types_wic.bbclass, not need to double set it > here, furthermore, the dependencies are incomplete by missing > e2fsprogs-native. > >

Re: [OE-core] [PATCH 3/4] qemux86.conf: drop do_image_wic task dependencies

2017-08-02 Thread Ed Bartosh
On Tue, Aug 01, 2017 at 07:13:49PM +0200, liu.min...@gmail.com wrote: > From: Ming Liu > > They are being controlled by WKS_FILE_DEPENDS_DEFAULT, the code here > is redundant and incomplete as well. > > Signed-off-by: Ming Liu

Re: [OE-core] [PATCH 2/4] image_types_wic.bbclass: deal with dependencies only with WKS_FILE_DEPENDS_DEFAULT

2017-08-02 Thread Ed Bartosh
On Tue, Aug 01, 2017 at 07:13:48PM +0200, liu.min...@gmail.com wrote: > From: Ming Liu > > Drop do_image_wic depends varflags, move the dependencies to > WKS_FILE_DEPENDS_DEFAULT. I can not see the need to maintain them > in two different ways, besides that

Re: [OE-core] [PATCH v3] wic: ensure generated disk system identifier is non-zero

2017-07-31 Thread Ed Bartosh
On Mon, Jul 31, 2017 at 06:04:47PM +1000, Jonathan Liu wrote: > > > > How about random.SystemRandom().randrange(1, 0x) ? > > > > random.SystemRandom().randint(1, 0x) actually > This looks ok to me. Thanks. -- Regards, Ed -- ___

Re: [OE-core] [PATCH v3] wic: ensure generated disk system identifier is non-zero

2017-07-31 Thread Ed Bartosh
On Sun, Jul 30, 2017 at 08:37:26PM +1000, Jonathan Liu wrote: > Hi Ed, > > On 30 July 2017 at 20:02, Ed Bartosh <ed.bart...@linux.intel.com> wrote: > > On Sat, Jul 29, 2017 at 12:45:27AM +1000, Jonathan Liu wrote: > >> Zero may be interpreted as no MBR

[OE-core] [PATCH] x86-base.inc: enable live image type

2017-07-30 Thread Ed Bartosh
ilt), but it makes NOHDD and NOISO working as expected. [YOCTO #11842] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/conf/machine/include/x86-base.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/conf/machine/include/x86-base.inc b/meta/con

Re: [OE-core] [PATCH v3] wic: ensure generated disk system identifier is non-zero

2017-07-30 Thread Ed Bartosh
On Sat, Jul 29, 2017 at 12:45:27AM +1000, Jonathan Liu wrote: > Zero may be interpreted as no MBR signature present and another > partitioning program might install a new MBR signature. > > Signed-off-by: Jonathan Liu > --- > scripts/lib/wic/plugins/imager/direct.py | 2 +- >

Re: [OE-core] [PATCH] image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types

2017-07-28 Thread Ed Bartosh
On Fri, Jul 28, 2017 at 09:35:37PM +1000, Jonathan Liu wrote: > Hi Tom, > > On 28 July 2017 at 21:31, Tom Rini wrote: > > On Fri, Jul 28, 2017 at 09:09:55PM +1000, Jonathan Liu wrote: > >> Hi Tom, > >> > >> On 26 July 2017 at 05:58, Tom Rini wrote: > >> >

[OE-core] [PATCH v5 4/7] wic: rootfs: fix rootfs path reporting

2017-07-28 Thread Ed Bartosh
. This should fix the report. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index c

[OE-core] [PATCH v5 3/7] wic: use absolute paths in rootfs plugin

2017-07-28 Thread Ed Bartosh
Using relative paths can cause copyhardlinktree API to fail as it changes current directory when working. Converted all paths to absolute paths using os.path.realpath. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 4 ++-- 1 file chan

[OE-core] [PATCH v5 6/7] wic: add /boot mount point to fstab by default

2017-07-28 Thread Ed Bartosh
wic avoided adding /boot to fstab for no reason. This exception was hardcoded in the wic code. There is no need for this as mountpoint in .wks file is an optional field. It can be used only if user wants to have partitions automatically mounted on system boot. [YOCTO #11662] Signed-off-by: Ed

[OE-core] [PATCH v5 7/7] oe-selftest: wic: fix test_quemu

2017-07-28 Thread Ed Bartosh
This test case boots the image in qemu and checks for mounted partitions. As /boot is mounted automatically the test case fails. Fixed this by adding /boot to the list of mounted partitions. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 2

[OE-core] [PATCH v5 5/7] wic: rootfs: make copied rootfs unique

2017-07-28 Thread Ed Bartosh
Used unique suffix (line number from .wks file) for the copied rootfs directory to avoid possible conflicts. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/l

[OE-core] [PATCH v5 2/7] wic: copy rootfs directory before changing fstab

2017-07-28 Thread Ed Bartosh
to a temporary location before updating fstab to avoid conflicts with other tasks working with the same rootfs directory. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/imager/direct.py | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-)

[OE-core] [PATCH v5 1/7] image_types.bbclass: ignore tar exit code 1

2017-07-28 Thread Ed Bartosh
to change it, e.g. do_image_wic does this to update etc/fstab. Ignored tar exit code 1 to be able to hardlink rootfs content while do_rootfs_tar is tarring it. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/classes/image_types.bbclass | 3 ++- 1 file changed, 2 insertion

[OE-core] [PATCH v5 0/7] #11662 - wic should mount /boot

2017-07-28 Thread Ed Bartosh
wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed Bartosh (7): image_types.bbclass: ignore tar exit code 1 wic: copy rootfs directory before changing fstab wic: use absolute paths in rootfs plugin wic: rootfs: fix rootfs path reporting wic: rootfs: make copied roo

Re: [OE-core] [PATCHv2 1/5] image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types

2017-07-27 Thread Ed Bartosh
> the CONVERSION_CMD framework. The equivalent of vmdk is now wic.vmdk > and so forth for the other types. > > Signed-off-by: Tom Rini <tr...@konsulko.com> Acked-by: Ed Bartosh <ed.bart...@linux.intel.com> > --- > Changes in v2: > - Update runqemu help (code matc

[OE-core] [PATCH v4 2/6] wic: use absolute paths in rootfs plugin

2017-07-27 Thread Ed Bartosh
Using relative paths can cause copyhardlinktree API to fail as it changes current directory when working. Converted all paths to absolute paths using os.path.realpath. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 4 ++-- 1 file chan

[OE-core] [PATCH v4 6/6] oe-selftest: wic: fix test_quemu

2017-07-27 Thread Ed Bartosh
This test case boots the image in qemu and checks for mounted partitions. As /boot is mounted automatically the test case fails. Fixed this by adding /boot to the list of mounted partitions. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 2

[OE-core] [PATCH v4 5/6] wic: add /boot mount point to fstab by default

2017-07-27 Thread Ed Bartosh
wic avoided adding /boot to fstab for no reason. This exception was hardcoded in the wic code. There is no need for this as mountpoint in .wks file is an optional field. It can be used only if user wants to have partitions automatically mounted on system boot. [YOCTO #11662] Signed-off-by: Ed

[OE-core] [PATCH v4 3/6] wic: rootfs: fix rootfs path reporting

2017-07-27 Thread Ed Bartosh
. This should fix the report. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index c

[OE-core] [PATCH v4 4/6] wic: rootfs: make copied rootfs unique

2017-07-27 Thread Ed Bartosh
Used unique suffix (line number from .wks file) for the copied rootfs directory to avoid possible conflicts. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/l

[OE-core] [PATCH v4 0/6] #11662 - wic should mount /boot

2017-07-27 Thread Ed Bartosh
tools: add dependency to e2fsprogs-native (2017-07-27 16:07:26 +0300) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/wip http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wip Ed Bartosh (6): wic: copy rootfs directory before changing fstab

[OE-core] [PATCH v4 1/6] wic: copy rootfs directory before changing fstab

2017-07-27 Thread Ed Bartosh
location before updating fstab to avoid conflicts with other tasks working with the same rootfs directory. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/imager/direct.py | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff

[OE-core] [PATCH] wic-tools: add dependency to e2fsprogs-native

2017-07-27 Thread Ed Bartosh
Added e2fsprogs-native to the list of dependencies for wic-tools as all fs-related utilities have to be in this list. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/recipes-core/meta/wic-tools.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/r

[OE-core] [PATCH v2] oe-selftest: wic: change mkfs.btrfs options

2017-07-26 Thread Ed Bartosh
. Changed extra options for mkfs.btrfs to '--quiet' to fix the failure. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/se

[OE-core] [PATCH] image_types_wic: add dependency to e2fsprogs-native

2017-07-26 Thread Ed Bartosh
Added e2fsprogs-native to the list of default dependencies for wic (WKS_FILE_DEPENDS_DEFAULT) as all fs-related utilities have to be in this list. Thanks to Patrick Ohly for noticing this. [YOCTO #11817] Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/c

Re: [OE-core] [PATCH] wic: Switch to using --use-uuid by default

2017-07-26 Thread Ed Bartosh
On Wed, Jul 26, 2017 at 10:29:09AM +0300, Ed Bartosh wrote: > On Tue, Jul 25, 2017 at 03:58:22PM -0400, Tom Rini wrote: > > The most portable way to specifiy a root device in a disk image that we > > create is to use PARTUUID rather than /dev/sda2. As background, both > &g

[OE-core] [PATCH] oe-selftest: wic: change mkfs.btrfs options

2017-07-26 Thread Ed Bartosh
. Changed extra options for mkfs.btrfs to '--quiet' to fix the failure. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/se

Re: [OE-core] [PATCH] wic: Switch to using --use-uuid by default

2017-07-26 Thread Ed Bartosh
ual disk controller. > I suspect oe-selftest needs to be adjusted for this change. Please run "oe-selftest -r wic" to ensure all tests pass. > Cc: Ed Bartosh <ed.bart...@linux.intel.com> > Cc: Matt Porter <mpor...@konsulko.com> > Signed-off-by: Tom Rin

Re: [OE-core] [PATCH] image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD types

2017-07-26 Thread Ed Bartosh
s most sense to not hide that the underlying disk > content has changed at least slightly from the old vmdk type to the new > type and that we can simply handle this change in documentation. As > such, if there's agreement about dropping the types I'll include some > documentation changes in th

Re: [OE-core] [PATCH 1/2] image.bbclass: Correct chaining compression support

2017-07-26 Thread Ed Bartosh
> Fixes: 46bc438374de ("image.bbclass: do exact match for rootfs type") > Cc: Zhenhua Luo <zhenhua@nxp.com> > Cc: Richard Purdie <richard.pur...@linuxfoundation.org> > Cc: Patrick Ohly <patrick.o...@intel.com> > Signed-off-by: Tom Rini <tr...@konsulko.co

[OE-core] [PATCH v3 5/6] wic: add /boot mount point to fstab by default

2017-07-25 Thread Ed Bartosh
wic avoided adding /boot to fstab for no reason. This exception was hardcoded in the wic code. There is no need for this as mountpoint in .wks file is an optional field. It can be used only if user wants to have partitions automatically mounted on system boot. [YOCTO #11662] Signed-off-by: Ed

[OE-core] [PATCH v3 6/6] oe-selftest: wic: fix test_quemu

2017-07-25 Thread Ed Bartosh
This test case boots the image in qemu and checks for mounted partitions. As /boot is mounted automatically the test case fails. Fixed this by adding /boot to the list of mounted partitions. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- meta/lib/oeqa/selftest/cases/wic.py | 2

[OE-core] [PATCH v3 4/6] wic: rootfs: make copied rootfs unique

2017-07-25 Thread Ed Bartosh
Used unique suffix (line number from .wks file) for the copied rootfs directory to avoid possible conflicts. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/l

[OE-core] [PATCH v3 3/6] wic: rootfs: fix rootfs path reporting

2017-07-25 Thread Ed Bartosh
. This should fix the report. Signed-off-by: Ed Bartosh <ed.bart...@linux.intel.com> --- scripts/lib/wic/plugins/source/rootfs.py | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index c

  1   2   3   4   5   6   7   8   9   10   >