public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Cc: Michael Adler <michael.adler@siemens.com>
Subject: Re: [PATCH] feat: add zstd support to image conversions
Date: Thu, 09 Feb 2023 14:35:42 +0300	[thread overview]
Message-ID: <2209477.vFx2qVVIhK@home> (raw)
In-Reply-To: <20230123140016.71522-1-michael.adler@siemens.com>

In the email from Monday, 23 January 2023 17:00:16 +03 user Michael Adler 
wrote:
> This patch enables ISAR to build zstd compressed images.
> 
> Signed-off-by: Michael Adler <michael.adler@siemens.com>
> ---
>  meta/classes/imagetypes.bbclass | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/imagetypes.bbclass
> b/meta/classes/imagetypes.bbclass index 1e8e223d..6950da7a 100644
> --- a/meta/classes/imagetypes.bbclass
> +++ b/meta/classes/imagetypes.bbclass
> @@ -93,7 +93,7 @@ IMAGE_CMD_ubi() {
>  IMAGE_CMD_ubi[depends] = "${PN}:do_transform_template"
> 
>  # image conversions
> -IMAGE_CONVERSIONS = "gz xz"
> +IMAGE_CONVERSIONS = "gz xz zst"
> 
>  CONVERSION_CMD_gz = "${SUDO_CHROOT} sh -c 'gzip -f -9 -n -c --rsyncable
> ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.gz'" CONVERSION_DEPS_gz =
> "gzip"
> @@ -105,3 +105,11 @@ XZ_OPTIONS ?= "--memlimit=${XZ_MEMLIMIT}
> --threads=${XZ_THREADS}" XZ_OPTIONS[vardepsexclude] += "XZ_MEMLIMIT
> XZ_THREADS"
>  CONVERSION_CMD_xz = "${SUDO_CHROOT} sh -c 'xz -c ${XZ_OPTIONS}
> ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.xz'" CONVERSION_DEPS_xz =
> "xz-utils"
> +
> +ZST_LEVEL ?= "19"
> +ZST_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
> +ZST_THREADS[vardepvalue] = "1"
> +ZST_OPTIONS ?= "-${ZST_LEVEL} --threads=${ZST_THREADS}"
> +ZST_OPTIONS[vardepsexclude] += "ZST_LEVEL ZST_THREADS"
> +CONVERSION_CMD_zst = "${SUDO_CHROOT} sh -c 'zstd -c ${ZST_OPTIONS}

Since we switched to Bitbake 2.0, we need v2 with using new syntax.

Of course, in case we need this feature at all...

> ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.zst'" +CONVERSION_DEPS_zst =
> "zstd"





      parent reply	other threads:[~2023-02-09 11:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 14:00 Michael Adler
2023-01-23 19:22 ` Jan Kiszka
2023-01-24  3:17   ` Roberto A. Foglietta
2023-01-24 12:05     ` Roberto A. Foglietta
2023-02-09 11:35 ` Uladzimir Bely [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=2209477.vFx2qVVIhK@home \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=michael.adler@siemens.com \
    /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