linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: Create directory for target DTB
@ 2015-03-18 12:39 Michal Simek
  2015-03-18 13:20 ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Michal Simek @ 2015-03-18 12:39 UTC (permalink / raw)
  To: linux-kernel, monstr
  Cc: Zach Pfeffer, Nathan Rossi, Arnd Bergmann, catalin.marinas,
	will.deacon, Nathan Rossi, Michal Marek, linux-kbuild

From: Nathan Rossi <nathan.rossi@xilinx.com>

When building specific DTBs out of the kernel tree the vendor subdirs
(boot/dts/<vendor>) are not created, ensure that they are before
building the DTB.

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Changes in v2:
- Use $(dir ${dtc-tmp}) instead of `dirname ${dtc-tmp}`
  Reported-by: Will Deacon <will.deacon@arm.com>

Problem is visible with arm64 for out of tree builds.
make O=/tmp/kkk/ defconfig
make O=/tmp/kkk/ cavium/thunder-88xx.dtb

  DTC     arch/arm64/boot/dts/cavium/thunder-88xx.dtb
cc1: fatal error: opening output file
arch/arm64/boot/dts/cavium/.thunder-88xx.dtb.dts.tmp: No such file or
directory
compilation terminated.
make[2]: *** [arch/arm64/boot/dts/cavium/thunder-88xx.dtb] Error 1
make[1]: *** [cavium/thunder-88xx.dtb] Error 2

Building specific dtb target on arm32 is working fine
make O=/tmp/kkk4/ multi_v7_defconfig
make O=/tmp/kkk4/ zynq-zc702.dtb

This is the way how Yocto is building dtb for specific target.
---
 scripts/Makefile.lib |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 044eb4f..79e8661 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -282,7 +282,8 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 	$(call cmd,dt_S_dtb)
 
 quiet_cmd_dtc = DTC     $@
-cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
+	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
 	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
 		-i $(dir $<) $(DTC_FLAGS) \
 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
-- 
1.7.2.3


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

* Re: [PATCH v2] kbuild: Create directory for target DTB
  2015-03-18 12:39 [PATCH v2] kbuild: Create directory for target DTB Michal Simek
@ 2015-03-18 13:20 ` Will Deacon
  2015-03-29 20:57   ` Olof Johansson
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2015-03-18 13:20 UTC (permalink / raw)
  To: Michal Simek
  Cc: linux-kernel, monstr, Zach Pfeffer, Nathan Rossi, Arnd Bergmann,
	Catalin Marinas, Nathan Rossi, Michal Marek, linux-kbuild, arm

On Wed, Mar 18, 2015 at 12:39:07PM +0000, Michal Simek wrote:
> From: Nathan Rossi <nathan.rossi@xilinx.com>
> 
> When building specific DTBs out of the kernel tree the vendor subdirs
> (boot/dts/<vendor>) are not created, ensure that they are before
> building the DTB.
> 
> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
> Changes in v2:
> - Use $(dir ${dtc-tmp}) instead of `dirname ${dtc-tmp}`
>   Reported-by: Will Deacon <will.deacon@arm.com>

Looks ok to me, but no idea which tree this should go through. Maybe
arm-soc?

  Acked-by: Will Deacon <will.deacon@arm.com>

Will

