mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory
@ 2015-10-22  3:34 Masahiro Yamada
  2015-10-22  3:34 ` [PATCH 2/2] kbuild: Don't assume dts files live in arch/*/boot/dts Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Masahiro Yamada @ 2015-10-22  3:34 UTC (permalink / raw)
  To: barebox

For the pre-processor to include sources below dts/ directory,
-I$(srctree)/dts/src is specified as an include path.  On the other
hand, for the DTC-native, -i $(srctree)/dts/src/$(SRCARCH) is
currently specified.

Theoretically, the pre-processor style (#include) and DTC-native
style (/include/) should work with the same include paths.

Currently, there are no users for the latter, so we can fix it safely.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index e991f33..c529d15 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -258,7 +258,7 @@ quiet_cmd_dtc = DTC     $@
 cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
 	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
 		-i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
-		-i $(srctree)/dts/src/$(SRCARCH) \
+		-i $(srctree)/dts/src/ \
 		-d $(depfile).dtc $(dtc-tmp) ; \
 	cat $(depfile).pre $(depfile).dtc > $(depfile)
 
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] kbuild: Don't assume dts files live in arch/*/boot/dts
  2015-10-22  3:34 [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Masahiro Yamada
@ 2015-10-22  3:34 ` Masahiro Yamada
  2015-10-22  7:35 ` [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Sascha Hauer
  2015-10-22 13:16 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2015-10-22  3:34 UTC (permalink / raw)
  To: barebox

Barebox has not adopted arch/$(SRCARCH)/dts/$(VENDOR)/ directory
to contain device trees yet, but it is possible in the future.
(you can see that in ARM64 Linux)

It is better to use $(dir $<) rather than hardcoding the particular
include path (and this is the way used in Linux).

Refer commit ad06156876c0e55a01e13e1f2dd5c7f9262b1dfa ("kbuild: Don't
assume dts files live in arch/*/boot/dts") of Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index c529d15..46ced28 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -257,7 +257,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb $(srctree)/scripts/gen-dtb-s FORCE
 quiet_cmd_dtc = DTC     $@
 cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
 	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
-		-i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
+		-i $(dir $<) $(DTC_FLAGS) \
 		-i $(srctree)/dts/src/ \
 		-d $(depfile).dtc $(dtc-tmp) ; \
 	cat $(depfile).pre $(depfile).dtc > $(depfile)
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory
  2015-10-22  3:34 [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Masahiro Yamada
  2015-10-22  3:34 ` [PATCH 2/2] kbuild: Don't assume dts files live in arch/*/boot/dts Masahiro Yamada
@ 2015-10-22  7:35 ` Sascha Hauer
  2015-10-22 13:16 ` Sascha Hauer
  2 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2015-10-22  7:35 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Thu, Oct 22, 2015 at 12:34:06PM +0900, Masahiro Yamada wrote:
