mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Lars Schmidt <l.schmidt@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 3/4] Documentation: bootchooser: add information about slots_locked
Date: Mon, 16 Jun 2025 12:50:48 +0200	[thread overview]
Message-ID: <2cfc5998-f204-4661-82c2-5738d08584bb@pengutronix.de> (raw)
In-Reply-To: <20250613140805.1229525-4-l.schmidt@pengutronix.de>

Hi,

On 6/13/25 16:08, Lars Schmidt wrote:
> The new slots_locked variable does have influence on
> remaining_attempt counter.
> 
> Signed-off-by: Lars Schmidt <l.schmidt@pengutronix.de>
> ---
>  Documentation/user/bootchooser.rst | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/Documentation/user/bootchooser.rst b/Documentation/user/bootchooser.rst
> index 351e1d14e1..306443270a 100644
> --- a/Documentation/user/bootchooser.rst
> +++ b/Documentation/user/bootchooser.rst
> @@ -77,6 +77,16 @@ no remaining attempts left.
>  To prevent ending up in an unbootable system after a number of failed boot
>  attempts, there is also a built-in mechanism to reset the counters to their defaults,
>  controlled by the ``global.bootchooser.reset_attempts`` variable.
> +Alternatively, counting down the remaining attempts can be disabled by
> +locking the bootchooser slots.

bootchooser boot attempts

> +This is done by defining a (32-bit) ``slots_locked`` variable in the

attempts_locked.

> +bootstate and setting its value to ``1`` (usually from userspace).
> +
> +The variable affects all slots, is optional and its absence is

all targets

> +interpreted as ``0``, meaning that attempts are decremented normally.
> +
> +The ``slots_locked`` value does not influence the decision on which slot

attempts_locked

> +to boot if any, only whether to decrement the attempts when booting.
>  
>  If ``global.bootchooser.retry`` is enabled (set to ``1``), the bootchooser
>  algorithm will iterate through all valid boot targets (and decrease their
> @@ -107,6 +117,19 @@ on the :ref:`reset reason <reset_reason>` (i.e. != WDG) using the
>  This will reset the ``remaining_attempts`` counter of the *last chosen* slot to
>  its default value (``reset_attempts``).
>  
> +Another option is to use ``slots_locked``.

attempted_locked

> +Normally this should be controlled from Linux userspace using the *barebox-state* tool, i.e.::
> +
> +  barebox-state -s  bootstate.slots_locked=1

attempts_locked

> +
> +It can also be locked via the :ref:`bootchooser command <command_bootchooser>`::
> +
> +  bootchooser -l
> +
> +or unlocked::
> +
> +  bootchooser -L
> +
>  
>  .. _dt-utils: https://git.pengutronix.de/cgit/tools/dt-utils
>  

-- 
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:[~2025-06-16 12:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13 14:08 [PATCH 0/4] Add boot slot locking to bootchooser Lars Schmidt
2025-06-13 14:08 ` [PATCH 1/4] bootchooser: implement locking of boot slots Lars Schmidt
2025-06-16 10:44   ` Ahmad Fatoum
2025-06-13 14:08 ` [PATCH 2/4] bootchooser: extend cmd tool by option to set slot locking Lars Schmidt
2025-06-16 10:49   ` Ahmad Fatoum
2025-06-13 14:08 ` [PATCH 3/4] Documentation: bootchooser: add information about slots_locked Lars Schmidt
2025-06-16 10:50   ` Ahmad Fatoum [this message]
2025-06-13 14:08 ` [PATCH 4/4] Documentation: migration-2025.07.0: " Lars Schmidt
2025-06-16 10:51   ` 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=2cfc5998-f204-4661-82c2-5738d08584bb@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.schmidt@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