Skip to content
Snippets Groups Projects
Commit bcfa69d7 authored by Tim Zimmermann's avatar Tim Zimmermann Committed by Michael Bestas
Browse files

kernel: Support building dtbimage with mkdtboimg.py config

Change-Id: Ic0efbf0308e334c1cfe0df0493caa71afe27a621
parent 0d450dd9
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,8 @@
# For example, for ARM devices,
# use zImage-dtb instead of zImage.
#
# BOARD_DTB_CFG = Path to a mkdtboimg.py config file for dtb.img
#
# BOARD_DTBO_CFG = Path to a mkdtboimg.py config file
#
# BOARD_CUSTOM_DTBOIMG_MK = Path to a custom dtboimage makefile
......@@ -501,6 +503,10 @@ ifeq ($(BOARD_PREBUILT_DTBIMAGE_DIR),)
$(DTB_OUT):
mkdir -p $(DTB_OUT)
ifdef BOARD_DTB_CFG
MKDTBOIMG := $(HOST_OUT_EXECUTABLES)/mkdtboimg.py$(HOST_EXECUTABLE_SUFFIX)
$(INSTALLED_DTBIMAGE_TARGET): $(MKDTBOIMG)
endif
$(INSTALLED_DTBIMAGE_TARGET): $(DTC) $(DTB_OUT)
ifeq ($(TARGET_WANTS_EMPTY_DTB),true)
@rm -f $@
......@@ -510,7 +516,11 @@ else
$(hide) find $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtb" | xargs rm -f
$(call make-dtb-target,$(KERNEL_DEFCONFIG))
$(call make-dtb-target,$(TARGET_KERNEL_DTB))
ifdef BOARD_DTB_CFG
$(MKDTBOIMG) cfg_create $@ $(BOARD_DTB_CFG) -d $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts
else
cat $(shell find $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtb" | sort) > $@
endif # BOARD_DTB_CFG
$(hide) touch -c $(DTB_OUT)
endif # !TARGET_WANTS_EMPTY_DTB
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment