From patchwork Fri Dec 17 03:59:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1569720 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=dOYz/vJg; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JFb1K2F0Wz9t6S for ; Fri, 17 Dec 2021 15:03:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B139834B9; Fri, 17 Dec 2021 05:01:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dOYz/vJg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 01F4683090; Fri, 17 Dec 2021 05:00:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B3880830C3 for ; Fri, 17 Dec 2021 05:00:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x333.google.com with SMTP id r10-20020a056830080a00b0055c8fd2cebdso1356206ots.6 for ; Thu, 16 Dec 2021 20:00:17 -0800 (PST) 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=33PaJs75rjJhc5sBpDbixYJZVvXepQz20GQtnoLO9fg=; b=dOYz/vJgSBoPHqklzMlB3gqu1O3vvNnSnSmKsAPa56bNV7728vJ/Z6CvXtgrTQSZRM JBB2fRR0IFnUtSHzNf10ZLvOsORJrG+42hXTUOCWx2CQtgQZjw7C+fJwfECcEL05AS8e MT5bI4xPwK5mh509q93Ka+VimVrofvVX1eYQw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=33PaJs75rjJhc5sBpDbixYJZVvXepQz20GQtnoLO9fg=; b=XPCK51uV1N5gcAl7i1+sOhvAjSb3qGI00JJB1AB4b9qgriiRXKaLfTFo7KcPTdZSYy UoKsc3BAj3Avz+JgHMNhCFDjXoPYdBc8l2zLWMUvFPyDo5MweU5Imwhpgv4EbkPMHcd8 /EPQDuuW8ZROEvsaBbHHNaoFuwdxxJlw0zqFZDaRWTZqZjJaPY5nufgF6PUDql2rnZLW 3yxzdFgwUFydgTxQNFN6Ofe7tfTbAzU7W0eLzp2tzCZHItxZ1NL2Y1kJNBUYdqqQNlto YH4g/XmuKK2nnUK49sFY6NZ2Udjr7eIZm2+/REB/cqcDBsWoTfAHF7UcqFUKiNejHI1Q De1Q== X-Gm-Message-State: AOAM533YGf7NzZ7C4XKctXJ/BwCQg/tZynK1ZocmUO6E2m90KV5O1OhA 3mcqS2oWuKRkzrTZjFnut405GsBYt7czEA== X-Google-Smtp-Source: ABdhPJy/fJGwuwK/9dru6oa6D3h9CfeZ3Oz8iKnUaCUeBSP3WjCKQ42ZG6sg43cuw3W/VU0+0GLDGQ== X-Received: by 2002:a9d:373:: with SMTP id 106mr910482otv.127.1639713616261; Thu, 16 Dec 2021 20:00:16 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id h14sm1431249ots.22.2021.12.16.20.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 20:00:16 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Sean Anderson , Heinrich Schuchardt , Tom Rini , Mark Kettenis , =?utf-8?q?Fran=C3=A7ois_Ozog?= , Simon Glass , Jerry Van Baren Subject: [PATCH v8 16/32] fdt: Make it easier to debug u-boot.dtsi files Date: Thu, 16 Dec 2021 20:59:23 -0700 Message-Id: <20211217035939.670884-17-sjg@chromium.org> X-Mailer: git-send-email 2.34.1.173.g76aa8bc2d0-goog In-Reply-To: <20211217035939.670884-1-sjg@chromium.org> References: <20211217035939.670884-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean At present one must hack the Makefile to see what is going on with these files. Also it doesn't quite work correctly. Fix this by using an environment variable for debugging. Update the docs also. Signed-off-by: Simon Glass --- Changes in v8: - Add a new patch to make it easier to debug u-boot.dtsi files scripts/Makefile.lib | 4 +++- tools/binman/binman.rst | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 39f03398ed8..b4e63bc0ca4 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -175,7 +175,9 @@ u_boot_dtsi_options_raw = $(warning Automatic .dtsi inclusion: options: \ # Uncomment for debugging # This shows all the files that were considered and the one that we chose. -# u_boot_dtsi_options_debug = $(u_boot_dtsi_options_raw) +ifdef DEVICE_TREE_DEBUG +u_boot_dtsi_options_debug = $(warning $(u_boot_dtsi_options_raw)) +endif # We use the first match u_boot_dtsi = $(strip $(u_boot_dtsi_options_debug) \ diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst index 56f865800e6..3e063d1f86c 100644 --- a/tools/binman/binman.rst +++ b/tools/binman/binman.rst @@ -790,12 +790,14 @@ Binman will search for the following files in arch//dts:: U-Boot will only use the first one that it finds. If you need to include a more general file you can do that from the more specific file using #include. -If you are having trouble figuring out what is going on, you can uncomment -the 'warning' line in scripts/Makefile.lib to see what it has found:: - - # Uncomment for debugging - # This shows all the files that were considered and the one that we chose. - # u_boot_dtsi_options_debug = $(u_boot_dtsi_options_raw) +If you are having trouble figuring out what is going on, you can use +`DEVICE_TREE_DEBUG=1` with your build:: + + make DEVICE_TREE_DEBUG=1 + scripts/Makefile.lib:334: Automatic .dtsi inclusion: options: + arch/arm/dts/juno-r2-u-boot.dtsi arch/arm/dts/-u-boot.dtsi + arch/arm/dts/armv8-u-boot.dtsi arch/arm/dts/armltd-u-boot.dtsi + arch/arm/dts/u-boot.dtsi ... found: "arch/arm/dts/juno-r2-u-boot.dtsi" Updating an ELF file