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 <sumit.garg@linaro.org>
Signed-off-by: Marek Vasut <marex@denx.de>
diff --git a/dts/Kconfig b/dts/Kconfig
index 569d4be..385058b 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -125,6 +125,22 @@
help
Select the vendor to build all devicetree files for.
+config OF_UPSTREAM_INCLUDE_LOCAL_FALLBACK_DTBOS
+ bool "Build local DTBOs as fallback for DTBOs missing upstream"
+ default n
+ depends on OF_UPSTREAM
+ help
+ Enable building DTBOs from arch/$(ARCH)/dts as a fallback for
+ DTBOs which are not part of Linux kernel upstream yet. This is
+ a stopgap measure to expedite OF_UPSTREAM switch for platforms
+ which already have main DT in Linux kernel upstream, but still
+ have leftover DTBOs in U-Boot tree.
+
+ Do not use this option, upstream your DTs and DTBOs instead.
+ If the upstreaming is in progress, use with utmost caution.
+
+ If unsure, say N.
+
choice
prompt "Provider of DTB for DT control"
depends on OF_CONTROL