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
This commit is contained in:
Bruno Martins
2023-09-14 18:21:31 +01:00
parent 47931c121e
commit 3056928d1c

View File

@@ -579,7 +579,7 @@ else
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