From patchwork Fri Jun 8 22:28:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 163868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D51BBB6FA8 for ; Sat, 9 Jun 2012 08:28:41 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DEAE6282CD; Sat, 9 Jun 2012 00:28:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5D-l3K-DzgbZ; Sat, 9 Jun 2012 00:28:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0A078282CF; Sat, 9 Jun 2012 00:28:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 344B8282CF for ; Sat, 9 Jun 2012 00:28:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KtVQqnwTenYo for ; Sat, 9 Jun 2012 00:28:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 09A89282CD for ; Sat, 9 Jun 2012 00:28:30 +0200 (CEST) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 92CFF63F7; Fri, 8 Jun 2012 16:31:40 -0600 (MDT) Received: from localhost.localdomain (searspoint.nvidia.com [216.228.112.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 0FAD5E4100; Fri, 8 Jun 2012 16:28:26 -0600 (MDT) From: Stephen Warren To: u-boot@lists.denx.de Date: Fri, 8 Jun 2012 16:28:17 -0600 Message-Id: <1339194497-24208-1-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.7.0.4 X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.96.5 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: Tom Warren Subject: [U-Boot] [PATCH] fdt: send all dtc output to stderr X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Stephen Warren 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 --- dts/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index 914e479..402dfe1 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 = \