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

Commit fa16b42d authored by Luca Stefani's avatar Luca Stefani
Browse files

kernel: Allow passing empty DTB to mkbootimg via board-flag

* Boot Image header v2 demands a DTB be passed by default.
* We don't /need/ one at all, as we have and use a dedicated
  DTB partition.
* Signing hates trying to find dtb.img anywhere for some magical
  reason, so cheat and introduce a flag to include a blank one.

Change-Id: I889ce3815476a55829870b30de1b9210283a79ae
parent 8e451618
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -501,12 +501,18 @@ $(DTB_OUT):
	mkdir -p $(DTB_OUT)

$(INSTALLED_DTBIMAGE_TARGET): $(DTC) $(DTB_OUT)
ifeq ($(TARGET_WANTS_EMPTY_DTB),true)
	@rm -f $@
	echo "empty" > $@
else
	@echo "Building dtb.img"
	$(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))
	cat $(shell find $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts -type f -name "*.dtb" | sort) > $@
	$(hide) touch -c $(DTB_OUT)
endif # !TARGET_WANTS_EMPTY_DTB

endif # !BOARD_PREBUILT_DTBIMAGE_DIR
endif # BOARD_INCLUDE_DTB_IN_BOOTIMG