From: Dmitry Shmidt Date: Tue, 28 Mar 2017 20:30:18 +0000 (-0700) Subject: ANDROID: arm64: Allow to choose appended kernel image X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d96012b4aa2b50aaf23f6a26ff66c9d88910d484;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ANDROID: arm64: Allow to choose appended kernel image By default appended kernel image is Image.gz-dtb. New config option BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME allows to choose between Image.gz-dtb and Image-dtb. Change-Id: I1c71b85136f1beeb61782e4646820718c1ccd7e4 Signed-off-by: Dmitry Shmidt [AmitP: Add BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME as one of the default build targets to align with upstream commit 06995804b57 ("arm64: Use full path in KBUILD_IMAGE definition")] Signed-off-by: Amit Pundir --- diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index e671d12e97d3..9cb3e54cdee5 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1096,6 +1096,26 @@ config BUILD_ARM64_APPENDED_DTB_IMAGE DTBs to be built by default (instead of a standalone Image.gz.) The image will built in arch/arm64/boot/Image.gz-dtb +choice + prompt "Appended DTB Kernel Image name" + depends on BUILD_ARM64_APPENDED_DTB_IMAGE + help + Enabling this option will cause a specific kernel image Image or + Image.gz to be used for final image creation. + The image will built in arch/arm64/boot/IMAGE-NAME-dtb + + config IMG_GZ_DTB + bool "Image.gz-dtb" + config IMG_DTB + bool "Image-dtb" +endchoice + +config BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME + string + depends on BUILD_ARM64_APPENDED_DTB_IMAGE + default "Image.gz-dtb" if IMG_GZ_DTB + default "Image-dtb" if IMG_DTB + config BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES string "Default dtb names" depends on BUILD_ARM64_APPENDED_DTB_IMAGE diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 7bea64595661..a3bda11406e4 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -115,14 +115,14 @@ core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a # Default target when executing plain make boot := arch/arm64/boot ifeq ($(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE),y) -KBUILD_IMAGE := $(boot)/Image.gz-dtb +KBUILD_IMAGE := $(boot)/$(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME)) else KBUILD_IMAGE := $(boot)/Image.gz endif KBUILD_DTBS := dtbs -all: Image.gz $(KBUILD_DTBS) +all: Image.gz $(KBUILD_DTBS) $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_KERNEL_IMAGE_NAME)) Image: vmlinux