Only pick DTBs from BOARD_PREBUILT_DTBIMAGE_DIR
This change is required to prevent the build system
from picking up DTB files from subdirectories to
BOARD_PREBUILT_DTBIMAGE_DIR.
Test: make bootimage
Bug: 123648105
Change-Id: Ibc2a133f3c9be6362579dc9bf9ca399912b9d8a2
diff --git a/core/Makefile b/core/Makefile
index ea38942..f2988fb 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -840,8 +840,7 @@
ifdef BOARD_PREBUILT_DTBIMAGE_DIR
INSTALLED_DTBIMAGE_TARGET := $(PRODUCT_OUT)/dtb.img
-$(INSTALLED_DTBIMAGE_TARGET) : $(addprefix $(BOARD_PREBUILT_DTBIMAGE_DIR)/,\
- $(call find-files-in-subdirs,$(BOARD_PREBUILT_DTBIMAGE_DIR),*.dtb,.))
+$(INSTALLED_DTBIMAGE_TARGET) : $(sort $(wildcard $(BOARD_PREBUILT_DTBIMAGE_DIR)/*.dtb))
cat $^ > $@
endif