All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
@ 2012-04-19 12:36 Wolfgang Denk
  2012-04-19 14:16 ` Simon Glass
  2012-04-21 14:48 ` Wolfgang Denk
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Denk @ 2012-04-19 12:36 UTC (permalink / raw)
  To: u-boot

Current versions of  dtc  always print a message like

	DTC: dts->dtb  on file "dt.dtb.tmp"

which cannot even be suppressed with "-qqq".  To avoid incorrect
MAKEALL status, we manually filter out this message.  This is a bit
complicated, as we have to make sure to set a correct return code.

Also, get rid of the temp file: dtc accepts "-" for stdin.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
---
 dts/Makefile |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dts/Makefile b/dts/Makefile
index 8b13b23..914e479 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -46,9 +46,13 @@ all:	$(obj).depend $(LIB)
 DT_BIN	:= $(obj)dt.dtb
 
 $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
-	cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
-	$(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
-	rm $@.tmp
+	rc=$$( \
+		cat $< | $(CPP) -P $(DTS_CPPFLAGS) - | \
+		{ { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 2>&1 ; \
+		    echo $$? >&3 ; } | \
+		  grep -v '^DTC: dts->dtb  on file' ; \
+	        } 3>&1 ) ; \
+	exit $$rc
 
 process_lds = \
 	$(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
-- 
1.7.7.6

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

* [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
  2012-04-19 12:36 [U-Boot] [PATCH] fdt: avoid bad MAKEALL status Wolfgang Denk
@ 2012-04-19 14:16 ` Simon Glass
  2012-04-19 18:26   ` Wolfgang Denk
  2012-04-21 14:48 ` Wolfgang Denk
  1 sibling, 1 reply; 5+ messages in thread
From: Simon Glass @ 2012-04-19 14:16 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Thu, Apr 19, 2012 at 5:36 AM, Wolfgang Denk <wd@denx.de> wrote:
> Current versions of ?dtc ?always print a message like
>
> ? ? ? ?DTC: dts->dtb ?on file "dt.dtb.tmp"
>
> which cannot even be suppressed with "-qqq". ?To avoid incorrect
> MAKEALL status, we manually filter out this message. ?This is a bit
> complicated, as we have to make sure to set a correct return code.

See the discussion on this patch:

http://patchwork.ozlabs.org/patch/149833/

A patch to fix this has now been accepted to dtc. So if you update dtc
you should find this message goes away.

3cbf829 dtc: Remove spurious output on stderr


>
> Also, get rid of the temp file: dtc accepts "-" for stdin.
>
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
> ?dts/Makefile | ? 10 +++++++---
> ?1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/dts/Makefile b/dts/Makefile
> index 8b13b23..914e479 100644
> --- a/dts/Makefile
> +++ b/dts/Makefile
> @@ -46,9 +46,13 @@ all: $(obj).depend $(LIB)
> ?DT_BIN := $(obj)dt.dtb
>
> ?$(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
> - ? ? ? cat $< | $(CPP) -P $(DTS_CPPFLAGS) - >$@.tmp
> - ? ? ? $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} $@.tmp
> - ? ? ? rm $@.tmp
> + ? ? ? rc=$$( \
> + ? ? ? ? ? ? ? cat $< | $(CPP) -P $(DTS_CPPFLAGS) - | \
> + ? ? ? ? ? ? ? { { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 2>&1 ; \
> + ? ? ? ? ? ? ? ? ? echo $$? >&3 ; } | \
> + ? ? ? ? ? ? ? ? grep -v '^DTC: dts->dtb ?on file' ; \
> + ? ? ? ? ? ? ? } 3>&1 ) ; \
> + ? ? ? exit $$rc
>
> ?process_lds = \
> ? ? ? ?$(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
> --
> 1.7.7.6
>

Regards,
Simon

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

* [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
  2012-04-19 14:16 ` Simon Glass
@ 2012-04-19 18:26   ` Wolfgang Denk
  2012-04-19 18:32     ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2012-04-19 18:26 UTC (permalink / raw)
  To: u-boot

Dear Simon,

In message <CAPnjgZ1=Q0=T_vZDZD47h3J65FHitO+0giUkX7pUrECYp=BOkQ@mail.gmail.com> you wrote:
> 
> A patch to fix this has now been accepted to dtc. So if you update dtc
> you should find this message goes away.
> 
> 3cbf829 dtc: Remove spurious output on stderr

There are many systems out there in the field which are subject to a
rigid policy, and only distribution provided packages get provided.
Many of the "interesting" distributions don't have this fix yet; for
example, Fedora 16 (dtc-1.3.0-2.fc16.x86_64) or Debian Wheezy
(device-tree-compiler 1.3.0-2) bundle DTC version 1.3.0, which is not
fixed yet.

For the sake of those people I would like to apply this patch.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The number you have dialed is imaginary. Please divide by 0  and  try
again.

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

* [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
  2012-04-19 18:26   ` Wolfgang Denk
@ 2012-04-19 18:32     ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2012-04-19 18:32 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 19, 2012 at 11:26 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Simon,
>
> In message <CAPnjgZ1=Q0=T_vZDZD47h3J65FHitO+0giUkX7pUrECYp=BOkQ@mail.gmail.com> you wrote:
>>
>> A patch to fix this has now been accepted to dtc. So if you update dtc
>> you should find this message goes away.
>>
>> 3cbf829 dtc: Remove spurious output on stderr
>
> There are many systems out there in the field which are subject to a
> rigid policy, and only distribution provided packages get provided.
> Many of the "interesting" distributions don't have this fix yet; for
> example, Fedora 16 (dtc-1.3.0-2.fc16.x86_64) or Debian Wheezy
> (device-tree-compiler 1.3.0-2) bundle DTC version 1.3.0, which is not
> fixed yet.
>
> For the sake of those people I would like to apply this patch.

Acked-by: Simon Glass <sjg@chromium.org>

>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> The number you have dialed is imaginary. Please divide by 0 ?and ?try
> again.

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

* [U-Boot] [PATCH] fdt: avoid bad MAKEALL status
  2012-04-19 12:36 [U-Boot] [PATCH] fdt: avoid bad MAKEALL status Wolfgang Denk
  2012-04-19 14:16 ` Simon Glass
@ 2012-04-21 14:48 ` Wolfgang Denk
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2012-04-21 14:48 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,

In message <1334839004-23158-1-git-send-email-wd@denx.de> you wrote:
> Current versions of  dtc  always print a message like
> 
> 	DTC: dts->dtb  on file "dt.dtb.tmp"
> 
> which cannot even be suppressed with "-qqq".  To avoid incorrect
> MAKEALL status, we manually filter out this message.  This is a bit
> complicated, as we have to make sure to set a correct return code.
> 
> Also, get rid of the temp file: dtc accepts "-" for stdin.
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> ---
>  dts/Makefile |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Gods don't like people not doing much work. People  who  aren't  busy
all the time might start to _think_.  - Terry Pratchett, _Small Gods_

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

end of thread, other threads:[~2012-04-21 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 12:36 [U-Boot] [PATCH] fdt: avoid bad MAKEALL status Wolfgang Denk
2012-04-19 14:16 ` Simon Glass
2012-04-19 18:26   ` Wolfgang Denk
2012-04-19 18:32     ` Simon Glass
2012-04-21 14:48 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.