diff options
-rw-r--r-- | arch/mips/Kconfig | 1 | ||||
-rw-r--r-- | arch/mips/boot/compressed/Makefile | 5 | ||||
-rw-r--r-- | arch/mips/boot/compressed/decompress.c | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c35603bb6ace..a749defb1582 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1491,6 +1491,7 @@ config SYS_SUPPORTS_ZBOOT select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_LZMA select HAVE_KERNEL_LZO + select HAVE_KERNEL_XZ config SYS_SUPPORTS_ZBOOT_UART16550 bool diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index 0048c0897896..c1f8f0753cc8 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -37,6 +37,10 @@ vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o endif +ifdef CONFIG_KERNEL_XZ +vmlinuzobjs-y += $(obj)/../../lib/ashldi3.o +endif + targets += vmlinux.bin OBJCOPYFLAGS_vmlinux.bin := $(OBJCOPYFLAGS) -O binary -R .comment -S $(obj)/vmlinux.bin: $(KBUILD_IMAGE) FORCE @@ -46,6 +50,7 @@ tool_$(CONFIG_KERNEL_GZIP) = gzip tool_$(CONFIG_KERNEL_BZIP2) = bzip2 tool_$(CONFIG_KERNEL_LZMA) = lzma tool_$(CONFIG_KERNEL_LZO) = lzo +tool_$(CONFIG_KERNEL_XZ) = xzkern targets += vmlinux.bin.z $(obj)/vmlinux.bin.z: $(obj)/vmlinux.bin FORCE diff --git a/arch/mips/boot/compressed/decompress.c b/arch/mips/boot/compressed/decompress.c index 2c9573098c0d..cff7b7d1ff45 100644 --- a/arch/mips/boot/compressed/decompress.c +++ b/arch/mips/boot/compressed/decompress.c @@ -43,7 +43,7 @@ void error(char *x) /* activate the code for pre-boot environment */ #define STATIC static -#ifdef CONFIG_KERNEL_GZIP +#if defined(CONFIG_KERNEL_GZIP) || defined(CONFIG_KERNEL_XZ) void *memcpy(void *dest, const void *src, size_t n) { int i; @@ -54,6 +54,8 @@ void *memcpy(void *dest, const void *src, size_t n) d[i] = s[i]; return dest; } +#endif +#ifdef CONFIG_KERNEL_GZIP #include "../../../../lib/decompress_inflate.c" #endif @@ -78,6 +80,10 @@ void *memset(void *s, int c, size_t n) #include "../../../../lib/decompress_unlzo.c" #endif +#ifdef CONFIG_KERNEL_XZ +#include "../../../../lib/decompress_unxz.c" +#endif + void decompress_kernel(unsigned long boot_heap_start) { unsigned long zimage_start, zimage_size; |