^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #!/bin/sh
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # This is a wrapper for xz to compress the kernel image using appropriate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # compression options depending on the architecture.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) # Author: Lasse Collin <lasse.collin@tukaani.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) # This file has been put into the public domain.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # You can do whatever you want with this file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) . include/config/auto.conf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) BCJ=
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) LZMA2OPTS=
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) case $SRCARCH in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) x86) BCJ=--x86 ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) powerpc) BCJ=--powerpc ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) arm) BCJ=--arm ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) sparc) BCJ=--sparc ;;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) esac
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) if [ -n "${CONFIG_THUMB2_KERNEL}" ]; then
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) BCJ=--armthumb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) fi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) exec $XZ --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB