summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-22 19:30:15 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:40 -0700
commitc7674fcb0748a9a15853be7728c3ae887feb75c8 (patch)
treec50b42698dfe54bbe3324d0fb99851030686331d /scripts
parentde3e372abdb553ff3a79f12830bb90252059f662 (diff)
downloadu-boot-c7674fcb0748a9a15853be7728c3ae887feb75c8.tar.gz
u-boot-c7674fcb0748a9a15853be7728c3ae887feb75c8.tar.xz
u-boot-c7674fcb0748a9a15853be7728c3ae887feb75c8.zip
Makefile: Tidy up SPL dtb production
Use the SPL_NAME variable to simplify the rules. Drop the SPL targets clean-files since the SPL and TPL dts/ directories are removed by existing rules. Move the SPL rules into a new spl_dtbs to avoid the complicated $(if) construct. Also drop unused pieces from the 'targets' variable. With this, SPL and TPL have separate dtbs which respect the various u-boot,dm-spl / u-boot,dm-tpl tags. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.spl7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index e83e93e5fc..c92963833b 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -37,6 +37,8 @@ SPL_BIN := u-boot-spl
SPL_NAME := spl
endif
+export SPL_NAME
+
ifdef CONFIG_SPL_BUILD
SPL_ := SPL_
ifeq ($(CONFIG_TPL_BUILD),y)
@@ -459,9 +461,8 @@ endif
PHONY += FORCE
FORCE:
-PHONY += dtbs
-dtbs:
- $(Q)$(MAKE) $(build)=dts dtbs
+$(obj)/dts/dt-$(SPL_NAME).dtb: dts/dt.dtb
+ $(Q)$(MAKE) $(build)=$(obj)/dts spl_dtbs
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.