mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jonas Rebmann <jre@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] Debug: add Kconfig option to abort autoboot
Date: Tue, 24 Feb 2026 16:59:00 +0100	[thread overview]
Message-ID: <9da6e1a2-0753-47dc-9193-dc349e866b11@pengutronix.de> (raw)
In-Reply-To: <20260223153908.1867811-1-s.hauer@pengutronix.de>

Hi Sascha,

On 2026-02-23 16:39, Sascha Hauer wrote:
> For debugging purposes it's sometimes useful when barebox doesn't boot
> through, but stops at the prompt.

Isn't this already compile-time configurable by setting the defaultenv
autoboot to "abort"?

Regards,
Jonas

> This allows for automated debugging
> without having to catch the autoboot timeout first. This normally works
> thanks to labgrid, but at the cost that messages are eaten up by the
> barebox strategy.
> 
> This adds a Kconfig option to just stop at the prompt.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>   common/Kconfig.debug | 6 ++++++
>   common/startup.c     | 4 +++-
>   2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/common/Kconfig.debug b/common/Kconfig.debug
> index b307b84202..13a686d0ad 100644
> --- a/common/Kconfig.debug
> +++ b/common/Kconfig.debug
> @@ -56,6 +56,12 @@ config DEBUG_INITCALLS
>   	help
>   	  If enabled this will print initcall traces.
>   
> +config DEBUG_AUTOBOOT_ABORT
> +	bool "Abort autoboot"
> +	help
> +	  If enabled barebox will not automatically boot but start a shell
> +	  instead.
> +
>   config DEBUG_PBL
>   	bool "Print PBL debugging information"
>   	depends on PBL_CONSOLE
> diff --git a/common/startup.c b/common/startup.c
> index 055d94fe6a..7551813a50 100644
> --- a/common/startup.c
> +++ b/common/startup.c
> @@ -189,7 +189,9 @@ void set_autoboot_state(enum autoboot_state autoboot)
>    */
>   enum autoboot_state do_autoboot_countdown(void)
>   {
> -	static enum autoboot_state autoboot_state = AUTOBOOT_UNKNOWN;
> +	static enum autoboot_state autoboot_state =
> +		IS_ENABLED(CONFIG_DEBUG_AUTOBOOT_ABORT) ?
> +			AUTOBOOT_ABORT : AUTOBOOT_UNKNOWN;
>   	unsigned flags = CONSOLE_COUNTDOWN_EXTERN;
>   	int ret;
>   	struct stat s;

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



  reply	other threads:[~2026-02-24 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 15:39 Sascha Hauer
2026-02-24 15:59 ` Jonas Rebmann [this message]
2026-02-25  7:54   ` Sascha Hauer
2026-02-25  9:52     ` Jonas Rebmann
2026-02-25 10:11       ` Ahmad Fatoum

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=9da6e1a2-0753-47dc-9193-dc349e866b11@pengutronix.de \
    --to=jre@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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