aboutsummaryrefslogtreecommitdiffstats
path: root/linux/scripts/xz_wrap.sh
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2011-12-31 22:35:46 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2011-12-31 22:35:46 +0000
commit38f44a8c7c3367df45180852ee34d7d0a81b4ed7 (patch)
tree944912fd7cd4c5579637a369ce7483e251516f82 /linux/scripts/xz_wrap.sh
downloadsrc-38f44a8c7c3367df45180852ee34d7d0a81b4ed7.tar.gz
src-38f44a8c7c3367df45180852ee34d7d0a81b4ed7.zip
This is from commit hash '48f4588342f4a4e0182a6740e25675fd8e6c6295'.
Notes
Notes: svn path=/vendor/xz-embedded/dist/; revision=229159 svn path=/vendor/xz-embedded/48f4588342f4a4e0182a6740e25675fd8e6c6295/; revision=229160; tag=vendor/xz-embedded/48f4588342f4a4e0182a6740e25675fd8e6c6295
Diffstat (limited to 'linux/scripts/xz_wrap.sh')
-rwxr-xr-xlinux/scripts/xz_wrap.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/linux/scripts/xz_wrap.sh b/linux/scripts/xz_wrap.sh
new file mode 100755
index 000000000000..17a5798c29da
--- /dev/null
+++ b/linux/scripts/xz_wrap.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# This is a wrapper for xz to compress the kernel image using appropriate
+# compression options depending on the architecture.
+#
+# Author: Lasse Collin <lasse.collin@tukaani.org>
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+BCJ=
+LZMA2OPTS=
+
+case $ARCH in
+ x86|x86_64) BCJ=--x86 ;;
+ powerpc) BCJ=--powerpc ;;
+ ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;;
+ arm) BCJ=--arm ;;
+ sparc) BCJ=--sparc ;;
+esac
+
+exec xz --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB