ARM: 7001/2: Wire up support for the XZ decompressor
Wire up support for the XZ decompressor Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
f5f5195487
commit
a7f464f3db
5 changed files with 27 additions and 3 deletions
|
@ -21,6 +21,7 @@ config ARM
|
||||||
select HAVE_KERNEL_GZIP
|
select HAVE_KERNEL_GZIP
|
||||||
select HAVE_KERNEL_LZO
|
select HAVE_KERNEL_LZO
|
||||||
select HAVE_KERNEL_LZMA
|
select HAVE_KERNEL_LZMA
|
||||||
|
select HAVE_KERNEL_XZ
|
||||||
select HAVE_IRQ_WORK
|
select HAVE_IRQ_WORK
|
||||||
select HAVE_PERF_EVENTS
|
select HAVE_PERF_EVENTS
|
||||||
select PERF_USE_VMALLOC
|
select PERF_USE_VMALLOC
|
||||||
|
|
2
arch/arm/boot/compressed/.gitignore
vendored
2
arch/arm/boot/compressed/.gitignore
vendored
|
@ -1,8 +1,10 @@
|
||||||
|
ashldi3.S
|
||||||
font.c
|
font.c
|
||||||
lib1funcs.S
|
lib1funcs.S
|
||||||
piggy.gzip
|
piggy.gzip
|
||||||
piggy.lzo
|
piggy.lzo
|
||||||
piggy.lzma
|
piggy.lzma
|
||||||
|
piggy.xzkern
|
||||||
vmlinux
|
vmlinux
|
||||||
vmlinux.lds
|
vmlinux.lds
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
|
||||||
suffix_$(CONFIG_KERNEL_GZIP) = gzip
|
suffix_$(CONFIG_KERNEL_GZIP) = gzip
|
||||||
suffix_$(CONFIG_KERNEL_LZO) = lzo
|
suffix_$(CONFIG_KERNEL_LZO) = lzo
|
||||||
suffix_$(CONFIG_KERNEL_LZMA) = lzma
|
suffix_$(CONFIG_KERNEL_LZMA) = lzma
|
||||||
|
suffix_$(CONFIG_KERNEL_XZ) = xzkern
|
||||||
|
|
||||||
# Borrowed libfdt files for the ATAG compatibility mode
|
# Borrowed libfdt files for the ATAG compatibility mode
|
||||||
|
|
||||||
|
@ -112,10 +113,12 @@ endif
|
||||||
|
|
||||||
targets := vmlinux vmlinux.lds \
|
targets := vmlinux vmlinux.lds \
|
||||||
piggy.$(suffix_y) piggy.$(suffix_y).o \
|
piggy.$(suffix_y) piggy.$(suffix_y).o \
|
||||||
lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS)
|
lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S \
|
||||||
|
font.o font.c head.o misc.o $(OBJS)
|
||||||
|
|
||||||
# Make sure files are removed during clean
|
# 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)
|
ifeq ($(CONFIG_FUNCTION_TRACER),y)
|
||||||
ORIG_CFLAGS := $(KBUILD_CFLAGS)
|
ORIG_CFLAGS := $(KBUILD_CFLAGS)
|
||||||
|
@ -151,6 +154,12 @@ lib1funcs = $(obj)/lib1funcs.o
|
||||||
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
|
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
|
||||||
$(call cmd,shipped)
|
$(call cmd,shipped)
|
||||||
|
|
||||||
|
# For __aeabi_llsl
|
||||||
|
ashldi3 = $(obj)/ashldi3.o
|
||||||
|
|
||||||
|
$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S
|
||||||
|
$(call cmd,shipped)
|
||||||
|
|
||||||
# We need to prevent any GOTOFF relocs being used with references
|
# We need to prevent any GOTOFF relocs being used with references
|
||||||
# to symbols in the .bss section since we cannot relocate them
|
# to symbols in the .bss section since we cannot relocate them
|
||||||
# independently from the rest at run time. This can be achieved by
|
# independently from the rest at run time. This can be achieved by
|
||||||
|
@ -172,7 +181,7 @@ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
|
$(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)
|
@$(check_for_multiple_zreladdr)
|
||||||
$(call if_changed,ld)
|
$(call if_changed,ld)
|
||||||
@$(check_for_bad_syms)
|
@$(check_for_bad_syms)
|
||||||
|
|
|
@ -44,6 +44,12 @@ extern void error(char *);
|
||||||
#include "../../../../lib/decompress_unlzma.c"
|
#include "../../../../lib/decompress_unlzma.c"
|
||||||
#endif
|
#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))
|
int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
|
||||||
{
|
{
|
||||||
return decompress(input, len, NULL, NULL, output, NULL, error);
|
return decompress(input, len, NULL, NULL, output, NULL, error);
|
||||||
|
|
6
arch/arm/boot/compressed/piggy.xzkern.S
Normal file
6
arch/arm/boot/compressed/piggy.xzkern.S
Normal file
|
@ -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:
|
Loading…
Add table
Reference in a new issue