From c3e200ccafc4b285778c9e6e520c7d0145f963cd Mon Sep 17 00:00:00 2001 From: Atanas Filipov Date: Mon, 16 Apr 2018 16:14:22 +0530 Subject: [PATCH] arm64: msm: Add support for uncompressed kernel image Add support for uncompressed kernel image [eberman@codeaurora.org: Removed dtb-related changes] [eberman@codeaurora.org: Add extra description to Kconfig] Change-Id: I62229187e1f3e0ec11ff4b5a31c36dcee86dc8b7 Signed-off-by: Atanas Filipov Signed-off-by: Rishabh Bhatnagar Signed-off-by: Elliot Berman --- arch/arm64/Kconfig | 26 ++++++++++++++++++++++++++ arch/arm64/Makefile | 11 ++++++++--- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 21bf71870c84..d25ac041677d 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1591,6 +1591,32 @@ config DMI endmenu +choice + prompt "Kernel compression method" + default BUILD_ARM64_KERNEL_COMPRESSION_GZIP + help + Allows choice between gzip compressed or uncompressed + kernel image. Decision is based on whether the bootloader + can handle (un)compressed kernel images. Most BLs are capable + of decomprssing kernel images and this is the default choice. + +config BUILD_ARM64_KERNEL_COMPRESSION_GZIP + bool "Build compressed kernel image" + help + Build a kernel image using gzip + compression. gzip is based on the DEFLATE + algorithm. Check if your bootloader is + capable of decompressing images. + +config BUILD_ARM64_UNCOMPRESSED_KERNEL + bool "Build uncompressed kernel image" + help + Build a kernel image without + compression. An uncompressed kernel + image may improve performance in + certain situations. +endchoice + config SYSVIPC_COMPAT def_bool y depends on COMPAT && SYSVIPC diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 495452052c26..07ad63401493 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -135,12 +135,17 @@ core-$(CONFIG_CRYPTO) += arch/arm64/crypto/ libs-y := arch/arm64/lib/ $(libs-y) core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a +ifeq ($(CONFIG_BUILD_ARM64_KERNEL_COMPRESSION_GZIP),y) +KBUILD_TARGET := Image.gz +else +KBUILD_TARGET := Image +endif + # Default target when executing plain make boot := arch/arm64/boot -KBUILD_IMAGE := $(boot)/Image.gz - -all: Image.gz +KBUILD_IMAGE := $(boot)/$(KBUILD_TARGET) +all: $(KBUILD_TARGET) Image: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@