diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-01-13 14:55:07 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-01-13 14:55:07 +0000 |
commit | 04e6d374b6ef4348dbad560e051e5df9de0f0338 (patch) | |
tree | 322fc313a19bc903c788a7acf9b6fabef06b04e5 /target/linux/generic/patches-3.2/006-arm_kernel_xz_support.patch | |
parent | 101d502abaabc0b7bfa14df1dfd0a77e8644e791 (diff) |
kernel: add support for linux 3.2.1
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29730 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.2/006-arm_kernel_xz_support.patch')
-rw-r--r-- | target/linux/generic/patches-3.2/006-arm_kernel_xz_support.patch | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.2/006-arm_kernel_xz_support.patch b/target/linux/generic/patches-3.2/006-arm_kernel_xz_support.patch new file mode 100644 index 000000000..42ef57cfe --- /dev/null +++ b/target/linux/generic/patches-3.2/006-arm_kernel_xz_support.patch @@ -0,0 +1,94 @@ +From 2d303b4683145f7dbc918bd14d04e1396581b2ce Mon Sep 17 00:00:00 2001 +From: Imre Kaloz <kaloz@openwrt.org> +Date: Thu, 7 Jul 2011 12:05:21 +0200 +Subject: [PATCH] ARM: support XZ compressed kernels + +Wire up support for the XZ decompressor + +Signed-off-by: Imre Kaloz <kaloz@openwrt.org> +--- + arch/arm/Kconfig | 1 + + arch/arm/boot/compressed/Makefile | 11 +++++++++-- + arch/arm/boot/compressed/decompress.c | 4 ++++ + arch/arm/boot/compressed/piggy.xzkern.S | 6 ++++++ + lib/xz/xz_dec_stream.c | 1 + + 5 files changed, 21 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/boot/compressed/piggy.xzkern.S + +--- 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 +--- a/arch/arm/boot/compressed/Makefile ++++ b/arch/arm/boot/compressed/Makefile +@@ -92,6 +92,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/ + suffix_$(CONFIG_KERNEL_GZIP) = gzip + suffix_$(CONFIG_KERNEL_LZO) = lzo + suffix_$(CONFIG_KERNEL_LZMA) = lzma ++suffix_$(CONFIG_KERNEL_XZ) = xzkern + + # Borrowed libfdt files for the ATAG compatibility mode + +@@ -115,7 +116,7 @@ targets := vmlinux vmlinux.lds \ + lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS) + + # Make sure files are removed during clean +-extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S $(libfdt) $(libfdt_hdrs) ++extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) + + ifeq ($(CONFIG_FUNCTION_TRACER),y) + ORIG_CFLAGS := $(KBUILD_CFLAGS) +@@ -170,8 +171,14 @@ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CO + false; \ + fi + ++# For __aeabi_llsl ++ashldi3 = $(obj)/ashldi3.o ++ ++$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S FORCE ++ $(call cmd,shipped) ++ + $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ +- $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE ++ $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) FORCE + @$(check_for_multiple_zreladdr) + $(call if_changed,ld) + @$(check_for_bad_syms) +--- a/arch/arm/boot/compressed/decompress.c ++++ b/arch/arm/boot/compressed/decompress.c +@@ -44,6 +44,10 @@ extern void error(char *); + #include "../../../../lib/decompress_unlzma.c" + #endif + ++#ifdef CONFIG_KERNEL_XZ ++#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); +--- /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: +--- 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 { |