From patchwork Tue Nov 6 22:21:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 993951 X-Patchwork-Delegate: sjg@chromium.org 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 Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42qPQK2YKcz9sBh for ; Wed, 7 Nov 2018 09:30:49 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id EE4F9C22768; Tue, 6 Nov 2018 22:25:39 +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_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2 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 17721C22608; Tue, 6 Nov 2018 22:23:14 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0273EC2276B; Tue, 6 Nov 2018 22:22:45 +0000 (UTC) Received: from mail-vk1-f201.google.com (mail-vk1-f201.google.com [209.85.221.201]) by lists.denx.de (Postfix) with ESMTPS id 32070C22771 for ; Tue, 6 Nov 2018 22:22:41 +0000 (UTC) Received: by mail-vk1-f201.google.com with SMTP id e3so3269844vkd.14 for ; Tue, 06 Nov 2018 14:22:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=iqvztHjMsXXJo683ZUYowPIMR2bqLgz/M0OBRERDpls=; b=D8S7QBnYYwfngcwOsg8pny9H+XYV+6qHxhlymGu+WF0fBP7bAQaiz6skA//PluU/JM NrH6ESyK3zt1Nt1t8GaT9GDCi1pcn9GGVuICv/rUq3mQL074b3aL6TIW+bxmrSTm1F3q SoS3advxjUZHU5RXW0+7QJM9GxLmUlUZNgn0ES2ss1+3baApO3Sv+Ze2cBSaNEXFTLhd W5uM/kRSfn7o+RO9o4wtKpkitcPoxSUXqR0CMPNXKb4MU51w5oW8Uo74G2KZJRFHqHiu X1UWOscEtaXCuSK+wTknHzTxy+TiTNtte12WRIfEkVrg6fwvbqtQOpqIY4lCXZ/dEAc1 nXIQ== X-Gm-Message-State: AGRZ1gIoPatD8Cs2CVR21Bp/cgkkm1z9ZSQF3iiOWgScoVK26WDU6MYt 6JdUIRcd84piH/yPkPXUFAVhDlk= X-Google-Smtp-Source: AJdET5ejOv0glCwFUiF5Cvvx0enf0BjWrDA28rRRLMYdd1MzXY1O9ALgU70FsIPLoj16DlRZkP/7fhM= X-Received: by 2002:ab0:b99:: with SMTP id c25mr25453504uak.2.1541542960061; Tue, 06 Nov 2018 14:22:40 -0800 (PST) Date: Tue, 6 Nov 2018 15:21:31 -0700 In-Reply-To: <20181106222142.94537-1-sjg@chromium.org> Message-Id: <20181106222142.94537-15-sjg@chromium.org> Mime-Version: 1.0 References: <20181106222142.94537-1-sjg@chromium.org> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog From: Simon Glass To: U-Boot Mailing List Cc: Baruch Siach , Stephen Warren Subject: [U-Boot] [PATCH 14/25] binman: Add a way to enable debugging from the build 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 the build fails due to something wrong in binman it is sometimes useful to get a full backtrace showing the location of the failure. Add a BINMAN_DEBUG environment variable to support this along with some documentation. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- Makefile | 6 ++++-- tools/binman/README | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 250eb6c3c39..c7df436a161 100644 --- a/Makefile +++ b/Makefile @@ -1048,9 +1048,11 @@ u-boot.ldr: u-boot # binman # --------------------------------------------------------------------------- +# Use 'make BINMAN_DEBUG=1' to enable debugging quiet_cmd_binman = BINMAN $@ -cmd_binman = $(srctree)/tools/binman/binman -d u-boot.dtb -O . \ - -I . -I $(srctree)/board/$(BOARDDIR) $< +cmd_binman = $(srctree)/tools/binman/binman -u -d u-boot.dtb -O . -m \ + -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \ + $(if $(BINMAN_DEBUG),-D) $(BINMAN_$(@F)) $< OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex diff --git a/tools/binman/README b/tools/binman/README index b64dedf2ebc..04ed2b799c8 100644 --- a/tools/binman/README +++ b/tools/binman/README @@ -723,6 +723,12 @@ If you need to specify a particular device-tree compiler to use, you can define the DTC environment variable. This can be useful when the system dtc is too old. +To enable a full backtrace and other debugging features in binman, pass +BINMAN_DEBUG=1 to your build: + + make sandbox_defconfig + make BINMAN_DEBUG=1 + History / Credits -----------------