Skip to contentSkip to conversation

scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

PATCH Superseded Tom Rini 3 participants 4 messages May 17, 2017 – May 19, 2017 Kbuild

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH v2 1/1 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 <[email protected]>
Cc Simon Glass <[email protected]>

---
Changes in v2:
- Go back to using sed to append to the end of the file so that we keep dependencies rather than using cat directly, per Jean-Jacques

---
 scripts/Makefile.lib | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/Makefile.lib +2 -2
index 23be32436922..774aa89a3fe6 100644
@@ -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) \
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

Quoted 6 lines · Tom Rini

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.

Quoted 7 lines
Cc Jean-Jacques Hiblot <[email protected]>
Cc Simon Glass <[email protected]>

---
Changes in v2:
- Go back to using sed to append to the end of the file so that we keep dependencies rather than using cat directly, per Jean-Jacques

Dependencies are okay now.

Quoted 11 lines
---
  scripts/Makefile.lib | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
scripts/Makefile.lib +0 -0
index 23be32436922..774aa89a3fe6 100644
@@ -308,10 +308,10 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 
  quiet_cmd_dtc = DTC     $@

scripts/Makefile.lib $(obj)/%.dtb.S: $(obj)/%.dtb · line 317

Quoted 10 lines
scripts/Makefile.lib +2 -2
  # 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) \
#2 lore raw

PATCH v2 1/1 scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

In reply to Tom Rini
Quoted 10 lines · Tom Rini

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 <[email protected]>
Cc Simon Glass <[email protected]>
Quoted 7 lines

---
Changes in v2:
- Go back to using sed to append to the end of the file so that we keep dependencies rather than using cat directly, per Jean-Jacques

---
 scripts/Makefile.lib | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
author
#3 lore raw

PATCH v2 1/1 scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

In reply to Tom Rini
Quoted 11 lines · Tom Rini

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170518/851588c2/attachment.sig>