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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Tom Rini-4
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 <[hidden email]>
Cc: Simon Glass <[hidden email]>
Signed-off-by: Tom Rini <[hidden email]>
---
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(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 23be32436922..774aa89a3fe6 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) \
--
1.9.1

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

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

Jean-Jacques Hiblot
On 17/05/2017 20:06, Tom Rini wrote:

> 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 <[hidden email]>
> Cc: Simon Glass <[hidden email]>
> Signed-off-by: Tom Rini <[hidden email]>
> ---
> 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.

> ---
>   scripts/Makefile.lib | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 23be32436922..774aa89a3fe6 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) \
Tested-by: Jean-Jacques Hiblot <[hidden email]>

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

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

Simon Glass-3
In reply to this post by Tom Rini-4
On 17 May 2017 at 12:06, Tom Rini <[hidden email]> wrote:

>
> 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 <[hidden email]>
> Cc: Simon Glass <[hidden email]>
> Signed-off-by: Tom Rini <[hidden email]>
> ---
> 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(-)

Reviewed-by: Simon Glass <[hidden email]>
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: [U-Boot, PATCHv2] scripts/Makefile.lib: Always have ...-u-boot.dtsi be able to override

Tom Rini-4
In reply to this post by Tom Rini-4
On Wed, May 17, 2017 at 02:06:08PM -0400, Tom Rini wrote:

> 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 <[hidden email]>
> Cc: Simon Glass <[hidden email]>
> Signed-off-by: Tom Rini <[hidden email]>
> Tested-by: Jean-Jacques Hiblot <[hidden email]>
> Reviewed-by: Simon Glass <[hidden email]>
Applied to u-boot/master, thanks!

--
Tom

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot

signature.asc (836 bytes) Download Attachment