zImage: compress zImage with XZ compression

file:713319af80f37aa6b213215c68ceeef28d99f138 -> file:53994e46fabef78f6213f0987b0f447029f8a23a
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -20,6 +20,7 @@ config ARM
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZO
select HAVE_KERNEL_LZMA
+ select HAVE_KERNEL_XZ
select HAVE_IRQ_WORK
select HAVE_PERF_EVENTS
select PERF_USE_VMALLOC
file:07be5a2f830236736b15022da52fa0362ff5c16f -> file:8df3b65952a7ff5437d7443a08c833e32474db0c
--- a/arch/arm/boot/compressed/decompress.c
+++ b/arch/arm/boot/compressed/decompress.c
@@ -44,6 +44,13 @@ extern void error(char *);
#include "../../../../lib/decompress_unlzma.c"
#endif
+#ifdef CONFIG_KERNEL_XZ
+#define memmove memmove
+#define memcpy memcpy
+#include "../../../../lib/decompress_unxz.c"
+#endif
+
+
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
{
return decompress(input, len, NULL, NULL, output, NULL, error);
file:5703f300d02782641ff8af6d2bdb54587ef860df(new)
--- /dev/null
+++ b/arch/arm/boot/compressed/piggy.xzkern.S
@@ -0,0 +1,6 @@
+ .section .piggydata,#alloc
+ .globl input_data
+input_data:
+ .incbin "arch/arm/boot/compressed/piggy.xzkern"
+ .globl input_data_end
+input_data_end:
file:ac809b1e64f78ca7e2202464b6672ef61fdfe7f2 -> file:9a60cc21964ffaf047f57e118beb4df03657dd3a
--- a/lib/xz/xz_dec_stream.c
+++ b/lib/xz/xz_dec_stream.c
@@ -9,6 +9,7 @@
#include "xz_private.h"
#include "xz_stream.h"
+#include <linux/kernel.h>
/* Hash used to validate the Index field */
struct xz_dec_hash {