]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Build SPL dtbs in the spl/ directory
authorSimon Glass <sjg@chromium.org>
Wed, 23 Dec 2020 02:30:14 +0000 (19:30 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:40 +0000 (12:24 -0700)
Rather than putting these in the top-level dts/ directory (which is
intended for U-Boot proper), put them in the correct subdirectory for
SPL (either spl/ or tpl/). This is where other SPL targets are kept,
so this is more consistent.

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

index 4cd65ce73d4336bddaba7c82abf8fee13227e588..c0a953ffac9937ab00800cbe5bedc0f0fb632343 100644 (file)
@@ -16,10 +16,11 @@ else
 DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
 endif
 
-$(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
+spl/$(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
+       mkdir -p $(dir $@)
        $(call if_changed,fdtgrep)
 
-$(obj)/dt-tpl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
+tpl/$(obj)/dt-tpl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
        $(call if_changed,fdtgrep)
 
 ifeq ($(CONFIG_OF_DTB_PROPS_REMOVE),y)
@@ -55,8 +56,8 @@ obj-$(CONFIG_OF_EMBED) := dt.dtb.o
 endif
 
 dtbs: $(obj)/dt.dtb \
-               $(if $(CONFIG_SPL),$(obj)/dt-spl.dtb) \
-               $(if $(CONFIG_TPL),$(obj)/dt-tpl.dtb)
+               $(if $(CONFIG_SPL),spl/$(obj)/dt-spl.dtb) \
+               $(if $(CONFIG_TPL),tpl/$(obj)/dt-tpl.dtb)
        @:
 
 clean-files := dt.dtb.S dt-spl.dtb.S dt-tpl.dtb.S
index 8ebe6a9840e42ed57e09830458e51ff8067043ef..e83e93e5fc439a3b3a7f4c2f86bc18dc61118799 100644 (file)
@@ -300,7 +300,7 @@ $(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_NAME).dtb FORCE
+$(obj)/$(SPL_BIN).dtb: $(obj)/dts/dt-$(SPL_NAME).dtb FORCE
        $(call if_changed,copy)
 
 pythonpath = PYTHONPATH=scripts/dtc/pylibfdt