All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trevor Woerner <twoerner@gmail.com>
To: yocto-patches@lists.yoctoproject.org
Subject: Re: [yocto-patches] [meta-rockchip][PATCH] user-selectable wic format
Date: Tue, 11 Jun 2024 13:17:39 -0400	[thread overview]
Message-ID: <20240611171739.GA34413@localhost> (raw)
In-Reply-To: <c1540463-c436-480d-a71c-58b6a3125a69@cherry.de>

On Tue 2024-06-11 @ 05:28:42 PM, Quentin Schulz via lists.yoctoproject.org wrote:
> Hi Trevor,
> 
> On 6/11/24 5:13 PM, Trevor Woerner via lists.yoctoproject.org wrote:
> > On Tue 2024-06-11 @ 04:31:26 PM, Quentin Schulz via lists.yoctoproject.org wrote:
> > > Hi Trevor,
> > > 
> > > On 6/11/24 4:15 PM, Trevor Woerner via lists.yoctoproject.org wrote:
> > > > Allow the user to choose their preferred wic image format.
> > > > 
> > > 
> > > Can you provide some use case for this?
> > 
> > In order to build a wic.xz image the build has to first create a wic image,
> > then compress it as an extra step. On a slow machine this extra step takes
> > a noticeable amount of time.
> > 
> > On my local, slow build machine I prefer wic images since it saves build time
> > not having to do the compression and since everything is local, there's no
> > over-the-internet xfer time to consider.
> > 
> > When I build using some remote, fast build machine, the extra time spent doing
> > the extra step of compressing is recuperated by the savings in transfer time
> > retrieving the image from the remote. Therefore I prefer to make wic.xz
> > images. Building wic images on remote machines would lead to very long xfer
> > times to download the image artifact.
> > 
> > If I simply do:
> > 
> > 	IMAGE_FSTYPES += "wic.xz"
> > 
> > in my conf/local.conf then MACHINEs that don't normally build wic images will
> > fail. So the only way to build wic.xz images on remote builds is to tweak the
> > meta-rockchip:conf/machine/include/rockchip-wic.inc file. So I'm always
> > carrying this tweak for every remote build that I do.
> > 
> > So I could simply modify conf/machine/includes/rockchip-wic.inc to set it to
> > wic.xz but that wouldn't suit my use-case since I could then have to tweak it
> > again for any local builds. Besides, I could never guess what preferred wic
> > version others would prefer and I don't want to be changing it every other
> > week.
> > 
> > So this patch maintains the existing behaviour completely, and when I do a
> > build on a remote machine I can simply set
> > 
> > 	WIC_FSTYPE = "wic.xz"
> > 
> > in my conf/local.conf without having to tweak the layer.
> > 
> > And if others want compression but would prefer bz2 or gzip (or whatever) then
> > then can specify it however they wish.
> > 
> > > > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > > > ---
> > > >    conf/machine/include/rockchip-wic.inc | 3 ++-
> > > >    1 file changed, 2 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/conf/machine/include/rockchip-wic.inc b/conf/machine/include/rockchip-wic.inc
> > > > index dab61d83ed2c..eb895cd0b4ad 100644
> > > > --- a/conf/machine/include/rockchip-wic.inc
> > > > +++ b/conf/machine/include/rockchip-wic.inc
> > > > @@ -5,7 +5,8 @@ require conf/machine/include/rockchip-rk-u-boot-env.inc
> > > >    SPL_BINARY ?= "idbloader.img"
> > > > -IMAGE_FSTYPES += "wic wic.bmap"
> > > > +WIC_FSTYPE ?= "wic"
> > > > +IMAGE_FSTYPES += "${WIC_FSTYPE} wic.bmap"
> > > 
> > > Would this be a way to NOT have wic in IMAGE_FSTYPES? What are we trying to
> > > achieve here?
> > > 
> > > If so, shouldn't we also not build wic.bmap there?
> > 
> > The goal isn't to not build a wic image, the point is to allow the user to
> > specify which type of wic image (i.e. with or without compression and if with
> > compression, which one?).
> > 
> > I guess I could do:
> > 
> > 	WIC_COMPRESSION ?= ""
> > 	IMAGE_FSTYPES += "wic${WIC_COMPRESSION} wic.bmap"
> > 
> > And then specify:
> > 
> > 	WIC_COMPRESSION = ".xz"
> > 
> > in my conf/local.conf?
> > 
> 
> Thanks for taking the time to explain your use case :)
> 
> I was about to suggest this :)
> 
> Should we allow multiple values in WIC_COMPRESSION?
> 
> Also maybe it should be named "EXTENSION" instead since we have the dot in
> there?

Sounds good.

> Additionally, I don't see wic.xz in IMAGE_TYPES in https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/image_types.bbclass,
> is xz really working?

I have been using "wic.xz" in IMAGE_FSTYPES for years. Works with bmaptool
too.

> If so, why do we need to specify wic.gz and all the
> others in IMAGE_TYPES? Maybe we do not?

I guess that's for others to answer/investigate.


      reply	other threads:[~2024-06-11 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 14:15 [meta-rockchip][PATCH] user-selectable wic format Trevor Woerner
2024-06-11 14:31 ` [yocto-patches] " Quentin Schulz
2024-06-11 15:13   ` Trevor Woerner
2024-06-11 15:28     ` Quentin Schulz
2024-06-11 17:17       ` Trevor Woerner [this message]

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=20240611171739.GA34413@localhost \
    --to=twoerner@gmail.com \
    --cc=yocto-patches@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.