diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-05 22:34:43 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-05 22:34:43 -0500 |
commit | b11f634b1c1be6ab419758c6596c673445e5ac70 (patch) | |
tree | 2329e1ff53c6c543e01d84b7901c53621ad8b7f9 /scripts | |
parent | 720620e6916ba40b9a173bb07706d2c73f3c23e7 (diff) | |
parent | 970349a96dac3ad46c33851b1a773bfe3f1d4b33 (diff) | |
download | u-boot-b11f634b1c1be6ab419758c6596c673445e5ac70.tar.gz |
Merge tag 'dm-pull-5jan21' of git://git.denx.de/u-boot-dm into nextWIP/05Jan2021-next
Driver model: make some udevice fields private
Driver model: Rename U_BOOT_DEVICE et al.
dtoc: Tidy up and add more tests
ns16550 code clean-up
x86 and sandbox minor fixes for of-platdata
dtoc prepration for adding build-time instantiation
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.spl | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 9f1f7445d7..87021e22e5 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -31,10 +31,14 @@ endif ifeq ($(CONFIG_TPL_BUILD),y) SPL_BIN := u-boot-tpl +SPL_NAME := tpl else SPL_BIN := u-boot-spl +SPL_NAME := spl endif +export SPL_NAME + ifdef CONFIG_SPL_BUILD SPL_ := SPL_ ifeq ($(CONFIG_TPL_BUILD),y) @@ -116,7 +120,8 @@ 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-platdata.o +u-boot-spl-platdata := $(obj)/dts/dt-plat.o +u-boot-spl-platdata_c := $(patsubst %.o,%.c,$(u-boot-spl-platdata)) endif # Linker Script @@ -298,22 +303,23 @@ $(obj)/$(SPL_BIN)-pad.bin: $(obj)/$(SPL_BIN) @bss_size_str=$(shell $(NM) $< | awk 'BEGIN {size = 0} /__bss_size/ {size = $$1} END {print "ibase=16; " toupper(size)}' | bc); \ dd if=/dev/zero of=$@ bs=1 count=$${bss_size_str} 2>/dev/null; -$(obj)/$(SPL_BIN).dtb: dts/dt-spl.dtb FORCE +$(obj)/$(SPL_BIN).dtb: $(obj)/dts/dt-$(SPL_NAME).dtb FORCE $(call if_changed,copy) pythonpath = PYTHONPATH=scripts/dtc/pylibfdt -quiet_cmd_dtocc = DTOC C $@ -cmd_dtocc = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ platdata +DTOC_ARGS := $(pythonpath) $(srctree)/tools/dtoc/dtoc \ + -d $(obj)/$(SPL_BIN).dtb -quiet_cmd_dtoch = DTOC H $@ -cmd_dtoch = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ struct +quiet_cmd_dtoc = DTOC $@ +cmd_dtoc = $(DTOC_ARGS) -c $(obj)/dts -C include/generated all quiet_cmd_plat = PLAT $@ cmd_plat = $(CC) $(c_flags) -c $< -o $(filter-out $(PHONY),$@) -targets += $(obj)/dts/dt-platdata.o -$(obj)/dts/dt-platdata.o: $(obj)/dts/dt-platdata.c \ +targets += $(u-boot-spl-platdata) + +$(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c \ include/generated/dt-structs-gen.h prepare FORCE $(call if_changed,plat) @@ -321,11 +327,9 @@ PHONY += dts_dir dts_dir: $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) -include/generated/dt-structs-gen.h: $(obj)/$(SPL_BIN).dtb dts_dir FORCE - $(call if_changed,dtoch) - -$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir FORCE - $(call if_changed,dtocc) +include/generated/dt-structs-gen.h $(u-boot-spl-platdata_c) &: \ + $(obj)/$(SPL_BIN).dtb dts_dir FORCE + $(call if_changed,dtoc) ifdef CONFIG_SAMSUNG ifdef CONFIG_VAR_SIZE_SPL @@ -457,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. |