From: Stephen Warren Date: Fri, 8 Jun 2012 12:28:17 +0000 (+0000) Subject: fdt: send all dtc output to stderr X-Git-Tag: v2012.07-rc1~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=58e22f8a15adec39d24d060180d76a4cbe86a04b;p=u-boot fdt: send all dtc output to stderr Commit 896bbb5 "fdt: avoid bad MAKEALL status" added logic to capture the result code from dtc by echoing $? to stdout and capturing it using $(). However, dtc emits some diagnostics to stderr and some to stdout. The diagnostics send to stdout ended up getting captured via $() rather than being echo'd to the user. This caused those diagnostics to be passed to the exit command, which would then fail with the following cryptic error message: /bin/sh: line 1: exit: too many arguments Solve this by redirecting all dtc output to stderr so that $() does not capture it. This allows the user to see the actual error message from dtc. Cc: Wolfgang Denk Cc: Simon Glass Cc: albert.u.boot@aribaud.net Cc: Tom Warren Signed-off-by: Stephen Warren Acked-by: Simon Glass --- diff --git a/dts/Makefile b/dts/Makefile index 914e479fb2..402dfe1dce 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -51,7 +51,7 @@ $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts { { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 2>&1 ; \ echo $$? >&3 ; } | \ grep -v '^DTC: dts->dtb on file' ; \ - } 3>&1 ) ; \ + } 3>&1 1>&2 ) ; \ exit $$rc process_lds = \