linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [POWERPC] add target for building .dtb files
@ 2008-02-21 19:19 Grant Likely
  2008-02-21 20:03 ` Grant Erickson
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2008-02-21 19:19 UTC (permalink / raw)
  To: linuxppc-dev, jwboyer

From: Grant Likely <grant.likely@secretlab.ca>

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

---

Josh, is this what your were looking for?

Cheers,
g.
---

 arch/powerpc/Makefile      |    2 +-
 arch/powerpc/boot/Makefile |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index ab5cfe8..dd80825 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -164,7 +164,7 @@ boot := arch/$(ARCH)/boot
 $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
 
-bootwrapper_install:
+bootwrapper_install %.dtb:
 	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
 
 define archhelp
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index d57a67d..fb29f10 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -311,6 +311,10 @@ $(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
 $(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
 	$(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts)
 
+# Rule to build device tree blobs
+$(obj)/%.dtb: $(dtstree)/%.dts $(obj)/dtc
+	$(obj)/dtc -O dtb -o $(obj)/$*.dtb -b 0 $(dtstree)/$*.dts
+
 # If there isn't a platform selected then just strip the vmlinux.
 ifeq (,$(image-y))
 image-y := vmlinux.strip

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

* Re: [PATCH] [POWERPC] add target for building .dtb files
  2008-02-21 19:19 [PATCH] [POWERPC] add target for building .dtb files Grant Likely
@ 2008-02-21 20:03 ` Grant Erickson
  2008-02-21 20:14   ` Scott Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Erickson @ 2008-02-21 20:03 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev

On 2/21/08 11:19 AM, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> 
> ---
> 
> Josh, is this what your were looking for?
> 
> Cheers,
> g.
> ---
> 
>  arch/powerpc/Makefile      |    2 +-
>  arch/powerpc/boot/Makefile |    4 ++++
>  2 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index ab5cfe8..dd80825 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -164,7 +164,7 @@ boot := arch/$(ARCH)/boot
>  $(BOOT_TARGETS): vmlinux
> $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
>  
> -bootwrapper_install:
> +bootwrapper_install %.dtb:
> $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
>  
>  define archhelp
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index d57a67d..fb29f10 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -311,6 +311,10 @@ $(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts
> $(wrapperbits)
>  $(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
> $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts)
>  
> +# Rule to build device tree blobs
> +$(obj)/%.dtb: $(dtstree)/%.dts $(obj)/dtc
> + $(obj)/dtc -O dtb -o $(obj)/$*.dtb -b 0 $(dtstree)/$*.dts
> +

Grant,

Would it be beneficial to provide a way to have environment- or
command-line-provided DTC arguments/flags such that the oft-required '-S
<size>' and '-R <reserved>' flags can be specified? Or, are there reasonable
size and reserved defaults appropriate for all platforms that can be
specified?

FWIW, generating a blob for Haleakala/Kilauea on the PPC405EX[r] using the
above command in the patch results in complaints about lack of space for the
"CHOSEN" node in u-boot.

Regards,

Grant

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

* Re: [PATCH] [POWERPC] add target for building .dtb files
  2008-02-21 20:03 ` Grant Erickson
@ 2008-02-21 20:14   ` Scott Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2008-02-21 20:14 UTC (permalink / raw)
  To: Grant Erickson; +Cc: linuxppc-dev

Grant Erickson wrote:
>> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
>> index d57a67d..fb29f10 100644
>> --- a/arch/powerpc/boot/Makefile
>> +++ b/arch/powerpc/boot/Makefile
>> @@ -311,6 +311,10 @@ $(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts
>> $(wrapperbits)
>>  $(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
>> $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts)
>>  
>> +# Rule to build device tree blobs
>> +$(obj)/%.dtb: $(dtstree)/%.dts $(obj)/dtc
>> + $(obj)/dtc -O dtb -o $(obj)/$*.dtb -b 0 $(dtstree)/$*.dts
>> +
> 
> Grant,
> 
> Would it be beneficial to provide a way to have environment- or
> command-line-provided DTC arguments/flags such that the oft-required '-S
> <size>' and '-R <reserved>' flags can be specified? Or, are there reasonable
> size and reserved defaults appropriate for all platforms that can be
> specified?

These aren't required for the bootwrapper, which is the main purpose of 
the bootwrapper makefile...

> FWIW, generating a blob for Haleakala/Kilauea on the PPC405EX[r] using the
> above command in the patch results in complaints about lack of space for the
> "CHOSEN" node in u-boot.

U-boot should be fixed to not need this.  It's ridiculous.

-Scott

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

end of thread, other threads:[~2008-02-21 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 19:19 [PATCH] [POWERPC] add target for building .dtb files Grant Likely
2008-02-21 20:03 ` Grant Erickson
2008-02-21 20:14   ` Scott Wood

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).