> Problem is visible with arm64 for out of tree builds.
> make O=/tmp/kkk/ defconfig
> make O=/tmp/kkk/ cavium/thunder-88xx.dtb
> 
>   DTC     arch/arm64/boot/dts/cavium/thunder-88xx.dtb
> cc1: fatal error: opening output file
> arch/arm64/boot/dts/cavium/.thunder-88xx.dtb.dts.tmp: No such file or
> directory
> compilation terminated.
> make[2]: *** [arch/arm64/boot/dts/cavium/thunder-88xx.dtb] Error 1
> make[1]: *** [cavium/thunder-88xx.dtb] Error 2
> 
> Building specific dtb target on arm32 is working fine
> make O=/tmp/kkk4/ multi_v7_defconfig
> make O=/tmp/kkk4/ zynq-zc702.dtb
> 
> This is the way how Yocto is building dtb for specific target.
> ---
>  scripts/Makefile.lib |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 044eb4f..79e8661 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -282,7 +282,8 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
>  	$(call cmd,dt_S_dtb)
>  
>  quiet_cmd_dtc = DTC     $@
> -cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
> +cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
> +	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
>  	$(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
>  		-i $(dir $<) $(DTC_FLAGS) \
>  		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
> -- 
> 1.7.2.3
> 
> 

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

* Re: [PATCH v2] kbuild: Create directory for target DTB
  2015-03-18 13:20 ` Will Deacon
@ 2015-03-29 20:57   ` Olof Johansson
  2015-03-30 12:39     ` Michal Simek
  0 siblings, 1 reply; 4+ messages in thread
From: Olof Johansson @ 2015-03-29 20:57 UTC (permalink / raw)
  To: Will Deacon
  Cc: Michal Simek, linux-kernel, monstr, Zach Pfeffer, Nathan Rossi,
	Arnd Bergmann, Catalin Marinas, Nathan Rossi, Michal Marek,
	linux-kbuild, arm

On Wed, Mar 18, 2015 at 01:20:04PM +0000, Will Deacon wrote:
> On Wed, Mar 18, 2015 at 12:39:07PM +0000, Michal Simek wrote:
> > From: Nathan Rossi <nathan.rossi@xilinx.com>
> > 
> > When building specific DTBs out of the kernel tree the vendor subdirs
> > (boot/dts/<vendor>) are not created, ensure that they are before
> > building the DTB.
> > 
> > Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> > Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > ---
> > 
> > Changes in v2:
> > - Use $(dir ${dtc-tmp}) instead of `dirname ${dtc-tmp}`
> >   Reported-by: Will Deacon <will.deacon@arm.com>
> 
> Looks ok to me, but no idea which tree this should go through. Maybe
> arm-soc?
> 
>   Acked-by: Will Deacon <will.deacon@arm.com>

Sure. Please resend with appropriate acks to arm@kernel.org and we can apply it.


-Olof


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

* Re: [PATCH v2] kbuild: Create directory for target DTB
  2015-03-29 20:57   ` Olof Johansson
@ 2015-03-30 12:39     ` Michal Simek
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Simek @ 2015-03-30 12:39 UTC (permalink / raw)
  To: Olof Johansson, Will Deacon
  Cc: Michal Simek, linux-kernel, monstr, Zach Pfeffer, Nathan Rossi,
	Arnd Bergmann, Catalin Marinas, Nathan Rossi, Michal Marek,
	linux-kbuild, arm

On 03/29/2015 10:57 PM, Olof Johansson wrote:
> On Wed, Mar 18, 2015 at 01:20:04PM +0000, Will Deacon wrote:
>> On Wed, Mar 18, 2015 at 12:39:07PM +0000, Michal Simek wrote:
>>> From: Nathan Rossi <nathan.rossi@xilinx.com>
>>>
>>> When building specific DTBs out of the kernel tree the vendor subdirs
>>> (boot/dts/<vendor>) are not created, ensure that they are before
>>> building the DTB.
>>>
>>> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>> ---
>>>
>>> Changes in v2:
>>> - Use $(dir ${dtc-tmp}) instead of `dirname ${dtc-tmp}`
>>>   Reported-by: Will Deacon <will.deacon@arm.com>
>>
>> Looks ok to me, but no idea which tree this should go through. Maybe
>> arm-soc?
>>
>>   Acked-by: Will Deacon <will.deacon@arm.com>
> 
> Sure. Please resend with appropriate acks to arm@kernel.org and we can apply it.

Sent.

Thanks,
Michal


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

end of thread, other threads:[~2015-03-30 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 12:39 [PATCH v2] kbuild: Create directory for target DTB Michal Simek
2015-03-18 13:20 ` Will Deacon
2015-03-29 20:57   ` Olof Johansson
2015-03-30 12:39     ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).