From: Ferass El Hafidi <funderscore@postmarketos.org>
To: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Quentin Schulz <quentin.schulz@cherry.de>,
Kory Maincent <kory.maincent@bootlin.com>,
Simon Glass <sjg@chromium.org>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Anshul Dalal <anshuld@ti.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Martin Schwan <m.schwan@phytec.de>,
David Zang <davidzangcs@gmail.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
Christian Marangi <ansuelsmth@gmail.com>
Subject: Re: [PATCH 1/2] autoboot: allow custom prompt without requiring AUTOBOOT_KEYED
Date: Wed, 08 Apr 2026 16:35:33 +0000 [thread overview]
Message-ID: <td6osk.387waa70kc9gn@postmarketos.org> (raw)
In-Reply-To: <td32mt.vpwrp72jgt4m@postmarketos.org>
Hi Tom,
On Mon, 06 Apr 2026 17:41, Ferass El Hafidi <funderscore@postmarketos.org> wrote:
>On Mon, 06 Apr 2026 16:10, Tom Rini <trini@konsulko.com> wrote:
>>On Mon, Apr 06, 2026 at 03:39:38PM +0000, Ferass El Hafidi wrote:
>>> On Mon, 06 Apr 2026 15:30, Tom Rini <trini@konsulko.com> wrote:
>>> > On Sun, Apr 05, 2026 at 10:49:04AM +0000, Ferass El Hafidi wrote:
>>> >
>>> > > The autoboot prompt used to only be customizable in Kconfig when
>>> > > AUTOBOOT_KEYED was enabled. For a usecase such as having a nicer
>>> > > autoboot prompt alongside a splash screen, there is no reason for
>>> > > AUTOBOOT_KEYED to be required for this.
>>> > >
>>> > > Remove the dependency to AUTOBOOT_KEYED, and use AUTOBOOT_PROMPT in
>>> > > print_boot_delay() instead of a hardcoded string.
>>> > >
>>> > > Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
>>> > > ---
>>> > > boot/Kconfig | 31 ++++++++++++++++---------------
>>> > > common/autoboot.c | 4 +++-
>>> > > 2 files changed, 19 insertions(+), 16 deletions(-)
>>> > >
>>> > > diff --git a/boot/Kconfig b/boot/Kconfig
>>> > > index bfed452d77e..6c8ec356996 100644
>>> > > --- a/boot/Kconfig
>>> > > +++ b/boot/Kconfig
>>> > > @@ -1560,6 +1560,22 @@ config AUTOBOOT
>>> > > help
>>> > > This enables the autoboot. See doc/README.autoboot for detail.
>>> > > +config AUTOBOOT_PROMPT
>>> > > + string "Autoboot stop prompt"
>>> > > + default "Autoboot in %d seconds\\n" if AUTOBOOT_KEYED
>>> > > + default "\\rHit any key to stop autoboot: %d"
>>> > > + help
>>> > > + This string is displayed before the boot delay selected by
>>> > > + CONFIG_BOOTDELAY starts. If it is not defined there is no
>>> > > + output indicating that autoboot is in progress.
>>> > > +
>>> > > + Note that this define is used as the (only) argument to a
>>> > > + printf() call, so it may contain '%' format specifications,
>>> > > + provided that it also includes, separated by commas exactly
>>> > > + like in a printf statement, the required arguments. It is
>>> > > + the responsibility of the user to select only such arguments
>>> > > + that are valid in the given context.
>>> > > +
>>> > > if AUTOBOOT
>>> > > config BOOTDELAY
>>> > > @@ -1597,21 +1613,6 @@ config AUTOBOOT_FLUSH_STDIN
>>> > > This can't be enabled for the sandbox as flushing stdin would
>>> > > break the autoboot unit tests.
>>> > > -config AUTOBOOT_PROMPT
>>> > > - string "Autoboot stop prompt"
>>> > > - default "Autoboot in %d seconds\\n"
>>> > > - help
>>> > > - This string is displayed before the boot delay selected by
>>> > > - CONFIG_BOOTDELAY starts. If it is not defined there is no
>>> > > - output indicating that autoboot is in progress.
>>> > > -
>>> > > - Note that this define is used as the (only) argument to a
>>> > > - printf() call, so it may contain '%' format specifications,
>>> > > - provided that it also includes, separated by commas exactly
>>> > > - like in a printf statement, the required arguments. It is
>>> > > - the responsibility of the user to select only such arguments
>>> > > - that are valid in the given context.
>>> > > -
>>> > > config AUTOBOOT_ENCRYPTION
>>> > > bool "Enable encryption in autoboot stopping"
>>> > > help
>>> > > diff --git a/common/autoboot.c b/common/autoboot.c
>>> > > index 1783ef92c94..d12d618fea3 100644
>>> > > --- a/common/autoboot.c
>>> > > +++ b/common/autoboot.c
>>> > > @@ -379,7 +379,9 @@ static int abortboot_key_sequence(int bootdelay)
>>> > > static void print_boot_delay(int bootdelay)
>>> > > {
>>> > > - printf(ANSI_CLEAR_LINE "\rHit any key to stop autoboot: %d", bootdelay);
>>> > > +#ifdef CONFIG_AUTOBOOT_PROMPT
>>> > > + printf(ANSI_CLEAR_LINE CONFIG_AUTOBOOT_PROMPT, bootdelay);
>>> > > +#endif
>>> > > }
>>> > > static int abortboot_single_key(int bootdelay)
>>> >
>>> > We shouldn't need to guard this, as it's always prompted for now during
>>> > configuration, yes?
>>> >
>>>
>>> I did this in case it happened to be unset, and also to provide a way to
>>> silence the prompt entirely.
>>
>>I believe it must be set (there may or may not be some fun around
>>CMDLINE=n), but this doesn't allow for the prompt to be unset, if I'm
>>recalling some of the fun around Kconfig -> defines works (defined to ""
>>is not the same as undefined, we would need to add a new bool Kconfig
>>option, that's why there's USE_PREBOOT and PREBOOT for example).
>>
Thanks, I sent a v2 removing these.
Best regards,
Ferass
next prev parent reply other threads:[~2026-04-08 16:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 10:49 [PATCH 0/2] Autoboot prompt customization and bootmenu cosmetics Ferass El Hafidi
2026-04-05 10:49 ` [PATCH 1/2] autoboot: allow custom prompt without requiring AUTOBOOT_KEYED Ferass El Hafidi
2026-04-06 15:30 ` Tom Rini
2026-04-06 15:39 ` Ferass El Hafidi
2026-04-06 16:10 ` Tom Rini
2026-04-06 17:41 ` Ferass El Hafidi
2026-04-08 16:35 ` Ferass El Hafidi [this message]
2026-04-05 10:49 ` [PATCH 2/2] cmd: bootmenu: ANSI_CLEAR_LINE before entry name Ferass El Hafidi
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=td6osk.387waa70kc9gn@postmarketos.org \
--to=funderscore@postmarketos.org \
--cc=anshuld@ti.com \
--cc=ansuelsmth@gmail.com \
--cc=davidzangcs@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=m.schwan@phytec.de \
--cc=mkorpershoek@kernel.org \
--cc=quentin.schulz@cherry.de \
--cc=semen.protsenko@linaro.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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