[PATCH v2 3/4] Documentation: bootchooser: add information about attempts_locked

Lars Schmidt l.schmidt at pengutronix.de
Tue Jun 17 02:00:10 PDT 2025


On 17.06.25 10:42, Sascha Hauer wrote:
> On Mon, Jun 16, 2025 at 05:06:56PM +0200, Lars Schmidt wrote:
>> The new attempts_locked variable does have influence on
>> remaining_attempts counter.
>>
>> While at it, also make mention in the bootstate.dtsi.
>>
>> Signed-off-by: Lars Schmidt <l.schmidt at pengutronix.de>
>> ---
>>  Documentation/user/bootchooser.rst | 23 +++++++++++++++++++++++
>>  arch/arm/dts/bootstate.dtsi        |  5 +++++
>>  2 files changed, 28 insertions(+)
>>
>> diff --git a/Documentation/user/bootchooser.rst b/Documentation/user/bootchooser.rst
>> index 351e1d14e1ead6ba8d329c03c0bc7ed28b523df0..ab0b6c3fc895226f5aa4590944a2cd675a56d985 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 bootchooser boot attempts.
>> +This is done by defining a (32-bit) ``attempts_locked`` variable in the
>> +bootstate and setting its value to ``1`` (usually from userspace).
>> +
>> +The variable affects all targets, is optional and its absence is
>> +interpreted as ``0``, meaning that attempts are decremented normally.
>> +
>> +The ``attempts_locked`` value does not influence the decision on which target
>> +to boot if any, only whether to decrement the attempts when booting.
> This describes what it does, but not what it's good for. Could you add a
> few sentences about it?

I was hoping this is understandable if you read in the context of the already
existing paragraph right before that: "To prevent ending up in an unbootable system....."
As it is meant to be an alternative to global.bootchooser.reset_attempts

I didn't want to get too repetitive, but if you want, I can try to rephrase it.

>
> Sascha
>
Lars



More information about the barebox mailing list