From: Philip Balister <philip@balister.org>
To: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [wic][PATCH 4/6] wic: Implement image compressing
Date: Mon, 29 Jun 2015 11:45:07 -0400 [thread overview]
Message-ID: <55916803.40209@balister.org> (raw)
In-Reply-To: <558F21A9.1050605@gmail.com>
On 06/27/2015 06:20 PM, João Henrique Ferreira de Freitas wrote:
> Hi,
>
> Maybe using an environment variable?
>
Handle it the same way we handle PARALLEL_MAKE and BBTHREADS.
Philip
>
>
> On 24/06/2015 12:23, Ed Bartosh wrote:
>> On Tue, Jun 23, 2015 at 07:22:49AM -0400, Philip Balister wrote:
>>> Can you add a way to enable multiple threads for xz? I found this helps
>>> speed up file creation.
>>>
>> I thought about this and other compressor options, but didn't find a good
>> way to add them. Introducing new commandline option or config value
>> doesn't
>> look convenient to use from my point of view.
>>
>> Can you propose something better than that?
>>
>> Regards,
>> Ed
>>
>>> Philip
>>>
>>> On 06/23/2015 05:53 AM, Ed Bartosh wrote:
>>>> 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>
>>>>
>>>> diff --git a/scripts/lib/wic/imager/direct.py
>>>> b/scripts/lib/wic/imager/direct.py
>>>> index f3f20e0..2ea7e4e 100644
>>>> --- a/scripts/lib/wic/imager/direct.py
>>>> +++ b/scripts/lib/wic/imager/direct.py
>>>> @@ -33,6 +33,7 @@ from wic.utils.partitionedfs import Image
>>>> from wic.utils.errors import CreatorError, ImageError
>>>> from wic.imager.baseimager import BaseImageCreator
>>>> from wic.plugin import pluginmgr
>>>> +from wic.utils.oe.misc import exec_cmd
>>>> disk_methods = {
>>>> "do_install_disk":None,
>>>> @@ -71,6 +72,7 @@ class DirectImageCreator(BaseImageCreator):
>>>> self.bootimg_dir = bootimg_dir
>>>> self.kernel_dir = kernel_dir
>>>> self.native_sysroot = native_sysroot
>>>> + self.compressor = compressor
>>>> def __get_part_num(self, num, parts):
>>>> """calculate the real partition number, accounting for
>>>> partitions not
>>>> @@ -318,6 +320,13 @@ class DirectImageCreator(BaseImageCreator):
>>>>
>>>> self.bootimg_dir,
>>>>
>>>> self.kernel_dir,
>>>>
>>>> self.native_sysroot)
>>>> + # Compress the image
>>>> + if self.compressor:
>>>> + for disk_name, disk in self.__image.disks.items():
>>>> + full_path = self._full_path(self.__imgdir,
>>>> disk_name, "direct")
>>>> + msger.debug("Compressing disk %s with %s" % \
>>>> + (disk_name, self.compressor))
>>>> + exec_cmd("%s %s" % (self.compressor, full_path))
>>>> def print_outimage_info(self):
>>>> """
>>>> @@ -328,7 +337,11 @@ class DirectImageCreator(BaseImageCreator):
>>>> parts = self._get_parts()
>>>> for disk_name, disk in self.__image.disks.items():
>>>> - full_path = self._full_path(self.__imgdir, disk_name,
>>>> "direct")
>>>> + extension = "direct" + {"gzip": ".gz",
>>>> + "bzip2": ".bz2",
>>>> + "xz": ".xz",
>>>> + "": ""}.get(self.compressor)
>>>> + full_path = self._full_path(self.__imgdir, disk_name,
>>>> extension)
>>>> msg += ' %s\n\n' % full_path
>>>> msg += 'The following build artifacts were used to
>>>> create the image(s):\n'
>>>>
>
next prev parent reply other threads:[~2015-06-29 15:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 9:52 [wic][PATCH 0/6] Implemented image compressing: poky-contrib:ed/wic/compress-with Ed Bartosh
2015-06-23 9:52 ` [wic][PATCH 1/6] wic: Add --compress-with command line option Ed Bartosh
2015-06-23 9:52 ` [wic][PATCH 2/6] wic: Add new argument to wic_create function Ed Bartosh
2015-06-23 9:52 ` [wic][PATCH 3/6] wic: Add new argument to direct plugin Ed Bartosh
2015-06-23 9:53 ` [wic][PATCH 4/6] wic: Implement image compressing Ed Bartosh
2015-06-23 11:22 ` Philip Balister
2015-06-24 15:23 ` Ed Bartosh
2015-06-27 22:20 ` João Henrique Ferreira de Freitas
2015-06-29 15:45 ` Philip Balister [this message]
2015-08-16 5:37 ` Khem Raj
2015-06-23 9:53 ` [wic][PATCH 5/6] wic: Make code more pythonic Ed Bartosh
2015-06-23 9:53 ` [wic][PATCH 6/6] wic: oe-selftest: Test image compressing Ed Bartosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55916803.40209@balister.org \
--to=philip@balister.org \
--cc=joaohf@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox