[PATCH v2 2/3] scripts: Select XZ --arm64 BCJ filter for 64-bit arm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jmaselbas@xxxxxxxx>
Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
v2: no changes
---
 scripts/xz_wrap.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/xz_wrap.sh b/scripts/xz_wrap.sh
index 7a2d372f48..5b5f3adcff 100755
--- a/scripts/xz_wrap.sh
+++ b/scripts/xz_wrap.sh
@@ -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 ;;
 esac
 
+# clear BCJ filter if unsupported
+xz -H | grep -q -- $BCJ || BCJ=
+
 exec xz --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB
-- 
2.42.0





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux