arm64: msm: Add support for uncompressed kernel image

Add support for uncompressed kernel image in msm-4.19.

Change-Id: I62229187e1f3e0ec11ff4b5a31c36dcee86dc8b7
Signed-off-by: Atanas Filipov <afilipov@codeaurora.org>
[rishabhb@codeaurora.org: Resolve trivial merge conflicts
and updated commit text]
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
This commit is contained in:
Atanas Filipov 2018-04-16 16:14:22 +05:30 committed by Gerrit - the friendly Code Review server
parent d25fbc3d32
commit f42f2f1b8c
3 changed files with 37 additions and 5 deletions

View file

@ -1407,6 +1407,29 @@ config BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES
Space separated list of names of dtbs to append when
building a concatenated Image.gz-dtb.
choice
prompt "Kernel compression method"
default BUILD_ARM64_KERNEL_COMPRESSION_GZIP
help
Allows choice between gzip compressed or uncompressed
kernel image
config BUILD_ARM64_KERNEL_COMPRESSION_GZIP
bool "Build compressed kernel image"
help
Build a kernel image using gzip
compression with concatenated dtb.
gzip is based on the DEFLATE
algorithm.
config BUILD_ARM64_UNCOMPRESSED_KERNEL
bool "Build uncompressed kernel image"
help
Build a kernel image without
compression and with
concatenated dtb.
endchoice
config KRYO_PMU_WORKAROUND
bool "Workaround for PMU IRQ burst"
default n

View file

@ -115,13 +115,18 @@ 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_IMAGE := Image.gz
else
KBUILD_IMAGE := Image
endif
# Default target when executing plain make
boot := arch/arm64/boot
ifeq ($(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE),y)
KBUILD_IMAGE := $(boot)/$(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME))
else
KBUILD_IMAGE := $(boot)/Image.gz
KBUILD_TARGET := $(addsuffix -dtb,$(KBUILD_IMAGE))
KBUILD_IMAGE := $(boot)/$(addsuffix -dtb,$(KBUILD_IMAGE))
endif
KBUILD_DTBS := dtbs
@ -130,7 +135,7 @@ ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y)
export DTC_FLAGS := -@
endif
all: $(KBUILD_DTBS) $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME))
all: $(KBUILD_DTBS) $(KBUILD_TARGET)
Image: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

View file

@ -34,7 +34,11 @@ $(obj)/Image: vmlinux FORCE
$(obj)/Image.bz2: $(obj)/Image FORCE
$(call if_changed,bzip2)
$(obj)/Image-dtb: $(obj)/Image $(DTB_OBJS) FORCE
$(obj)/Image-dtb-hdr: $(obj)/Image FORCE
echo -n 'UNCOMPRESSED_IMG' > $@ && \
$(call size_append, $(filter-out FORCE,$^)) >> $@
$(obj)/Image-dtb: $(obj)/Image-dtb-hdr $(obj)/Image $(DTB_OBJS) FORCE
$(call if_changed,cat)
$(obj)/Image.gz: $(obj)/Image FORCE