mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Konstantin Kletschke <konstantin.kletschke@inside-m2m.de>,
	barebox@lists.infradead.org
Subject: Re: Autoboot when idling at prompt possible?
Date: Thu, 16 Mar 2023 13:51:39 +0100	[thread overview]
Message-ID: <9bcfc2f8-72f4-b994-0c61-07e34ccc22a0@pengutronix.de> (raw)
In-Reply-To: <ZBMM0s2psJJj+/BI@Hephaistos.inside-m2m.de>

Hello Konstantin,

On 16.03.23 13:34, Konstantin Kletschke wrote:
> Hi there,
> 
> in order to get the booting more robust I already changed
> autoboot_abort_key from "any" to "ctrl-c".
> 
> We wan't to keep the autoboot_timeout to be able to access the
> bootloader prompt manually or with install tools more reliably to a non
> zero positive value. I.e. enter prompt with timeout greater than zero
> still should be possible.

If you keep ctrl+c pressed during boot, you may abort before init runs,
even if global.autboot_timeout=0.

> Is there a mechanism already implemented or thinkable to be added as a
> command, which boots when the prompt is idling for a couple of minutes?
> Lets say the bootloader caught ctrl-c by accident (free serial pins in
> headless encasing in rough EMV environment) and idles there
> for years...

You can enable watchdog before init runs, e.g. in your board code, let's
say with a timeout of 2 minutes. If you have reason to use the shell, you
run wd -x manually or set global.autoboot=abort and reset.

You may need to enable watchdog poller support if you have a watchdog timer
that can't be disabled and you want for barebox to periodically poll it
instead.

This is readily possible. You can still set a shorter boot watchdog timeout
with global.boot.watchdog_timeout. Other possibilities:

 - Allow entering bootloader shell only after systemctl reboot loader
   (See barebox reboot mode documentation)

 - Add option to have barebox password login at most increase countdown,
   but not abort it. Users must then enter full password within specified
   time or system autoboots

Cheers,
Ahmad

> 
> Kind Regards
> Konstantin
> 
> 

-- 
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:[~2023-03-16 12:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 12:34 Konstantin Kletschke
2023-03-16 12:51 ` Ahmad Fatoum [this message]
2023-03-17 17:35   ` Konstantin Kletschke

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=9bcfc2f8-72f4-b994-0c61-07e34ccc22a0@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=konstantin.kletschke@inside-m2m.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