From 94dbfc4460b02a34e731594c7b96faf86451f191 Mon Sep 17 00:00:00 2001 From: Holger Assmann Date: Thu, 14 Dec 2023 20:01:25 +0100 Subject: bootchooser: add new value "reset" to reset boot attempts counter bootchooser provides a mechanism that allows for resetting the "remaining_attempts" counters of all enabled boot slots to their defaults. The current possible trigger values to be stored in the defining variable $bootchooser.reset_attempts are "all-zero" (i.e. no attempts left at any boot slot) and "power-on" (i.e. $global.system.reset="POR"). We now want to add the option "reset" (i.e. $global.system.reset="RST") to that list, so that we do not have to perform an entire power cycle every time we need a counter reset. By introducing the "reset" value as an option, we can deliberately cause the bootchooser to set the "remaining_attempts" values to their defaults when performing a generic restart. The restart handler of the main OS is hence responsible that the subsequent barebox run sees "RESET_RST" as reset reason instead of e.g. "RESET_WDG". Signed-off-by: Holger Assmann Link: https://lore.barebox.org/20231214190125.1362776-1-h.assmann@pengutronix.de Signed-off-by: Sascha Hauer --- Documentation/user/bootchooser.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/user/bootchooser.rst b/Documentation/user/bootchooser.rst index db0a4f8898..1a2ce70bb2 100644 --- a/Documentation/user/bootchooser.rst +++ b/Documentation/user/bootchooser.rst @@ -92,6 +92,12 @@ list of space-separated flags. Possible values are: (``$global.system.reset="POR"``) is detected, the ``remaining_attempts`` counters of all enabled targets are reset to their defaults. This means after a power cycle all boot targets will be tried again for the configured number of retries. +- ``reset``: When the bootchooser starts and a generic reset + (``$global.system.reset="RST"``) is detected, the ``remaining_attempts`` + counters of all enabled targets are reset to their defaults. + This means that, if the systems reports a generic restart, the + ``remaining_attempts`` counters of all enabled targets are reset to + their defaults. - ``all-zero``: When the bootchooser starts and the ``remaining_attempts`` counters of all enabled targets are zero, the ``remaining_attempts`` counters of all enabled targets are reset to their defaults. -- cgit v1.2.3