Re: [PATCH] input: add handler for reset and power key input events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux