kernel: Include DTBOs from OEM/ODM folder in base DTB
It can be the case where OEM/ODM decided to put the main DTBOs
outside vendor/qcom (e.g. vendor/oplus). Support such usecase
by generically allowing all .dtbo files found in all first-level
subdirs to be moved to base DTB folder.
Change-Id: I154d401b560535d1fa8cd7ed4965dd34a4cf75f2
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 49e2776..0574c7c 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -579,7 +579,7 @@
ifeq ($(BOARD_USES_QCOM_MERGE_DTBS_SCRIPT),true)
$(hide) find $(DTBS_BASE) -type f -name "*.dtb*" | xargs rm -f
$(hide) find $(DTBS_OUT) -type f -name "*.dtb*" | xargs rm -f
- mv $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/qcom/*.dtb $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/qcom/*.dtbo $(DTBS_BASE)/
+ mv $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/qcom/*.dtb $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/*/*.dtbo $(DTBS_BASE)/
PATH=$(abspath $(HOST_OUT_EXECUTABLES)):$${PATH} python3 $(BUILD_TOP)/vendor/lineage/build/tools/merge_dtbs.py $(DTBS_BASE) $(DTB_OUT)/arch/$(KERNEL_ARCH)/boot/dts/vendor/qcom $(DTBS_OUT)
cat $(shell find $(DTB_OUT)/out -type f -name "*.dtb" | sort) > $@
else