Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44d3b73c authored by Atanas Filipov's avatar Atanas Filipov Committed by Gerrit - the friendly Code Review server
Browse files

arm64: msm: Add support for uncompressed kernel image



The LK bootloader checks for a 20 byte header in the
kernel image to determine if the kernel is uncompressed
with an attached device tree.

Add support to choose between compressed/uncompressed image

Change-Id: I62229187e1f3e0ec11ff4b5a31c36dcee86dc8b7
Signed-off-by: default avatarAtanas Filipov <afilipov@codeaurora.org>
parent 4f11fdea
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
@@ -958,7 +958,32 @@ config BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES
	depends on BUILD_ARM64_APPENDED_DTB_IMAGE
	help
	  Space separated list of names of dtbs to append when
	  building a concatenated Image.gz-dtb.
	  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 DMI
	bool "Enable support for SMBIOS (DMI) tables"
+10 −4
Original line number Diff line number Diff line
@@ -64,11 +64,14 @@ core-$(CONFIG_CRYPTO) += arch/arm64/crypto/
libs-y		:= arch/arm64/lib/ $(libs-y)
libs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/

# Default target when executing plain make
ifeq ($(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE),y)
KBUILD_IMAGE	:= Image.gz-dtb
else
ifeq ($(CONFIG_BUILD_ARM64_KERNEL_COMPRESSION_GZIP),y)
KBUILD_IMAGE   := Image.gz
else
KBUILD_IMAGE   := Image
endif

ifeq ($(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE),y)
KBUILD_IMAGE   := $(addsuffix -dtb,$(KBUILD_IMAGE))
endif

KBUILD_DTBS	:= dtbs
@@ -97,6 +100,9 @@ dtbs_install:
Image.gz-dtb: vmlinux scripts dtbs
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

Image-dtb: vmlinux scripts dtbs
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

PHONY += vdso_install
vdso_install:
	$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
+7 −0
Original line number Diff line number Diff line
@@ -35,6 +35,13 @@ $(obj)/Image.gz: $(obj)/Image FORCE
$(obj)/Image.gz-dtb: $(obj)/Image.gz $(DTB_OBJS) FORCE
	$(call if_changed,cat)

$(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)

install: $(obj)/Image
	$(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
	$(obj)/Image System.map "$(INSTALL_PATH)"