From c7674fcb0748a9a15853be7728c3ae887feb75c8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 22 Dec 2020 19:30:15 -0700 Subject: 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 --- scripts/Makefile.spl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index e83e93e5fc4..c92963833bc 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. -- cgit v1.2.3