diff --git a/lib/decompress_unxz.c b/lib/decompress_unxz.c index 25d59a95bd66..86fd01df3677 100644 --- a/lib/decompress_unxz.c +++ b/lib/decompress_unxz.c @@ -129,7 +129,11 @@ # define XZ_DEC_POWERPC #endif #ifdef CONFIG_ARM -# define XZ_DEC_ARM +# ifdef CONFIG_THUMB2_KERNEL +# define XZ_DEC_ARMTHUMB +# else +# define XZ_DEC_ARM +# endif #endif #ifdef CONFIG_IA64 # define XZ_DEC_IA64 diff --git a/scripts/xz_wrap.sh b/scripts/xz_wrap.sh index 76e9cbcfbeab..3824fdf037be 100755 --- a/scripts/xz_wrap.sh +++ b/scripts/xz_wrap.sh @@ -9,6 +9,8 @@ # You can do whatever you want with this file. # +. include/config/auto.conf + BCJ= LZMA2OPTS= @@ -20,4 +22,8 @@ case $SRCARCH in sparc) BCJ=--sparc ;; esac +if [ -n "${CONFIG_THUMB2_KERNEL}" ]; then + BCJ=--armthumb +fi + exec $XZ --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB