mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 3/3] pbl: define DEBUG globally when CONFIG_INITCALL_DEBUG=y
Date: Wed, 14 Dec 2022 11:25:04 +0100	[thread overview]
Message-ID: <20221214102504.GA11668@pengutronix.de> (raw)
In-Reply-To: <20221212164212.2358450-3-a.fatoum@pengutronix.de>

On Mon, Dec 12, 2022 at 05:42:12PM +0100, Ahmad Fatoum wrote:
> CONFIG_INITCALL_DEBUG=y is a very useful tool for debugging barebox
> hangs, but it's not so useful if the hang happens very early.
> Define a new CONFIG_PBL_DEBUG symbol that will define DEBUG globally
> in PBL to get more insight into boot hangs.

s/CONFIG_PBL_DEBUG/CONFIG_DEBUG_PBL/

Fixed that and adjusted to subject to the updated patch while applying.

Sascha

> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> v1 -> v2:
>   - changed into separate config option instead of piggy backing
>     CONFIG_DEBUG_INITCALLS (Sascha)
> ---
>  common/Kconfig       | 9 +++++++++
>  scripts/Makefile.lib | 4 ++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/common/Kconfig b/common/Kconfig
> index 19cd79311016..46675dfe2ea7 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -1566,6 +1566,15 @@ config DEBUG_INITCALLS
>  	help
>  	  If enabled this will print initcall traces.
>  
> +config DEBUG_PBL
> +	bool "Print PBL debugging information"
> +	depends on PBL_CONSOLE || DEBUG_LL
> +	help
> +	  If enabled this will enable all debug prints in the prebootloader.
> +	  For this to work, a console needs to be configured in the
> +	  board-specific entry point and configured for either DEBUG_LL
> +	  or PBL_CONSOLE.
> +
>  config DEBUG_PROBES
>  	bool "Trace driver probes/removes"
>  	help
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 85d18f07a2b6..6e0d92cf756d 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -156,6 +156,10 @@ _c_flags       += $(if $(patsubst n%,, \
>  PBL_CPPFLAGS   += $(call cc-option,-fno-sanitize=all)
>  endif
>  
> +ifeq ($(CONFIG_DEBUG_PBL),y)
> +PBL_CPPFLAGS   += -DDEBUG
> +endif
> +
>  # If building barebox in a separate objtree expand all occurrences
>  # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
>  
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2022-12-14 10:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 16:42 [PATCH v2 1/3] ARM: start: print debugging info when CONFIG_DEBUG_INITCALLS Ahmad Fatoum
2022-12-12 16:42 ` [PATCH v2 2/3] RISC-V: " Ahmad Fatoum
2022-12-12 16:42 ` [PATCH v2 3/3] pbl: define DEBUG globally when CONFIG_INITCALL_DEBUG=y Ahmad Fatoum
2022-12-14 10:25   ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221214102504.GA11668@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox