From patchwork Wed Sep 25 14:55:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1167366 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="mezSu0pi"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46dhQt5z63z9sP3 for ; Thu, 26 Sep 2019 01:13:42 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 87E26C21EB4; Wed, 25 Sep 2019 15:11:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5EB3EC22108; Wed, 25 Sep 2019 15:00:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 079CFC21F21; Wed, 25 Sep 2019 15:00:30 +0000 (UTC) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by lists.denx.de (Postfix) with ESMTPS id 69ADCC2203A for ; Wed, 25 Sep 2019 14:58:19 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id u8so14607472iom.5 for ; Wed, 25 Sep 2019 07:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1dagqfBfcOOzekBUWzUQlizdQaycJc8A/rxi1L4NtM8=; b=mezSu0piBYwOFZELPR2HWEEm/TFYEHha2X1haWiDiFW9l1ZLAEWRgY9yCKU2KQkJA8 4Ji8fgt9unvLbZmjTiwf0QRtIZ3MmO0Ra0pM4mwxv3TwfJauM31FWAphzHobNzZpoJVk GsHykl2/HD4AHaOYISOIOIgRvZ0q52wbQg6ZM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1dagqfBfcOOzekBUWzUQlizdQaycJc8A/rxi1L4NtM8=; b=kaYYa0CoY3Lnmnk0XaP52+TGzzBZ3Qec1csxu72vi3q0P3Ym25Cw4PCN5pslHj8yYV ERiYercsxQcNRPRpk9glsGG7JYTBtou6sBIF/AjqfsK4K0PRVhmdjmkTC8lHJgAsf8Ib tU8YuoNou/A9Al+o5/8EqnsEBHSifMYYHgbeZeD93niQkFnlP6kmznZtvNHYV9PP97qB K6JhK7g9JjYdBq/HBTOwUUyG1y3ZqeJrgxMcNMZAwT1d6xqRThBubyi7yEOdue9m6rBn YU363+Txvz15ukND6ROU6qtqubOVyGnDFuwK5QQJJdIfje3HxsHD6f/hEYk2L/EcL+tN Ol3w== X-Gm-Message-State: APjAAAV/GvDEIINP3kILc+25HVXoCWpEda1dfkvQR675esFJoRyZ/bti zxQZQqUwe12HPZx0Rvq05yDWIcz+oJc= X-Google-Smtp-Source: APXvYqz6G+Fqbb2NlCBuoapaYUFjRRFJXIK7OKnwe3vt2XRfUb90j9igvYEJMiR/pEMqMWRA2GnM9w== X-Received: by 2002:a02:a612:: with SMTP id c18mr5534986jam.109.1569423498178; Wed, 25 Sep 2019 07:58:18 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id d9sm4254964ioq.9.2019.09.25.07.58.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2019 07:58:17 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 25 Sep 2019 08:55:58 -0600 Message-Id: <20190925145750.200592-15-sjg@chromium.org> X-Mailer: git-send-email 2.23.0.444.g18eeb5a265-goog In-Reply-To: <20190925145750.200592-1-sjg@chromium.org> References: <20190925145750.200592-1-sjg@chromium.org> MIME-Version: 1.0 Cc: Jerry Van Baren Subject: [U-Boot] [PATCH 014/126] fdt: Show the preprocessed .dts file on error X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When device-tree compilation fails it is sometimes tricky to see which line is broken, since the input file to dtc is a pre-processed version of the device tree. Add a line that points to the file that needs to be checked: Output is something like this: Error: arch/x86/dts/.chromebook_coral.dtb.pre.tmp:170.15-16 syntax error FATAL ERROR: Unable to parse input tree Check /tmp/b/chromebook_coral/arch/x86/dts/.chromebook_coral.dtb.pre.tmp for errors Signed-off-by: Simon Glass --- scripts/Makefile.lib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ef116e0e0ae..c10cd83a0a3 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -300,7 +300,9 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ $(DTC) -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \ - -d $(depfile).dtc.tmp $(dtc-tmp) ; \ + -d $(depfile).dtc.tmp $(dtc-tmp) || \ + (echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \ + ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \ sed -i "s:$(pre-tmp):$(<):" $(depfile)