Autoboot when idling at prompt possible?
a.fatoum at pengutronix.de
Thu Mar 16 05:51:39 PDT 2023
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
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
> Kind Regards
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 |
More information about the barebox