> For the pre-processor to include sources below dts/ directory,
> -I$(srctree)/dts/src is specified as an include path.  On the other
> hand, for the DTC-native, -i $(srctree)/dts/src/$(SRCARCH) is
> currently specified.
> 
> Theoretically, the pre-processor style (#include) and DTC-native
> style (/include/) should work with the same include paths.
> 
> Currently, there are no users for the latter, so we can fix it safely.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Applied both, thanks

Sascha

> ---
> 
>  scripts/Makefile.lib | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index e991f33..c529d15 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -258,7 +258,7 @@ quiet_cmd_dtc = DTC     $@
>  cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
>  	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
>  		-i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
> -		-i $(srctree)/dts/src/$(SRCARCH) \
> +		-i $(srctree)/dts/src/ \
>  		-d $(depfile).dtc $(dtc-tmp) ; \
>  	cat $(depfile).pre $(depfile).dtc > $(depfile)
>  
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory
  2015-10-22  3:34 [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Masahiro Yamada
  2015-10-22  3:34 ` [PATCH 2/2] kbuild: Don't assume dts files live in arch/*/boot/dts Masahiro Yamada
  2015-10-22  7:35 ` [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Sascha Hauer
@ 2015-10-22 13:16 ` Sascha Hauer
  2015-10-23  6:53   ` Masahiro Yamada
  2 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2015-10-22 13:16 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: barebox

On Thu, Oct 22, 2015 at 12:34:06PM +0900, Masahiro Yamada wrote:
> For the pre-processor to include sources below dts/ directory,
> -I$(srctree)/dts/src is specified as an include path.  On the other
> hand, for the DTC-native, -i $(srctree)/dts/src/$(SRCARCH) is
> currently specified.
> 
> Theoretically, the pre-processor style (#include) and DTC-native
> style (/include/) should work with the same include paths.
> 
> Currently, there are no users for the latter, so we can fix it safely.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  scripts/Makefile.lib | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index e991f33..c529d15 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -258,7 +258,7 @@ quiet_cmd_dtc = DTC     $@
>  cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
>  	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
>  		-i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
> -		-i $(srctree)/dts/src/$(SRCARCH) \
> +		-i $(srctree)/dts/src/ \
>  		-d $(depfile).dtc $(dtc-tmp) ; \
>  	cat $(depfile).pre $(depfile).dtc > $(depfile)

Seems there are indeed users for this. This patch breaks these defconfigs:

 config:     arm              am335x_defconfig
FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-bone-common.dtb' failed
make[1]: *** [arch/arm/dts/am335x-bone-common.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-afi-gf.dtb' failed
make[1]: *** [arch/arm/dts/am335x-afi-gf.dtb] Error 1
Makefile:772: recipe for target 'arch/arm/dts' failed
make: *** [arch/arm/dts] Error 2
make: *** Waiting for unfinished jobs....


 config:     arm              am335x_mlo_defconfig
FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-afi-gf.dtb' failed
make[1]: *** [arch/arm/dts/am335x-afi-gf.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-bone-common.dtb' failed
make[1]: *** [arch/arm/dts/am335x-bone-common.dtb] Error 1
Makefile:772: recipe for target 'arch/arm/dts' failed
make: *** [arch/arm/dts] Error 2
make: *** Waiting for unfinished jobs....


 config:     arm              mvebu_defconfig
FATAL ERROR: Couldn't open "skeleton64.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/armada-xp-gp-bb.dtb' failed
make[1]: *** [arch/arm/dts/armada-xp-gp-bb.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
FATAL ERROR: Couldn't open "skeleton64.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dtb' failed
make[1]: *** [arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dtb] Error 1
FATAL ERROR: Couldn't open "skeleton64.dtsi": No such file or directory
scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/armada-370-mirabox-bb.dtb' failed
make[1]: *** [arch/arm/dts/armada-370-mirabox-bb.dtb] Error 1
Makefile:772: recipe for target 'arch/arm/dts' failed
make: *** [arch/arm/dts] Error 2
make: *** Waiting for unfinished jobs....

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory
  2015-10-22 13:16 ` Sascha Hauer
@ 2015-10-23  6:53   ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2015-10-23  6:53 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Sascha,



Sorry, this problems seem to happen both #include and /include/
are used in mixture.

I will re-consider how they should be handled.

Disregard my patches for now.

Masahiro



2015-10-22 22:16 GMT+09:00 Sascha Hauer <s.hauer@pengutronix.de>:
> On Thu, Oct 22, 2015 at 12:34:06PM +0900, Masahiro Yamada wrote:
>> For the pre-processor to include sources below dts/ directory,
>> -I$(srctree)/dts/src is specified as an include path.  On the other
>> hand, for the DTC-native, -i $(srctree)/dts/src/$(SRCARCH) is
>> currently specified.
>>
>> Theoretically, the pre-processor style (#include) and DTC-native
>> style (/include/) should work with the same include paths.
>>
>> Currently, there are no users for the latter, so we can fix it safely.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>>
>>  scripts/Makefile.lib | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index e991f33..c529d15 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -258,7 +258,7 @@ quiet_cmd_dtc = DTC     $@
>>  cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
>>       $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
>>               -i $(srctree)/arch/$(SRCARCH)/dts $(DTC_FLAGS) \
>> -             -i $(srctree)/dts/src/$(SRCARCH) \
>> +             -i $(srctree)/dts/src/ \
>>               -d $(depfile).dtc $(dtc-tmp) ; \
>>       cat $(depfile).pre $(depfile).dtc > $(depfile)
>
> Seems there are indeed users for this. This patch breaks these defconfigs:
>
>  config:     arm              am335x_defconfig
> FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-bone-common.dtb' failed
> make[1]: *** [arch/arm/dts/am335x-bone-common.dtb] Error 1
> make[1]: *** Waiting for unfinished jobs....
> FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-afi-gf.dtb' failed
> make[1]: *** [arch/arm/dts/am335x-afi-gf.dtb] Error 1
> Makefile:772: recipe for target 'arch/arm/dts' failed
> make: *** [arch/arm/dts] Error 2
> make: *** Waiting for unfinished jobs....
>
>
>  config:     arm              am335x_mlo_defconfig
> FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-afi-gf.dtb' failed
> make[1]: *** [arch/arm/dts/am335x-afi-gf.dtb] Error 1
> make[1]: *** Waiting for unfinished jobs....
> FATAL ERROR: Couldn't open "am33xx-clocks.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/am335x-bone-common.dtb' failed
> make[1]: *** [arch/arm/dts/am335x-bone-common.dtb] Error 1
> Makefile:772: recipe for target 'arch/arm/dts' failed
> make: *** [arch/arm/dts] Error 2
> make: *** Waiting for unfinished jobs....
>
>
>  config:     arm              mvebu_defconfig
> FATAL ERROR: Couldn't open "skeleton64.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/armada-xp-gp-bb.dtb' failed
> make[1]: *** [arch/arm/dts/armada-xp-gp-bb.dtb] Error 1
> make[1]: *** Waiting for unfinished jobs....
> FATAL ERROR: Couldn't open "skeleton64.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dtb' failed
> make[1]: *** [arch/arm/dts/armada-xp-lenovo-ix4-300d-bb.dtb] Error 1
> FATAL ERROR: Couldn't open "skeleton64.dtsi": No such file or directory
> scripts/Makefile.lib:266: recipe for target 'arch/arm/dts/armada-370-mirabox-bb.dtb' failed
> make[1]: *** [arch/arm/dts/armada-370-mirabox-bb.dtb] Error 1
> Makefile:772: recipe for target 'arch/arm/dts' failed
> make: *** [arch/arm/dts] Error 2
> make: *** Waiting for unfinished jobs....
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



-- 
Best Regards
Masahiro Yamada

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-23  6:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22  3:34 [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Masahiro Yamada
2015-10-22  3:34 ` [PATCH 2/2] kbuild: Don't assume dts files live in arch/*/boot/dts Masahiro Yamada
2015-10-22  7:35 ` [PATCH 1/2] kbuild: fix DTC-native include path for dts/ directory Sascha Hauer
2015-10-22 13:16 ` Sascha Hauer
2015-10-23  6:53   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox