mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jules Maselbas <>
Cc: Jules Maselbas <>,
	Ahmad Fatoum <>
Subject: [PATCH v2 2/3] scripts: Select XZ --arm64 BCJ filter for 64-bit arm
Date: Thu,  7 Sep 2023 17:20:46 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

This change will select the arm64 BCJ filter for aarch64 instead of
the arm filter which was always selected for arm based architectures.

The selected filter is also tested, by looking if it is present in
the long help message of xz, this is because the arm64 BCJ filter is
a recent addition to xz.

Signed-off-by: Jules Maselbas <>
Reviewed-by: Ahmad Fatoum <>
v2: no changes
 scripts/ | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/ b/scripts/
index 7a2d372f48..5b5f3adcff 100755
--- a/scripts/
+++ b/scripts/
@@ -16,8 +16,11 @@ case $SRCARCH in
 	x86)            BCJ=--x86 ;;
 	powerpc)        BCJ=--powerpc ;;
 	ia64)           BCJ=--ia64; LZMA2OPTS=pb=4 ;;
-	arm)            BCJ=--arm ;;
+	arm)            BCJ=--arm$S64 ;;
 	sparc)          BCJ=--sparc ;;
+# clear BCJ filter if unsupported
+xz -H | grep -q -- $BCJ || BCJ=
 exec xz --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB

  reply	other threads:[~2023-09-07 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 15:20 [PATCH v2 1/3] decompressors: Update xz to include ARM64 BCJ decoder Jules Maselbas
2023-09-07 15:20 ` Jules Maselbas [this message]
2023-09-07 15:20 ` [PATCH v2 3/3] kbuild: remove duplicated xz compressions target Jules Maselbas
2023-09-07 21:03 ` [PATCH v2 1/3] decompressors: Update xz to include ARM64 BCJ decoder Jules Maselbas
2023-09-08 13:20   ` Sascha Hauer
2023-09-08 15:36     ` Jules Maselbas

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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