ANDROID: arm: add config option to build zImage/dtb combo
authorErik Gilling <konkers@android.com>
Mon, 25 Mar 2013 22:04:41 +0000 (15:04 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
Allows a defconfig to set a default dtb to concatenate with a zImage
to create a zImage-dtb.<dtb name>

Signed-off-by: Erik Gilling <konkers@android.com>
Change-Id: I34b643b1c49228fbae88a56e46c93c478089620d

arch/arm/Kconfig
arch/arm/Makefile

index d1346a16076033acb8d3d60e5de846d7ee2e0e3b..a8fa325fdb17acc0ddef4d3578a89fda6ea622aa 100644 (file)
@@ -1854,6 +1854,21 @@ config DEPRECATED_PARAM_STRUCT
          This was deprecated in 2001 and announced to live on for 5 years.
          Some old boot loaders still use this way.
 
+config BUILD_ARM_APPENDED_DTB_IMAGE
+       bool "Build a concatenated zImage/dtb by default"
+       depends on OF
+       help
+         Enabling this option will cause a concatenated zImage and DTB to
+         be built by default (instead of a standalone zImage.)  The image
+         will built in arch/arm/boot/zImage-dtb.<dtb name>
+
+config BUILD_ARM_APPENDED_DTB_IMAGE_NAME
+       string "Default dtb name"
+       depends on BUILD_ARM_APPENDED_DTB_IMAGE
+       help
+         name of the dtb to append when building a concatenated
+         zImage/dtb.
+
 # Compressed boot loader in ROM.  Yes, we really want to ask about
 # TEXT and BSS so we preserve their values in the config files.
 config ZBOOT_ROM_TEXT
index 36ae4454554ce1a11cc65848c60569bf8b3e0abe..ab6889a1a62873e59e2b57aecc4608f649428877 100644 (file)
@@ -303,6 +303,8 @@ libs-y                              := arch/arm/lib/ $(libs-y)
 boot := arch/arm/boot
 ifeq ($(CONFIG_XIP_KERNEL),y)
 KBUILD_IMAGE := $(boot)/xipImage
+else ifeq ($(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE),y)
+KBUILD_IMAGE := $(boot)/zImage-dtb.$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAME)
 else
 KBUILD_IMAGE := $(boot)/zImage
 endif