mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH] input: add handler for reset and power key input events
Date: Fri, 30 Aug 2019 11:33:22 +0200	[thread overview]
Message-ID: <536956aa-1857-e50b-4123-6063bac836ef@rempel-privat.de> (raw)
In-Reply-To: <6aad20a4-ca38-2cd0-5df1-4a6b4950ff6a@pengutronix.de>

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.

--
Regards,
Oleksij

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

  reply	other threads:[~2019-08-30  9:33 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 [this message]
2019-09-02  7:24       ` Sascha Hauer

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=536956aa-1857-e50b-4123-6063bac836ef@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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