mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: barebox@lists.infradead.org, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH] input: add handler for reset and power key input events
Date: Mon, 2 Sep 2019 09:24:13 +0200	[thread overview]
Message-ID: <20190902072413.ttga5vkvwaw3zzcb@pengutronix.de> (raw)
In-Reply-To: <536956aa-1857-e50b-4123-6063bac836ef@rempel-privat.de>

On Fri, Aug 30, 2019 at 11:33:22AM +0200, Oleksij Rempel wrote:
> Am 30.08.19 um 11:02 schrieb Ahmad Fatoum:
> > Hello,
> > 
> > On 8/29/19 1:26 PM, duhuanpeng wrote:
> > > Hello, I merged this patch to my barebox. and test on my own board.
> > > 
> > > 1. Abort barebox booting and enter the console.
> > >     the board reboots immediately when I press the button without release.
> > >     here is my .dts about this button:
> > > 
> > >                  net {
> > >                          label = "board:LED1:system";
> > >                          gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
> > >                          default-state = "off";
> > >                          barebox,default-trigger = "net";
> > >                  };
> > 
> > Copy-paste mistake?
> > 
> > > 
> > > 2. Panic.
> > >     type 'go 888' make barebox panic. now I really need a 'reset' key.
> > >     I press and releaes the key, and try to hold this key several seconds.
> > >     no reaction.
> > > 
> > > Is the 'reset' key designed for reset the board when something goes wrong?
> > 
> > That's the watchdog's job. If your hardware features a hardware watchdog, you can
> > have it started on bootm or configure barebox' poller to feed it continuously.
> > If barebox panics or anything else happens before Linux starts feeding the watchdog,
> > your system will then automatically reset.
> > 
> > You could have barebox panic loop on a gpio, but it would only help if barebox
> > actually calls panic. If you run into an infinite loop, or the exception vectors
> > are overwritten, there's nothing barebox can do (short of evolving to barebOS and
> > implementing preemption and privilege separation).
> 
> May be it would make sense to have an option simila to the kernel, to reboot on panic.

We already have that option. It's hidden behind CONFIG_PANIC_HANG.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2019-09-02  7:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29  5:28 Ahmad Fatoum
2019-08-29  6:41 ` Oleksij Rempel
2019-08-30  9:41   ` Ahmad Fatoum
2019-08-29 11:26 ` duhuanpeng
2019-08-30  9:02   ` Ahmad Fatoum
2019-08-30  9:33     ` Oleksij Rempel
2019-09-02  7:24       ` Sascha Hauer [this message]

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=20190902072413.ttga5vkvwaw3zzcb@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=linux@rempel-privat.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