Skip to content

Commit 8e2872c

Browse files
heicarstMartin Schwidefsky
authored andcommitted
s390: add support for LZ4-compressed kernel
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 07bc9dc commit 8e2872c

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎arch/s390/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ config S390
118118
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
119119
select HAVE_KERNEL_BZIP2
120120
select HAVE_KERNEL_GZIP
121+
select HAVE_KERNEL_LZ4
121122
select HAVE_KERNEL_LZMA
122123
select HAVE_KERNEL_LZO
123124
select HAVE_KERNEL_XZ

‎arch/s390/boot/compressed/Makefile‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
BITS := $(if $(CONFIG_64BIT),64,31)
88

9-
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
10-
vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo misc.o piggy.o \
11-
sizes.h head$(BITS).o
9+
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
10+
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
11+
targets += misc.o piggy.o sizes.h head$(BITS).o
1212

1313
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
1414
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
@@ -48,6 +48,7 @@ vmlinux.bin.all-y := $(obj)/vmlinux.bin
4848

4949
suffix-$(CONFIG_KERNEL_GZIP) := gz
5050
suffix-$(CONFIG_KERNEL_BZIP2) := bz2
51+
suffix-$(CONFIG_KERNEL_LZ4) := lz4
5152
suffix-$(CONFIG_KERNEL_LZMA) := lzma
5253
suffix-$(CONFIG_KERNEL_LZO) := lzo
5354
suffix-$(CONFIG_KERNEL_XZ) := xz
@@ -56,6 +57,8 @@ $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y)
5657
$(call if_changed,gzip)
5758
$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y)
5859
$(call if_changed,bzip2)
60+
$(obj)/vmlinux.bin.lz4: $(vmlinux.bin.all-y)
61+
$(call if_changed,lz4)
5962
$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y)
6063
$(call if_changed,lzma)
6164
$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y)

‎arch/s390/boot/compressed/misc.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ static unsigned long free_mem_end_ptr;
4747
#include "../../../../lib/decompress_bunzip2.c"
4848
#endif
4949

50+
#ifdef CONFIG_KERNEL_LZ4
51+
#include "../../../../lib/decompress_unlz4.c"
52+
#endif
53+
5054
#ifdef CONFIG_KERNEL_LZMA
5155
#include "../../../../lib/decompress_unlzma.c"
5256
#endif

0 commit comments

Comments
 (0)