From a55c4836f3ac6a35d5eba789071fb27d2343371c Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 17 Oct 2024 03:08:40 +0200 Subject: dts: Add ability to build fallback DTBOs from arch/$(ARCH)/dts Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb. Add dedicated 'dtbos' target which builds only .dtbos and not .dtbs and in case CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS is enabled, build this target for arch/$(ARCH)/dtb to generate local U-Boot specific DTBOs. Adjust top level Makefile so binman would search for .dtb and .dtbo in both OF_UPSTREAM specific paths and arch/$(ARCH)/dtb for the .dtbo case in case CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS is enabled. Reviewed-by: Sumit Garg Signed-off-by: Marek Vasut --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a2e9435c4f8..2e0a2e9f90c 100644 --- a/Makefile +++ b/Makefile @@ -1383,7 +1383,11 @@ of_list := "$(ext_dtb_list)" of_list_dirs := $(dir $(EXT_DTB)) else of_list := $(CONFIG_OF_LIST) +ifneq ($(CONFIG_OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS),) +of_list_dirs := $(dt_dir) arch/$(ARCH)/dts +else of_list_dirs := $(dt_dir) +endif default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE)) endif -- cgit v1.3.1