]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Makefile: Move dt_dir definition
authorMarkus Schneider-Pargmann (TI) <msp@baylibre.com>
Mon, 1 Jun 2026 09:30:50 +0000 (11:30 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 12 Jun 2026 19:01:24 +0000 (13:01 -0600)
dt_dir should be usable within architecture Makefiles. Move the
definition of dt_dir above the architecture include.

Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
Makefile

index 4e5c1dd6a1c4526c43da2eed3b0e85981188c852..cb90be978d7eb1943e057779a4336a935a5d691b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -829,6 +829,21 @@ autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \
                                                include/config/auto.conf)
 ifeq ($(autoconf_is_old),)
 include $(srctree)/config.mk
+
+ifeq ($(CONFIG_OF_UPSTREAM),y)
+ifeq ($(CONFIG_CPU_V8M),y)
+dt_dir := dts/upstream/src/arm64
+else
+ifeq ($(CONFIG_ARM64),y)
+dt_dir := dts/upstream/src/arm64
+else
+dt_dir := dts/upstream/src/$(ARCH)
+endif
+endif
+else
+dt_dir := arch/$(ARCH)/dts
+endif
+
 include $(srctree)/arch/$(ARCH)/Makefile
 endif
 endif
@@ -1445,20 +1460,6 @@ dt_binding_check: scripts_dtc
 quiet_cmd_copy = COPY    $@
       cmd_copy = cp $< $@
 
-ifeq ($(CONFIG_OF_UPSTREAM),y)
-ifeq ($(CONFIG_CPU_V8M),y)
-dt_dir := dts/upstream/src/arm64
-else
-ifeq ($(CONFIG_ARM64),y)
-dt_dir := dts/upstream/src/arm64
-else
-dt_dir := dts/upstream/src/$(ARCH)
-endif
-endif
-else
-dt_dir := arch/$(ARCH)/dts
-endif
-
 ifeq ($(CONFIG_MULTI_DTB_FIT),y)
 
 ifeq ($(CONFIG_MULTI_DTB_FIT_LZO),y)