]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Depend only on required of-platdata files
authorSimon Glass <sjg@chromium.org>
Wed, 24 Mar 2021 17:40:50 +0000 (06:40 +1300)
committerSimon Glass <sjg@chromium.org>
Fri, 26 Mar 2021 04:03:08 +0000 (17:03 +1300)
When OF_PLATDATA_INST is enabled, we need dt-uclass.c and dt-device.c for
the build to work. When OF_PLATDATA_INST is not enabled, we only need
dt-plat.c

Update the Makefile rules to indicate this.

At present all files are generated and compiled regardless of which are
actually needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
scripts/Makefile.spl

index 4f5876dad954d5fafdea0a2f982ab9057cd8e1c3..5f37a82931e0b8cf49ecbe2c570b179d49ea876a 100644 (file)
@@ -120,8 +120,11 @@ endif
 u-boot-spl-init := $(head-y)
 u-boot-spl-main := $(libs-y)
 ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA
-u-boot-spl-platdata := $(obj)/dts/dt-plat.o $(obj)/dts/dt-uclass.o \
-       $(obj)/dts/dt-device.o
+ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA_INST
+u-boot-spl-platdata := $(obj)/dts/dt-uclass.o $(obj)/dts/dt-device.o
+else
+u-boot-spl-platdata := $(obj)/dts/dt-plat.o
+endif
 u-boot-spl-platdata_c := $(patsubst %.o,%.c,$(u-boot-spl-platdata))
 endif