summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-05-17 18:06:08 (GMT)
committerTom Rini <trini@konsulko.com>2017-05-18 21:17:01 (GMT)
commit7452946e7f3742b3ff1cb4a50603e7492aceea88 (patch)
treef6b887f940dc43fc18618be52378c4c074a78ec8 /scripts
parentfa8967cfbaed5582ba987756fa9f0470a9affbf4 (diff)
downloadu-boot-7452946e7f3742b3ff1cb4a50603e7492aceea88.tar.xz
scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override
The intention of having a -u-boot.dtsi file is to be able to make changes to the provided upstream dts files as well as to be able to add nodes. Change the logic for adding the file from making it the last included file at the top of the dts to being included at the end of the file. Cc: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Tested-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.lib4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 23be324..774aa89 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -308,10 +308,10 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
quiet_cmd_dtc = DTC $@
# Modified for U-Boot
-# Bring in any U-Boot-specific include after the '/dts-v1/;' header
+# Bring in any U-Boot-specific include at the end of the file
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
cat $< $(if $(u_boot_dtsi),\
- | sed '/^\/ {$$/{x;s%$$%\#include \"$(u_boot_dtsi)\"%;G;}') | \
+ | sed "$$ a\#include \"$(u_boot_dtsi)\"") | \
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) - ; \
$(DTC) -O dtb -o $@ -b 0 \
-i $(dir $<) $(DTC_FLAGS) \