diff options
author | David Ng <dave@codeaurora.org> | 2012-07-27 18:39:48 -0700 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-11-01 15:31:15 +0200 |
commit | b15154e62eab53f90d3ac213a3833dc7ccbb72fb (patch) | |
tree | eb247455d22828cee6a829b42e121865c290ea20 /core/Makefile | |
parent | 2a3745d065e4e1cfd2940acfe1ae75f61244c27c (diff) | |
download | build-b15154e62eab53f90d3ac213a3833dc7ccbb72fb.zip build-b15154e62eab53f90d3ac213a3833dc7ccbb72fb.tar.gz build-b15154e62eab53f90d3ac213a3833dc7ccbb72fb.tar.bz2 |
build: Add support for device tree in boot.img
Add support for optional device tree image (dt.img)
to boot and recovery images. Some devices use kernel device
tree and this adds the device tree image as a section within
the boot/recovery images.
Change-Id: I91431ef2f4b86485895678916e39a8572be878eb
Build: add DT image variable to Makefile
DT image variable is currently present in
generate_extra_images.mk.This file is moved to
build/tasks to support persist image generation
during parallel make. As build/tasks is called
at the end of Makefile, DT image variable is not
available for other images generation like boot and
recovery. Adding this variable in Makefile ensures
the variable is defined before usage
Change-Id: I21f675d8ce648dc1cf1f4f3aede33278300e08c9
CRs-fixed: 548299
Fix the extra dt.img compilation issue.
Add support for optional device tree image (dt.img)
for device that doesnt have TARGET_BOOTIMAGE_USE_EXT2
Change-Id: I6e07b3ca6d049a8ebdad7ea304b4f39e7c846151
Diffstat (limited to 'core/Makefile')
-rw-r--r-- | core/Makefile | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/core/Makefile b/core/Makefile index ab9001a..c737a4d 100644 --- a/core/Makefile +++ b/core/Makefile @@ -530,6 +530,13 @@ ifdef BOARD_KERNEL_PAGESIZE INTERNAL_BOOTIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE) endif +INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img + +ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true) + INTERNAL_BOOTIMAGE_ARGS += --dt $(INSTALLED_DTIMAGE_TARGET) + BOOTIMAGE_EXTRA_DEPS := $(INSTALLED_DTIMAGE_TARGET) +endif + INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true) @@ -555,7 +562,7 @@ else ifndef BOARD_CUSTOM_BOOTIMG_MK ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT)) # PRODUCT_SUPPORTS_BOOT_SIGNER != true -$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_SIGNER) +$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_SIGNER) $(BOOTIMAGE_EXTRA_DEPS) $(call pretty,"Target boot image: $@") $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@.unsigned $(VBOOT_SIGNER) $(FUTILITY) $@.unsigned $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbpubk $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VBOOT_SIGNING_KEY).vbprivk $@.keyblock $@ @@ -570,7 +577,7 @@ bootimage-nodeps: $(MKBOOTIMG) $(VBOOT_SIGNER) else # PRODUCT_SUPPORTS_VBOOT != true -$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) +$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOTIMAGE_EXTRA_DEPS) $(call pretty,"Target boot image: $@") $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) @@ -918,6 +925,10 @@ BOARD_KERNEL_PAGESIZE := $(strip $(BOARD_KERNEL_PAGESIZE)) ifdef BOARD_KERNEL_PAGESIZE INTERNAL_RECOVERYIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE) endif +ifeq ($(strip $(BOARD_KERNEL_SEPARATED_DT)),true) + INTERNAL_RECOVERYIMAGE_ARGS += --dt $(INSTALLED_DTIMAGE_TARGET) + RECOVERYIMAGE_EXTRA_DEPS := $(INSTALLED_DTIMAGE_TARGET) +endif # Keys authorized to sign OTA packages this build will accept. The # build always uses dev-keys for this; release packaging tools will @@ -1002,8 +1013,9 @@ $(recovery_ramdisk): $(MKBOOTFS) $(MINIGZIP) \ $(RECOVERY_INSTALL_OTA_KEYS) ifndef BOARD_CUSTOM_BOOTIMG_MK -$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(recovery_ramdisk) $(recovery_kernel) - $(call build-recoveryimage-target, $@) +$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(recovery_ramdisk) $(recovery_kernel) \ + $(RECOVERYIMAGE_EXTRA_DEPS) + $(call build-recoveryimage-target, $@) endif # BOARD_CUSTOM_BOOTIMG_MK recovery_patch_path := $(call intermediates-dir-for,PACKAGING,recovery_patch) |