ARM: support XZ compressed kernels
Subsystems (2)
PATCH 1/1 ARM: support XZ compressed kernels
Wire up support for the XZ decompressor
--- 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
arch/arm/Kconfig +1 -0
@@ -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
arch/arm/boot/compressed/Makefile +9 -2
@@ -82,13 +82,14 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ suffix_$(CONFIG_KERNEL_GZIP) = gzip suffix_$(CONFIG_KERNEL_LZO) = lzo suffix_$(CONFIG_KERNEL_LZMA) = lzma +suffix_$(CONFIG_KERNEL_XZ) = xzkern targets := vmlinux vmlinux.lds \ piggy.$(suffix_y) piggy.$(suffix_y).o \ 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 +extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.S ifeq ($(CONFIG_FUNCTION_TRACER),y) ORIG_CFLAGS := $(KBUILD_CFLAGS)
@@ -133,8 +134,14 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \ ( echo "following symbols must have non local/private scope:" >&2; \ echo "$$bad_syms" >&2; rm -f $@; false ) +# 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 $(call if_changed,ld) @$(check_for_bad_syms)
arch/arm/boot/compressed/decompress.c +4 -0
@@ -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);
arch/arm/boot/compressed/piggy.xzkern.S new file +6 -0
@@ -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:
lib/xz/xz_dec_stream.c +1 -0
@@ -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 {
Signature · 1 line
1.7.1
PATCH 1/1 ARM: support XZ compressed kernels
Quoted 10 lines · Imre Kaloz
Wire up support for the XZ decompressor
Signed-off-by Imre Kaloz <[email protected]>--- 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(-)
Please don't forget to update arch/arm/boot/compressed/.gitignore
Nicolas
PATCH 1/1 ARM: support XZ compressed kernels
Quoted 13 lines · Nicolas Pitre
Quoted 10 lines · Imre Kaloz
Wire up support for the XZ decompressor
Signed-off-by Imre Kaloz <[email protected]>--- 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(-)
Quoted 1 line
Please don't forget to update
arch/arm/boot/compressed/.gitignore
Thanks, will do and resend if no other replies come in.
Imre
PATCH 1/1 ARM: support XZ compressed kernels
In reply to Imre Kalozarch/arm/boot/compressed/Makefile SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ · line 92
Quoted 3 lines · Imre Kaloz
# Make sure files are removed during clean
arch/arm/boot/compressed/Makefile +1
-1-extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S +extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.S
Is there a reason the suffix is xzkern rather than just xz ?
PATCH 1/1 ARM: support XZ compressed kernels
Quoted 6 lines · Russell King - ARM Linux
arch/arm/boot/compressed/Makefile SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ · line 92
Quoted 3 lines · Imre Kaloz
# Make sure files are removed during clean
arch/arm/boot/compressed/Makefile +1
-1-extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S +extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.SIs there a reason the suffix is xzkern rather than just xz ?
We do "$(call if_changed,$(suffix_y))" and scripts/Makefile.lib uses cmd_xzkern. I think keeping the changes minimal worth more then having the proper suffix for a temporary file.
Imre
PATCH 1/1 ARM: support XZ compressed kernels
Quoted 9 lines · Imre Kaloz
Quoted 6 lines · Russell King - ARM Linux
arch/arm/boot/compressed/Makefile SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ · line 92
Quoted 3 lines · Imre Kaloz
# Make sure files are removed during clean
arch/arm/boot/compressed/Makefile +1
-1-extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S +extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.SIs there a reason the suffix is xzkern rather than just xz ?
Quoted 3 lines
We do "$(call if_changed,$(suffix_y))" and
scripts/Makefile.libusescmd_xzkern. I think keeping the changes minimal worth more then having the proper suffix for a temporary file.
Hmm, that's unfortunate. It seems that it may be a non-standard format so I guess that's reasonable. No further comments then.
PATCH 1/1 ARM: support XZ compressed kernels
Quoted 10 lines · Russell King - ARM Linux
Quoted 9 lines · Imre Kaloz
Quoted 6 lines · Russell King - ARM Linux
arch/arm/boot/compressed/Makefile SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ · line 92
Quoted 3 lines · Imre Kaloz
# Make sure files are removed during clean
arch/arm/boot/compressed/Makefile +1
-1-extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S +extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern lib1funcs.S ashldi3.SIs there a reason the suffix is xzkern rather than just xz ?
Quoted 7 lines
Quoted 3 lines
We do "$(call if_changed,$(suffix_y))" and
scripts/Makefile.libusescmd_xzkern. I think keeping the changes minimal worth more then having the proper suffix for a temporary file.Hmm, that's unfortunate. It seems that it may be a non-standard format so I guess that's reasonable. No further comments then.
Indeed. After the .gitignore modification, should I resend it here or it can go into the patch system?
Imre