]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fdt: avoid bad MAKEALL status
authorWolfgang Denk <wd@denx.de>
Thu, 19 Apr 2012 02:36:44 +0000 (02:36 +0000)
committerWolfgang Denk <wd@denx.de>
Sat, 21 Apr 2012 14:48:14 +0000 (16:48 +0200)
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>
Acked-by: Simon Glass <sjg@chromium.org>
dts/Makefile

index 8b13b2324563735cd24a6d6f47d0ce7b7afe5b20..914e479fb2aa6a765d09baef84174f04e2404718 100644 (file)
@@ -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'